galois-0.7/0000755000175000017500000000000013720471702010441 5ustar ioiogalois-0.7/TODO0000644000175000017500000000136512577606500011143 0ustar ioio# TODO -- todo file for galois. # Copyright (C) 2012-2015 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . Things to do: * INTERNATIONALIZATION * hints galois-0.7/COPYING0000644000175000017500000010451311671455540011505 0ustar ioio 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 . galois-0.7/NEWS0000644000175000017500000000363513720463033011145 0ustar ioio# NEWS -- news file for galois. # Copyright (C) 2012-2020 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . * 29 Aug 2020: Galois 0.7 released Offload blockset generation to a separate thread Improved blockset generation Packaging improvements Updated documentation * 30 Jun 2018: Galois 0.6 released Widget tree cleanup Packaging improvements Updated documentation * 16 Nov 2017: Galois 0.5 released Port to gtkmm 3 Updated style of user interface Improved superblock frequency in superblocks mode Fall back to online manual if Gnome help isn't present Updated documentation * 14 Jul 2015: Galois 0.4 released Animate dropping block rather than dropping it instantly Updated documentation Added documentation in Italian * 25 Mar 2014: Galois 0.3 released New game mode: superblocks mode Display "Game over" message when game is over Remove PDF version of manual from source tarball Updated documentation Change paths of user data files: to preserve your preferences and scores, read the upgrade notes in the Galois manual * 26 Jan 2013: Galois 0.2 released Improved graphics: brighter colors, sharper brick contours, rescaled triangular board Install Galois menu item (XDG compliant environments) and man page Updated documentation * 9 Nov 2012: Galois 0.1 released Initial release galois-0.7/configure0000755000175000017500000033152113720471427012361 0ustar ioio#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi 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 # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # 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 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} 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" 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=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'` # 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'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_subst_vars='LTLIBOBJS LIBOBJS libxmlplusplus_LIBS libxmlplusplus_CFLAGS gtkmm_LIBS gtkmm_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR gtkmm_CFLAGS gtkmm_LIBS libxmlplusplus_CFLAGS libxmlplusplus_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path gtkmm_CFLAGS C compiler flags for gtkmm, overriding pkg-config gtkmm_LIBS linker flags for gtkmm, overriding pkg-config libxmlplusplus_CFLAGS C compiler flags for libxmlplusplus, overriding pkg-config libxmlplusplus_LIBS linker flags for libxmlplusplus, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_files="$ac_config_files src/makefile doc/makefile misc/makefile" ac_config_files="$ac_config_files doc/galois.6 doc/galois-it.6" ac_config_files="$ac_config_files doc/galois-C.omf doc/galois-it.omf" ac_config_files="$ac_config_files misc/galois.desktop" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtkmm" >&5 $as_echo_n "checking for gtkmm... " >&6; } if test -n "$gtkmm_CFLAGS"; then pkg_cv_gtkmm_CFLAGS="$gtkmm_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkmm-3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtkmm-3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtkmm_CFLAGS=`$PKG_CONFIG --cflags "gtkmm-3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$gtkmm_LIBS"; then pkg_cv_gtkmm_LIBS="$gtkmm_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkmm-3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtkmm-3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtkmm_LIBS=`$PKG_CONFIG --libs "gtkmm-3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then gtkmm_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtkmm-3.0" 2>&1` else gtkmm_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtkmm-3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$gtkmm_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtkmm-3.0) were not met: $gtkmm_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables gtkmm_CFLAGS and gtkmm_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables gtkmm_CFLAGS and gtkmm_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else gtkmm_CFLAGS=$pkg_cv_gtkmm_CFLAGS gtkmm_LIBS=$pkg_cv_gtkmm_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxmlplusplus" >&5 $as_echo_n "checking for libxmlplusplus... " >&6; } if test -n "$libxmlplusplus_CFLAGS"; then pkg_cv_libxmlplusplus_CFLAGS="$libxmlplusplus_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml++-2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml++-2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libxmlplusplus_CFLAGS=`$PKG_CONFIG --cflags "libxml++-2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libxmlplusplus_LIBS"; then pkg_cv_libxmlplusplus_LIBS="$libxmlplusplus_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml++-2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml++-2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libxmlplusplus_LIBS=`$PKG_CONFIG --libs "libxml++-2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libxmlplusplus_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml++-2.6" 2>&1` else libxmlplusplus_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml++-2.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libxmlplusplus_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libxml++-2.6) were not met: $libxmlplusplus_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables libxmlplusplus_CFLAGS and libxmlplusplus_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables libxmlplusplus_CFLAGS and libxmlplusplus_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else libxmlplusplus_CFLAGS=$pkg_cv_libxmlplusplus_CFLAGS libxmlplusplus_LIBS=$pkg_cv_libxmlplusplus_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi 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 # 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 # 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_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # 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 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=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'` # 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 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 # 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 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_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_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'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/makefile") CONFIG_FILES="$CONFIG_FILES src/makefile" ;; "doc/makefile") CONFIG_FILES="$CONFIG_FILES doc/makefile" ;; "misc/makefile") CONFIG_FILES="$CONFIG_FILES misc/makefile" ;; "doc/galois.6") CONFIG_FILES="$CONFIG_FILES doc/galois.6" ;; "doc/galois-it.6") CONFIG_FILES="$CONFIG_FILES doc/galois-it.6" ;; "doc/galois-C.omf") CONFIG_FILES="$CONFIG_FILES doc/galois-C.omf" ;; "doc/galois-it.omf") CONFIG_FILES="$CONFIG_FILES doc/galois-it.omf" ;; "misc/galois.desktop") CONFIG_FILES="$CONFIG_FILES misc/galois.desktop" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi galois-0.7/src/0000755000175000017500000000000013720471702011230 5ustar ioiogalois-0.7/src/triangle.h0000644000175000017500000000565113642120700013205 0ustar ioio/* triangle.h -- spatial groups for triangular bricks. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __TRIANGLE_ #define __TRIANGLE_ #include #include #include "grid.h" class group_triangle : public group_2d { private: virtual unsigned size() const { return 6; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual int type(const coords &c) const; virtual std::vector neighbors(const coords &c) const; virtual std::vector blockers(const coords &c) const; virtual grid transform(const grid &g, unsigned n) const; virtual grid center(const grid &g) const; public: virtual unsigned blockset_max() const { return 100; } // game virtual coords left(const coords &c) const { return c + make_coords(-3, (c.y % 2 == 0) ? 1 : -1); } virtual coords right(const coords &c) const { return c + make_coords(3, (c.y % 2 == 0) ? 1 : -1); } virtual coords down(const coords &c) const { return c + make_coords(0, 2); } virtual grid make_board(int width, int depth = 1) const { return grid(34, width * 3, 1, (-width / 2) * 3, 0, 0); } virtual std::vector check_lines(grid &g, int n) const; virtual void color_line(grid &g, int n, int c) const; virtual void remove_line(grid &g, int n) const; // drawing methods virtual Gdk::Rectangle block_size(const grid &b, int size) const; virtual Gdk::Rectangle board_size(int size, int rows, int cols, int layers) const; virtual void draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const; }; class group_triangle_mirror : public group_triangle { private: virtual unsigned size() const { return 12; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual grid transform(const grid &g, unsigned n) const; public: virtual unsigned blockset_max() const { return 80; } }; #endif /* __TRIANGLE_ */ galois-0.7/src/hexagon.cc0000644000175000017500000002230413630266731013175 0ustar ioio/* hexagon.cc -- spatial groups for hexagonal bricks. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "grid.h" #include "group.h" #include "hexagon.h" unsigned group_hexagon::rotate(unsigned n, unsigned m) const { const unsigned r[] = { 1, 2, 3, 4, 5, 0, }; return r[n % size()]; } unsigned group_hexagon::reflect(unsigned n) const { return n % size(); } std::vector group_hexagon::neighbors(const coords &c) const { std::vector v; v.push_back(c + make_coords(0, -2)); v.push_back(c + make_coords(-1, -1)); v.push_back(c + make_coords(1, -1)); v.push_back(c + make_coords(-1, 1)); v.push_back(c + make_coords(1, 1)); v.push_back(c + make_coords(0, 2)); return v; } grid group_hexagon::transform(const grid &g, unsigned n) const { // rotation matrix coefficients (times 2) const int xx[] = { 2, 1, -1, -2, -1, 1, }; const int xy[] = { 0, -3, -3, 0, 3, 3, }; const int yx[] = { 0, 1, 1, 0, -1, -1, }; const int yy[] = { 2, 1, -1, -2, -1, 1, }; n = n % size(); grid t; for (int i=0; i group_hexagon::center(const grid &g) const { // find center of mass coords s = make_coords(), m = make_coords(); int n = 0; for (int i=0; i 0) m = make_coords(-static_cast(std::floor(double(s.x) / n + 0.5)), -static_cast(std::floor(double(s.y) / n + 0.5))); // change back coordinate system coords mm = make_coords(m.x - m.y, m.x + m.y); grid c = g; c.move(mm); return c; } std::vector group_hexagon::check_lines(grid &g, int n) const { std::vector filled; for (int i=1; i &g, int n, int color) const { for (int i=n-1; i<=n; ++i) for (int j=0; j= 0 && g.get(c)) g.set(c, color); } } void group_hexagon::remove_line(grid &g, int n) const { for (int i=n; i>=0; --i) for (int j=0; j 1) ? g.get(c + make_coords(0, -2)) : 0)); } } Gdk::Rectangle group_hexagon::block_size(const grid &b, int size) const { double xunit = size * 0.288675134594813, yunit = size * 0.5; return Gdk::Rectangle(b.get_x0() * 3 * xunit, b.get_y0() * yunit, (b.get_cols() * 3 + 1) * xunit, (b.get_rows() + 1) * yunit); } Gdk::Rectangle group_hexagon::board_size(int size, int rows, int cols, int layers) const { double xunit = size * 0.288675134594813, yunit = size * 0.5; return Gdk::Rectangle (-static_cast(std::ceil((cols + 2) / 2 * 3 * xunit)), 0, static_cast(std::ceil(((cols + 2) * 3 + 1) * xunit)), static_cast(std::ceil((rows + 2) * yunit))); } void group_hexagon::draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { if (type(c) < 0) return; const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); double xunit = size * 0.288675134594813, yunit = size * 0.5; double xmargin = margin * 0.577350269189626, ymargin = margin; context->move_to((3 * c.x + 4) * xunit - 2 * xmargin, (c.y + 1) * yunit); context->line_to((3 * c.x + 3) * xunit - xmargin, c.y * yunit + ymargin); context->line_to((3 * c.x + 1) * xunit + xmargin, c.y * yunit + ymargin); context->line_to(3 * c.x * xunit + 2 * xmargin, (c.y + 1) * yunit); context->line_to((3 * c.x + 1) * xunit + xmargin, (c.y + 2) * yunit - ymargin); context->line_to((3 * c.x + 3) * xunit - xmargin, (c.y + 2) * yunit - ymargin); context->close_path(); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 0.8); context->fill_preserve(); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 1.0); context->stroke(); } void group_hexagon::draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { if (type(c) < 0) return; const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); double xunit = size * 0.288675134594813, yunit = size * 0.5; double xmargin = margin * 0.577350269189626, ymargin = margin; context->move_to((3 * c.x + 4) * xunit - 2 * xmargin, (c.y + 1) * yunit); context->line_to((3 * c.x + 3) * xunit - xmargin, c.y * yunit + ymargin); context->line_to((3 * c.x + 1) * xunit + xmargin, c.y * yunit + ymargin); context->line_to(3 * c.x * xunit + 2 * xmargin, (c.y + 1) * yunit); context->line_to((3 * c.x + 1) * xunit + xmargin, (c.y + 2) * yunit - ymargin); context->line_to((3 * c.x + 3) * xunit - xmargin, (c.y + 2) * yunit - ymargin); context->close_path(); const double dark = 0.8; context->set_source_rgba(color.get_red() * dark, color.get_green() * dark, color.get_blue() * dark, 1.0); context->stroke(); } void group_hexagon::draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const { const double width = 2.0, margin = (width + 1.0) * 0.5; context->set_line_width(width); double xunit = size * 0.288675134594813, yunit = size * 0.5; double xmargin = margin * 0.577350269189626, ymargin = margin; int left = -cols / 2 - 1, right = left + cols + 1, bottom = rows; int lparity = ((left + bottom) % 2 == 0) ? 0 : 1, rparity = ((right + bottom) % 2 == 0) ? 0 : 1; // left side for (int i=0; iline_to(((left + 1) * 3 + iparity) * xunit - 2.0 * xmargin, i * yunit); } // bottom left corner context->line_to((left * 3 + 4) * xunit - xmargin, (bottom + 1 - lparity) * yunit + ymargin); // bottom for (int i=left+1; iline_to((i * 3 + 1) * xunit + isign * xmargin, (bottom + iparity) * yunit + ymargin); context->line_to((i * 3 + 3) * xunit - isign * xmargin, (bottom + iparity) * yunit + ymargin); } // bottom right corner context->line_to(right * 3 * xunit + xmargin, (bottom + 1 - rparity) * yunit + ymargin); // right side for (int i=bottom-rparity; i>=0; --i) { int iparity = ((i + bottom + rparity + 1) % 2 == 0) ? 0 : 1; context->line_to((right * 3 + iparity) * xunit + 2.0 * xmargin, i * yunit); } // clear inside context->set_source_rgba(0.0, 0.0, 0.0, 1.0); context->fill_preserve(); // draw outline context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->stroke(); } unsigned group_hexagon_mirror::rotate(unsigned n, unsigned m) const { const unsigned r[] = { 1, 2, 3, 4, 5, 0, 11, 6, 7, 8, 9, 10, }; return r[n % size()]; } unsigned group_hexagon_mirror::reflect(unsigned n) const { const unsigned r[] = { 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, }; return r[n % size()]; } grid group_hexagon_mirror::transform(const grid &g, unsigned n) const { // transformation matrix coefficients (times 2) const int xx[] = { 2, 1, -1, -2, -1, 1, -2, -1, 1, 2, 1, -1, }; const int xy[] = { 0, -3, -3, 0, 3, 3, 0, -3, -3, 0, 3, 3, }; const int yx[] = { 0, 1, 1, 0, -1, -1, 0, -1, -1, 0, 1, 1, }; const int yy[] = { 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, }; n = n % size(); grid t; for (int i=0; i. */ #ifndef __SQUARE_ #define __SQUARE_ #include #include #include "grid.h" #include "group.h" class group_square : public group_2d { private: virtual unsigned size() const { return 4; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual int type(const coords &c) const { return 0; } virtual std::vector neighbors(const coords &c) const; virtual std::vector blockers(const coords &c) const { return std::vector(); } virtual grid transform(const grid &g, unsigned n) const; virtual grid center(const grid &g) const; public: virtual unsigned blockset_max() const { return 100; } // game virtual coords left(const coords &c) const { return c + make_coords(-1, 0); } virtual coords right(const coords &c) const { return c + make_coords(1, 0); } virtual coords down(const coords &c) const { return c + make_coords(0, 1); } virtual grid make_board(int width, int depth = 1) const { return grid(20, width, 1, -width / 2, 0, 0); } virtual std::vector check_lines(grid &g, int n) const; virtual void color_line(grid &g, int n, int c) const; virtual void remove_line(grid &g, int n) const; // drawing methods virtual Gdk::Rectangle block_size(const grid &b, int size) const; virtual Gdk::Rectangle board_size(int size, int rows, int cols, int layers) const; virtual void draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const; }; class group_square_mirror : public group_square { private: virtual unsigned size() const { return 8; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual grid transform(const grid &g, unsigned n) const; public: virtual unsigned blockset_max() const { return 80; } }; #endif /* __SQUARE_ */ galois-0.7/src/preferences.h0000644000175000017500000001115113221770432013677 0ustar ioio/* preferences.h -- preferences dialog for falling blocks game. -*- C++ -*- Copyright (C) 2011-2017 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __PREFERENCES_ #define __PREFERENCES_ #include #include const struct { Glib::ustring description; bool is_3d; } brick_shape[] = { { "square bricks", false, }, { "hexagonal bricks", false, }, { "triangular bricks", false, }, { "cubic bricks", true, }, }; class PrefsDialog : public Gtk::Dialog { private: // child widgets Gtk::Notebook notebook; // first page ; Gtk::Box page_game_box; ; ; Gtk::Label geometry_heading; ; ; Gtk::Box geometry_box; ; ; ; Gtk::RadioButton::Group geometry_group; ; ; ; Gtk::RadioButton geometry_radio[sizeof(brick_shape) / sizeof(brick_shape[0])]; ; ; ; Gtk::CheckButton geometry_check; ; ; ; Gtk::Box width_box; ; ; ; ; Gtk::Label width_label; ; ; ; ; Gtk::SpinButton width_spin; ; ; ; ; Gtk::Box depth_box; ; ; ; ; ; Gtk::Label depth_label; ; ; ; ; ; Gtk::SpinButton depth_spin; ; ; Gtk::Label game_heading; ; ; Gtk::Box game_box; ; ; ; Gtk::Box mode1_box; ; ; ; ; Gtk::Label mode1_label; ; ; ; ; Gtk::ComboBoxText mode1_combo; ; ; ; Gtk::Box mode2_box; ; ; ; ; Gtk::Label mode2_label1; ; ; ; ; Gtk::ComboBoxText mode2_combo; ; ; ; ; Gtk::Label mode2_label2; ; ; ; Gtk::Box speed_box; ; ; ; ; Gtk::Label speed_label; ; ; ; ; Gtk::SpinButton speed_spin; ; ; ; Gtk::Box bricks_box; ; ; ; ; Gtk::Label bricks_label1; ; ; ; ; Gtk::SpinButton bricks_spin1; ; ; ; ; Gtk::Label bricks_label2; ; ; ; ; Gtk::SpinButton bricks_spin2; ; ; ; Gtk::Box empty_box; ; ; ; ; Gtk::Label empty_label1; ; ; ; ; Gtk::SpinButton empty_spin; ; ; ; ; Gtk::Label empty_label2; ; ; Gtk::Label view_heading; ; ; Gtk::Box view_box; ; ; ; Gtk::CheckButton next_check; ; ; ; Gtk::CheckButton land_check; // second page ; Gtk::Box page_controls_box; ; ; Gtk::Label two_heading; ; ; Gtk::TreeView two_tree; ; ; ; Glib::RefPtr two_list; ; ; ; struct ColumnsModel : public Gtk::TreeModel::ColumnRecord { Gtk::TreeModelColumn action; Gtk::TreeModelColumn key; ColumnsModel() { add(action); add(key); } } two_columns; ; ; Gtk::Label three_heading; ; ; Gtk::TreeView three_tree; ; ; ; Glib::RefPtr three_list; ; ; ; ColumnsModel three_columns; int width2, width3; int edit_keys; Glib::ustring edit_path; protected: virtual void on_hide(); virtual bool on_delete_event(GdkEventAny *event); virtual bool on_key_press_event(GdkEventKey *); virtual void on_geometry_radio_signal_toggled(); virtual void on_width_spin_signal_value_changed(); virtual void on_mode1_combo_signal_changed(); virtual void on_bricks_spin1_signal_value_changed(); virtual void on_two_cell_editing_started(Gtk::CellEditable *cell, const Glib::ustring &path); virtual void on_three_cell_editing_started(Gtk::CellEditable *cell, const Glib::ustring &path); public: PrefsDialog(Gtk::Window &parent); void reset_page() { notebook.set_current_page(0); } unsigned get_geometry() const; bool get_geometry_3d() const; bool get_reflection() const { return geometry_check.get_active(); } int get_width() const { return width_spin.get_value_as_int(); } int get_depth() const { return depth_spin.get_value_as_int(); } int get_mode1() const { return mode1_combo.get_active_row_number(); } int get_mode2() const { return mode2_combo.get_active_row_number(); } int get_speed() const { return speed_spin.get_value_as_int(); } int get_bricks_max() const { return bricks_spin1.get_value_as_int(); } int get_bricks_min() const { return bricks_spin2.get_value_as_int(); } int get_empty() const { return empty_spin.get_value_as_int(); } bool get_next() const { return next_check.get_active(); } bool get_land() const { return land_check.get_active(); } unsigned get_key_2d(int n) const; unsigned get_key_3d(int n) const; bool load(); bool save() const; }; #endif /* __PREFERENCES_ */ galois-0.7/src/grid.h0000644000175000017500000001215113640712055012326 0ustar ioio/* grid.h -- three-dimensional grid of points. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __GRID_ #define __GRID_ #include #include #include struct coords { int x, y, z; }; inline coords make_coords(int x = 0, int y = 0, int z = 0) { coords c; c.x = x; c.y = y; c.z = z; return c; } inline coords operator-(const coords &c) { return make_coords(-c.x, -c.y, -c.z); } inline coords operator+(const coords &c1, const coords &c2) { return make_coords(c1.x + c2.x, c1.y + c2.y, c1.z + c2.z); } // required forward declarations template class grid; template bool operator==(const grid &g1, const grid &g2); template class grid { private: std::valarray mask; int rows, cols, layers; // dimensions coords c0; // front upper left corner (y goes downwards, z goes inwards) public: grid() : rows(0), cols(0), layers(0), c0() { } grid(int r, int c, int l, int x = 0, int y = 0, int z = 0) : mask(T(0), r * c * l), rows(r), cols(c), layers(l), c0(make_coords(x, y, z)) { } grid(int r, int c, int l, const coords &cc) : mask(T(0), r * c * l), rows(r), cols(c), layers(l), c0(cc) { } // copy constructor and assignment grid(const grid &g) : mask(T(0), g.rows * g.cols * g.layers), rows(g.rows), cols(g.cols), layers(g.layers), c0(g.c0) { mask = g.mask; } grid & operator=(const grid &g) { rows = g.rows; cols = g.cols; layers = g.layers; c0 = g.c0; mask.resize(rows * cols * layers); mask = g.mask; return *this; } // simple operations int get_rows() const { return rows; } int get_cols() const { return cols; } int get_layers() const { return layers; } const coords & get_c0() const { return c0; } int get_x0() const { return c0.x; } int get_y0() const { return c0.y; } int get_z0() const { return c0.z; } T get(const coords &c) const { return mask[(c.x - c0.x) + cols * ((c.y - c0.y) + rows * (c.z - c0.z))]; } void set(const coords &c, T v = T(1)) { mask[(c.x - c0.x) + cols * ((c.y - c0.y) + rows * (c.z - c0.z))] = v; } void clear(const coords &c) { set(c, T(0)); } // check bounds bool is_in(const coords &c) const; void move(const coords &c) { c0 = c0 + c; } void add(const coords &c, T v = T(1)); // this might need resizing friend bool operator==<>(const grid &g1, const grid &g2); }; template bool grid::is_in(const coords &c) const { return (c.x >= c0.x && c.x < c0.x + cols && c.y >= c0.y && c.y < c0.y + rows && c.z >= c0.z && c.z < c0.z + layers); } template void grid::add(const coords &c, T v) { // resize if needed if (mask.size() == 0) { mask.resize(1); c0 = c; rows = cols = layers = 1; } else if (!is_in(c)) { coords d0 = make_coords((c.x < c0.x) ? c0.x - c.x : 0, (c.y < c0.y) ? c0.y - c.y : 0, (c.z < c0.z) ? c0.z - c.z : 0), n0 = make_coords(c0.x - d0.x, c0.y - d0.y, c0.z - d0.z); int dcols = (c.x >= c0.x + cols) ? c.x - c0.x - cols + 1 : 0, drows = (c.y >= c0.y + rows) ? c.y - c0.y - rows + 1 : 0, dlayers = (c.z >= c0.z + layers) ? c.z - c0.z - layers + 1 : 0; int nrows = rows + d0.y + drows, ncols = cols + d0.x + dcols, nlayers = layers + d0.z + dlayers; // resize, copy old values std::valarray m = mask; mask.resize(nrows * ncols * nlayers, T(0)); size_t len[] = { size_t(layers), size_t(rows), size_t(cols), }; size_t str[] = { size_t(ncols * nrows), size_t(ncols), 1, }; std::gslice g(d0.x + ncols * (d0.y + nrows * d0.z), std::valarray(len, 3), std::valarray(str, 3)); mask[g] = m; c0 = n0; rows = nrows; cols = ncols; layers = nlayers; } // set value set(c, v); } template bool operator==(const grid &g1, const grid &g2) { // check dimensions if (g1.rows != g2.rows || g1.cols != g2.cols || g1.layers != g2.layers || g1.c0.x != g2.c0.x || g1.c0.y != g2.c0.y || g1.c0.z != g2.c0.z) return false; // check contents for (unsigned i=0; i get_bricks(const grid &g) { std::vector v; for (int i=0; i. */ #include #include #include #include #include #include #include "preferences.h" struct control_key { Glib::ustring action; unsigned key; }; const control_key control_keys_2d[] = { { "Move left", gdk_keyval_from_name("Left"), }, { "Move right", gdk_keyval_from_name("Right"), }, { "Rotate", gdk_keyval_from_name("Up"), }, { "Reflect", gdk_keyval_from_name("Down"), }, { "Drop", gdk_keyval_from_name("space"), }, { "Pause", gdk_keyval_from_name("Escape"), }, }; const control_key control_keys_3d[] = { { "Move left", gdk_keyval_from_name("Left"), }, { "Move right", gdk_keyval_from_name("Right"), }, { "Move up", gdk_keyval_from_name("Up"), }, { "Move down", gdk_keyval_from_name("Down"), }, { "Rotate X", gdk_keyval_from_name("1"), }, { "Rotate Y", gdk_keyval_from_name("2"), }, { "Rotate Z", gdk_keyval_from_name("3"), }, { "Reflect", gdk_keyval_from_name("4"), }, { "Drop", gdk_keyval_from_name("space"), }, { "Pause", gdk_keyval_from_name("Escape"), }, }; void PrefsDialog::on_hide() { save(); Gtk::Dialog::on_hide(); } bool PrefsDialog::on_delete_event(GdkEventAny *event) { save(); return Gtk::Dialog::on_delete_event(event); } bool PrefsDialog::on_key_press_event(GdkEventKey *event) { Gtk::TreeModel::Row row; switch (edit_keys) { case 2: // change 2d control key row = *(two_list->get_iter(edit_path)); row[two_columns.key] = gdk_keyval_name(event->keyval); edit_keys = 0; return true; case 3: // change 3d control key row = *(three_list->get_iter(edit_path)); row[three_columns.key] = gdk_keyval_name(event->keyval); edit_keys = 0; return true; default: // normal actions return Gtk::Dialog::on_key_press_event(event); } } void PrefsDialog::on_geometry_radio_signal_toggled() { if (get_geometry_3d()) { depth_box.set_sensitive(true); const int min = 4, max = 8; width_spin.get_adjustment()->set_lower(min); width_spin.get_adjustment()->set_upper(max); width_spin.set_value(width3); } else { depth_box.set_sensitive(false); const int min = 10, max = 20; width_spin.get_adjustment()->set_lower(min); width_spin.get_adjustment()->set_upper(max); width_spin.set_value(width2); } } void PrefsDialog::on_width_spin_signal_value_changed() { if (get_geometry_3d()) { width3 = get_width(); depth_spin.get_adjustment()->set_upper(width3); if (get_depth() > width3) depth_spin.set_value(width3); } else width2 = get_width(); } void PrefsDialog::on_mode1_combo_signal_changed() { mode2_box.set_sensitive(get_mode1() == 1); } void PrefsDialog::on_bricks_spin1_signal_value_changed() { int max = get_bricks_max(); bricks_spin2.get_adjustment()->set_upper(max); if (get_bricks_min() > max) bricks_spin2.set_value(max); } void PrefsDialog::on_two_cell_editing_started(Gtk::CellEditable *cell, const Glib::ustring &path) { edit_keys = 2; edit_path = path; } void PrefsDialog::on_three_cell_editing_started(Gtk::CellEditable *cell, const Glib::ustring &path) { edit_keys = 3; edit_path = path; } PrefsDialog::PrefsDialog(Gtk::Window &parent) : Gtk::Dialog("Preferences", parent, true), // modal dialog page_game_box(Gtk::ORIENTATION_VERTICAL), geometry_box(Gtk::ORIENTATION_VERTICAL), width_box(Gtk::ORIENTATION_HORIZONTAL), depth_box(Gtk::ORIENTATION_HORIZONTAL), game_box(Gtk::ORIENTATION_VERTICAL), mode1_box(Gtk::ORIENTATION_HORIZONTAL), mode2_box(Gtk::ORIENTATION_HORIZONTAL), speed_box(Gtk::ORIENTATION_HORIZONTAL), bricks_box(Gtk::ORIENTATION_HORIZONTAL), empty_box(Gtk::ORIENTATION_HORIZONTAL), view_box(Gtk::ORIENTATION_VERTICAL), page_controls_box(Gtk::ORIENTATION_VERTICAL), width2(10), width3(6), edit_keys(0) { get_vbox()->pack_start(notebook); notebook.set_border_width(10); // first tab notebook.append_page(page_game_box, "Game"); page_game_box.set_border_width(12); page_game_box.set_spacing(6); page_game_box.pack_start(geometry_heading, Gtk::PACK_SHRINK); geometry_heading.set_text("Geometry"); geometry_heading.set_use_markup(true); geometry_heading.set_alignment(Gtk::ALIGN_START); page_game_box.pack_start(geometry_box, Gtk::PACK_SHRINK); geometry_box.set_margin_start(12); geometry_box.set_spacing(6); for (unsigned i=0; iGame"); game_heading.set_use_markup(true); game_heading.set_alignment(Gtk::ALIGN_START); game_heading.set_margin_top(12); page_game_box.pack_start(game_box, Gtk::PACK_SHRINK); game_box.set_margin_start(12); game_box.set_spacing(6); game_box.pack_start(mode1_box, Gtk::PACK_SHRINK); mode1_box.set_spacing(6); mode1_box.pack_start(mode1_label, Gtk::PACK_SHRINK); mode1_label.set_text("On level change: increase"); mode1_box.pack_start(mode1_combo, Gtk::PACK_SHRINK); mode1_combo.append("speed"); mode1_combo.append("max. block size"); mode1_combo.append("superblock size"); mode1_combo.set_active(0); mode1_combo.signal_changed().connect (sigc::mem_fun(*this, &PrefsDialog::on_mode1_combo_signal_changed)); game_box.pack_start(mode2_box, Gtk::PACK_SHRINK); mode2_box.set_margin_start(12); mode2_box.set_spacing(6); mode2_box.pack_start(mode2_label1, Gtk::PACK_SHRINK); mode2_label1.set_text("and"); mode2_box.pack_start(mode2_combo, Gtk::PACK_SHRINK); mode2_combo.append("decrease"); mode2_combo.append("keep fixed"); mode2_combo.append("increase"); mode2_combo.set_active(0); mode2_box.pack_start(mode2_label2, Gtk::PACK_SHRINK); mode2_label2.set_text("min. block size"); mode2_box.set_sensitive(false); game_box.pack_start(speed_box, Gtk::PACK_SHRINK); speed_box.set_spacing(6); speed_box.pack_start(speed_label, Gtk::PACK_SHRINK); speed_label.set_text("Initial speed level:"); speed_box.pack_start(speed_spin, Gtk::PACK_SHRINK); speed_spin.set_adjustment(Gtk::Adjustment::create(5, 1, 9)); game_box.pack_start(bricks_box, Gtk::PACK_SHRINK); bricks_box.pack_start(bricks_label1, Gtk::PACK_SHRINK); bricks_box.set_spacing(6); bricks_label1.set_text("Initial block size: maximum"); bricks_box.pack_start(bricks_spin1, Gtk::PACK_SHRINK); bricks_spin1.set_adjustment(Gtk::Adjustment::create(4, 4, 8)); bricks_box.pack_start(bricks_label2, Gtk::PACK_SHRINK); bricks_label2.set_text("minimum"); bricks_box.pack_start(bricks_spin2, Gtk::PACK_SHRINK); bricks_spin2.set_adjustment(Gtk::Adjustment::create(4, 2, 4)); bricks_spin1.signal_value_changed().connect (sigc::mem_fun(*this, &PrefsDialog::on_bricks_spin1_signal_value_changed)); game_box.pack_start(empty_box, Gtk::PACK_SHRINK); empty_box.set_spacing(6); empty_box.pack_start(empty_label1, Gtk::PACK_SHRINK); empty_label1.set_text("Remove lines with up to"); empty_box.pack_start(empty_spin, Gtk::PACK_SHRINK); empty_spin.set_adjustment(Gtk::Adjustment::create(0, 0, 2)); empty_box.pack_start(empty_label2, Gtk::PACK_SHRINK); empty_label2.set_text("empty cells"); page_game_box.pack_start(view_heading, Gtk::PACK_SHRINK); view_heading.set_text("View"); view_heading.set_use_markup(true); view_heading.set_alignment(Gtk::ALIGN_START); view_heading.set_margin_top(12); page_game_box.pack_start(view_box, Gtk::PACK_SHRINK); view_box.set_margin_start(12); view_box.set_spacing(6); view_box.pack_start(next_check, Gtk::PACK_SHRINK); next_check.set_label("Preview next block"); next_check.set_active(true); view_box.pack_start(land_check, Gtk::PACK_SHRINK); land_check.set_label("Show where the block will land"); // second tab notebook.append_page(page_controls_box, "Controls"); page_controls_box.set_border_width(12); page_controls_box.set_spacing(6); page_controls_box.pack_start(two_heading, Gtk::PACK_SHRINK); two_heading.set_text("2D controls"); two_heading.set_use_markup(true); two_heading.set_alignment(Gtk::ALIGN_START); page_controls_box.pack_start(two_tree, Gtk::PACK_SHRINK); two_tree.set_margin_start(12); two_list = Gtk::ListStore::create(two_columns); two_tree.set_model(two_list); two_tree.append_column("Action", two_columns.action); two_tree.append_column_editable("Key", two_columns.key); two_tree.set_headers_visible(false); for (unsigned i=0; iappend()); row[two_columns.action] = control_keys_2d[i].action; row[two_columns.key] = gdk_keyval_name(control_keys_2d[i].key); } two_tree.get_column_cell_renderer(1)->signal_editing_started().connect (sigc::mem_fun(*this, &PrefsDialog::on_two_cell_editing_started)); page_controls_box.pack_start(three_heading, Gtk::PACK_SHRINK); three_heading.set_margin_top(12); three_heading.set_text("3D controls"); three_heading.set_use_markup(true); three_heading.set_alignment(Gtk::ALIGN_START); page_controls_box.pack_start(three_tree, Gtk::PACK_SHRINK); three_tree.set_margin_start(12); three_list = Gtk::ListStore::create(three_columns); three_tree.set_model(three_list); three_tree.append_column("Action", three_columns.action); three_tree.append_column_editable("Key", three_columns.key); three_tree.set_headers_visible(false); for (unsigned i=0; iappend()); row[three_columns.action] = control_keys_3d[i].action; row[three_columns.key] = gdk_keyval_name(control_keys_3d[i].key); } three_tree.get_column_cell_renderer(1)->signal_editing_started().connect (sigc::mem_fun(*this, &PrefsDialog::on_three_cell_editing_started)); // close button add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_DELETE_EVENT); // reload saved settings load(); get_vbox()->show_all_children(); } unsigned PrefsDialog::get_geometry() const { for (unsigned i=0; ichildren().begin(); for (int i=0; ichildren().begin(); for (int i=0; iread(); // skip whitespace and comments while (reader->get_node_type() == xmlpp::TextReader::SignificantWhitespace || reader->get_node_type() == xmlpp::TextReader::Comment) reader->read(); // document node if (reader->get_node_type() != xmlpp::TextReader::Element || reader->get_name() != "galois_config") return false; // read inner nodes for (;;) { reader->read(); // skip whitespace and comments while (reader->get_node_type() == xmlpp::TextReader::SignificantWhitespace || reader->get_node_type() == xmlpp::TextReader::Comment) reader->read(); // end of document node if (reader->get_node_type() == xmlpp::TextReader::EndElement && reader->get_name() == "galois_config") break; if (reader->get_node_type() != xmlpp::TextReader::Element) return false; // read and apply properties Glib::ustring name = reader->get_name(); if (name == "keys_2d") { // read inner nodes for (;;) { reader->read(); // skip whitespace and comments while (reader->get_node_type() == xmlpp::TextReader::SignificantWhitespace || reader->get_node_type() == xmlpp::TextReader::Comment) reader->read(); // end of document node if (reader->get_node_type() == xmlpp::TextReader::EndElement && reader->get_name() == "keys_2d") break; if (reader->get_node_type() != xmlpp::TextReader::Element || reader->get_name() != "control_key") return false; reader->move_to_first_attribute(); Glib::ustring action = reader->get_value(); reader->move_to_next_attribute(); Glib::ustring key = reader->get_value(); for (Gtk::TreeModel::iterator i=two_list->children().begin(); i!=two_list->children().end(); ++i) { Gtk::TreeModel::Row row = *i; if (action == row[two_columns.action]) row[two_columns.key] = key; } } } else if (name == "keys_3d") { // read inner nodes for (;;) { reader->read(); // skip whitespace and comments while (reader->get_node_type() == xmlpp::TextReader::SignificantWhitespace || reader->get_node_type() == xmlpp::TextReader::Comment) reader->read(); // end of document node if (reader->get_node_type() == xmlpp::TextReader::EndElement && reader->get_name() == "keys_3d") break; if (reader->get_node_type() != xmlpp::TextReader::Element || reader->get_name() != "control_key") return false; reader->move_to_first_attribute(); Glib::ustring action = reader->get_value(); reader->move_to_next_attribute(); Glib::ustring key = reader->get_value(); for (Gtk::TreeModel::iterator i=three_list->children().begin(); i!=three_list->children().end(); ++i) { Gtk::TreeModel::Row row = *i; if (action == row[three_columns.action]) row[three_columns.key] = key; } } } else { reader->move_to_first_attribute(); if (name == "geometry") geometry_radio[std::atoi(reader->get_value().c_str())]. set_active(); else if (name == "reflection") geometry_check.set_active (std::atoi(reader->get_value().c_str())); else if (name == "width2") { width2 = std::atoi(reader->get_value().c_str()); if (!get_geometry_3d()) width_spin.set_value(width2); } else if (name == "width3") { width3 = std::atoi(reader->get_value().c_str()); depth_spin.get_adjustment()->set_upper(width3); if (get_geometry_3d()) width_spin.set_value(width3); } else if (name == "depth") depth_spin.set_value(std::atoi(reader->get_value().c_str())); else if (name == "mode1") mode1_combo.set_active (std::atoi(reader->get_value().c_str())); else if (name == "mode2") mode2_combo.set_active (std::atoi(reader->get_value().c_str())); else if (name == "speed") speed_spin.set_value(std::atoi(reader->get_value().c_str())); else if (name == "bricks_max") bricks_spin1.set_value (std::atoi(reader->get_value().c_str())); else if (name == "bricks_min") bricks_spin2.set_value (std::atoi(reader->get_value().c_str())); else if (name == "empty") empty_spin.set_value(std::atoi(reader->get_value().c_str())); else if (name == "next") next_check.set_active(std::atoi(reader->get_value().c_str())); else if (name == "land") land_check.set_active(std::atoi(reader->get_value().c_str())); } } // file was parsed successfully return true; } catch (const std::exception &e) { } return false; } bool PrefsDialog::save() const { // open file, create directory if doesn't exist Glib::ustring dir = Glib::build_filename(Glib::get_user_config_dir(), "galois"), file = Glib::build_filename(dir, "galois.conf"); g_mkdir_with_parents(dir.c_str(), 0755); std::ofstream os(file.c_str()); // xml header os << "" << std::endl; // document node os << "" << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; os << " " << std::endl; for (Gtk::TreeModel::iterator i=two_list->children().begin(); i!=two_list->children().end(); ++i) { Gtk::TreeModel::Row row = *i; os << " " << std::endl; } os << " " << std::endl; os << " " << std::endl; for (Gtk::TreeModel::iterator i=three_list->children().begin(); i!=three_list->children().end(); ++i) { Gtk::TreeModel::Row row = *i; os << " " << std::endl; } os << " " << std::endl; // close document node os << "" << std::endl; return os.good(); } galois-0.7/src/scores.h0000644000175000017500000001313113221541062012667 0ustar ioio/* scores.h -- scores dialog for falling blocks game. -*- C++ -*- Copyright (C) 2012-2017 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __SCORES_ #define __SCORES_ #include #include struct game { Glib::ustring name; double time; int score, lines, level; int speed, bmax, bmin, bsuper; int geometry; bool reflection; int width, depth; int mode1, mode2; int ispeed, imax, imin; int empty; bool next, land; }; inline game make_game(const Glib::ustring &name, double time, int score, int lines, int level, int speed, int bmax, int bmin, int bsuper, int geometry, bool reflection, int width, int depth, int mode1, int mode2, int ispeed, int imax, int imin, int empty, bool next, bool land) { game g; g.name = name; g.time = time; g.score = score; g.lines = lines; g.level = level; g.speed = speed; g.bmax = bmax; g.bmin = bmin; g.bsuper = bsuper; g.geometry = geometry; g.reflection = reflection; g.width = width; g.depth = (geometry == 3) ? depth : 0; g.mode1 = mode1; g.mode2 = (mode1 == 1) ? mode2 : 0; g.ispeed = ispeed; g.imax = imax; g.imin = imin; g.empty = empty; g.next = next; g.land = land; return g; } inline game make_game() { game g; g.name = ""; g.time = 0.0; g.score = g.lines = g.level = g.speed = g.bmax = g.bmin = g.geometry = g.width = g.depth = g.mode1 = g.mode2 = g.ispeed = g.imax = g.imin = g.empty = 0; g.reflection = g.next = g.land = false; return g; } class ScoresDialog : public Gtk::Dialog { private: // filters Gtk::Grid grid; ; Gtk::Label geometry_label; ; Gtk::ComboBoxText geometry_combo; ; Gtk::Label mode1_label; ; Gtk::ComboBoxText mode1_combo; Gtk::Box buttons_box; ; Gtk::ToggleButton show_button; ; Gtk::Button check_button; Gtk::Box filters_box; ; Gtk::Box reflect_box; ; ; Gtk::CheckButton reflect_check; ; ; Gtk::Label reflect_label; ; ; Gtk::ComboBoxText reflect_combo; ; Gtk::Box mode2_box; ; ; Gtk::CheckButton mode2_check; ; ; Gtk::Label mode2_label1, mode2_label2; ; ; Gtk::ComboBoxText mode2_combo; ; Gtk::Box size_box; ; ; Gtk::CheckButton size_check; ; ; Gtk::Label imax_label, imin_label; ; ; Gtk::SpinButton imax_spin, imin_spin; ; Gtk::Box empty_box; ; ; Gtk::CheckButton empty_check; ; ; Gtk::Label empty_label1, empty_label2; ; ; Gtk::SpinButton empty_spin; // scores board Gtk::ScrolledWindow scroll; ; Gtk::TreeView tree; ; Glib::RefPtr list; ; struct ColumnsModel : public Gtk::TreeModel::ColumnRecord { Gtk::TreeModelColumn name; Gtk::TreeModelColumn score; Gtk::TreeModelColumn lines; Gtk::TreeModelColumn level; Gtk::TreeModelColumn time; // for internal use Gtk::TreeModelColumn speed; Gtk::TreeModelColumn bmax; Gtk::TreeModelColumn bmin; Gtk::TreeModelColumn bsuper; Gtk::TreeModelColumn editable; // for internal use ColumnsModel() { add(name); add(score); add(lines); add(level); add(time); add(speed); add(bmax); add(bmin); add(bsuper); add(editable); } } columns; Gtk::TreeView::Column column; Gtk::CellRendererText renderer; std::vector games; int visible_rows, active_game, active_row; void set_geometry(int geometry) { geometry_combo.set_active(geometry); } void set_mode1(int mode1) { mode1_combo.set_active(mode1); } void set_reflection(bool reflection) { reflect_combo.set_active(reflection ? 1 : 0); } void set_mode2(int mode2) { mode2_combo.set_active(mode2); } void set_imax(int imax) { imax_spin.set_value(imax); } void set_imin(int imin) { imin_spin.set_value(imin); } void set_empty(int empty) { empty_spin.set_value(empty); } bool pass(const std::vector::const_iterator &i) const; bool pass(int n) const { return pass(games.begin() + n); } void make_list(int active = -1); protected: virtual void on_hide(); virtual bool on_delete_event(GdkEventAny *event); virtual bool on_draw(const Cairo::RefPtr &context); virtual void on_cell_edited(const Glib::ustring &path, const Glib::ustring &text); virtual void on_filter_changed() { make_list(-1); } virtual void on_show_button_signal_toggled(); virtual void on_check_button_signal_clicked(); virtual void on_imax_spin_signal_value_changed(); public: ScoresDialog(Gtk::Window &parent); bool is_active() const { return active_row >= 0; } void add(const Glib::ustring &name, double time, int score, int lines, int level, int speed, int bmax, int bmin, int bsuper, int geometry, bool reflection, int width, int depth, int mode1, int mode2, int ispeed, int imax, int imin, int empty, bool next, bool land); void filter(int geometry, bool reflection, int width, int depth, int mode1, int mode2, int ispeed, int imax, int imin, int empty, bool next, bool land); bool load(); bool save() const; }; #endif /* __SCORES_ */ galois-0.7/src/cube.h0000644000175000017500000000667313642120670012331 0ustar ioio/* cube.h -- spatial groups for cubic bricks. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __CUBE_ #define __CUBE_ #include #include #include "grid.h" #include "group.h" class group_cube : public group_3d { private: virtual unsigned size() const { return 24; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual int type(const coords &c) const { return 0; } virtual std::vector neighbors(const coords &c) const; virtual std::vector blockers(const coords &c) const { return std::vector(); } virtual grid transform(const grid &g, unsigned n) const; virtual grid center(const grid &g) const; public: virtual Glib::ustring name() const { return "cube"; } virtual unsigned blockset_max() const { return 15; } // game virtual coords left(const coords &c) const { return c + make_coords(-1, 0, 0); } virtual coords right(const coords &c) const { return c + make_coords(1, 0, 0); } virtual coords front(const coords &c) const { return c + make_coords(0, 0, -1); } virtual coords back(const coords &c) const { return c + make_coords(0, 0, 1); } virtual coords down(const coords &c) const { return c + make_coords(0, 1, 0); } virtual grid make_board(int width, int depth = 1) const { return grid(30, width, depth, -width / 2, 0, -depth / 2); } virtual std::vector check_lines(grid &g, int n) const; virtual void color_line(grid &g, int n, int c) const; virtual void remove_line(grid &g, int n) const; // drawing methods virtual Gdk::Rectangle block_size(const grid &b, int size) const; virtual Gdk::Rectangle board_size(int size, int rows, int cols, int layers) const; virtual void draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const; virtual void draw_board_front(Cairo::RefPtr context, int rows, int cols, int layers, int size) const; virtual void draw_plane(Cairo::RefPtr context, int y, int cols, int layers, int size) const; }; class group_cube_mirror : public group_cube { private: virtual unsigned size() const { return 48; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual grid transform(const grid &g, unsigned n) const; public: virtual Glib::ustring name() const { return "cube_m"; } virtual unsigned blockset_max() const { return 10; } }; #endif /* __CUBE_ */ galois-0.7/src/makefile.in0000644000175000017500000000406613633524447013353 0ustar ioio# makefile -- makefile for galois source directory. # Copyright (C) 2012-2020 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @configure_input@ prefix = ${DESTDIR}@prefix@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ PKG_CONFIG = @PKG_CONFIG@ GTKMM_CFLAGS = `${PKG_CONFIG} --cflags gtkmm-3.0` GTKMM_LIBS = `${PKG_CONFIG} --libs gtkmm-3.0` XMLPP_CFLAGS = `${PKG_CONFIG} --cflags libxml++-2.6` XMLPP_LIBS = `${PKG_CONFIG} --libs libxml++-2.6` THREAD_LIBS = -pthread EXE = galois AC = makefile BAK = *~ OBJS = area.o board.o cube.o group.o hexagon.o main.o preferences.o \ scores.o square.o triangle.o .SUFFIXES : .cc .o .cc.o : ${CXX} ${CXXFLAGS} -c $< ${GTKMM_CFLAGS} ${XMLPP_CFLAGS} default: galois all : ${EXE} galois : ${OBJS} ${CXX} ${CXXFLAGS} ${OBJS} -o $@ ${GTKMM_LIBS} ${XMLPP_LIBS} \ ${THREAD_LIBS} # other targets clean : - rm -f ${OBJS} ${EXE} ${BAK} distclean : clean - rm -f ${AC} install : galois mkdir -p ${prefix}/games cp galois ${prefix}/games uninstall : - rm -f ${prefix}/games/galois # dependencies area.o : area.h grid.h group.h blocks.o : grid.h group.h hexagon.h square.h triangle.h board.o : board.h grid.h group.h cube.o : grid.h group.h cube.h group.o : grid.h group.h hexagon.o : grid.h group.h hexagon.h main.o : area.h board.h cube.h grid.h group.h hexagon.h main.h \ preferences.h scores.h square.h triangle.h preferences.o : preferences.h scores.o : scores.h square.o : grid.h group.h square.h triangle.o : grid.h group.h triangle.h galois-0.7/src/square.cc0000644000175000017500000001474613640723064013055 0ustar ioio/* square.cc -- spatial groups for square bricks. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "grid.h" #include "group.h" #include "square.h" unsigned group_square::rotate(unsigned n, unsigned m) const { const unsigned r[] = { 1, 2, 3, 0, }; return r[n % size()]; } unsigned group_square::reflect(unsigned n) const { return n % size(); } std::vector group_square::neighbors(const coords &c) const { std::vector v; v.push_back(c + make_coords(0, -1)); v.push_back(c + make_coords(-1, 0)); v.push_back(c + make_coords(1, 0)); v.push_back(c + make_coords(0, 1)); return v; } grid group_square::transform(const grid &g, unsigned n) const { // rotation matrix coefficients const int xx[] = { 1, 0, -1, 0, }; const int xy[] = { 0, -1, 0, 1, }; const int yx[] = { 0, 1, 0, -1, }; const int yy[] = { 1, 0, -1, 0, }; n = n % size(); grid t; for (int i=0; i group_square::center(const grid &g) const { // find center of mass coords s = make_coords(), m = make_coords(); int n = 0; for (int i=0; i 0) m = make_coords(-static_cast(std::floor(double(s.x) / n + 0.5)), -static_cast(std::floor(double(s.y) / n + 0.5))); grid c = g; c.move(m); return c; } /* grid group_square::center(const grid &g) const { coords m = -g.get_c0() + make_coords(-g.get_cols() / 2, -g.get_rows() / 2, 0); grid c = g; c.move(m); return c; } */ std::vector group_square::check_lines(grid &g, int n) const { std::vector filled; for (int i=0; i &g, int n, int color) const { for (int i=0; i &g, int n) const { for (int i=n; i>=0; --i) for (int j=0; j 0) ? g.get(c + make_coords(0, -1)) : 0)); } } Gdk::Rectangle group_square::block_size(const grid &b, int size) const { return Gdk::Rectangle(b.get_x0() * size, b.get_y0() * size, b.get_cols() * size, b.get_rows() * size); } Gdk::Rectangle group_square::board_size(int size, int rows, int cols, int layers) const { return Gdk::Rectangle(-(cols + 2) / 2 * size, 0, (cols + 2) * size, (rows + 1) * size); } void group_square::draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); context->rectangle(c.x * size + margin, c.y * size + margin, size - 2.0 * margin, size - 2.0 * margin); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 0.8); context->fill_preserve(); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 1.0); context->stroke(); } void group_square::draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); context->rectangle(c.x * size + margin, c.y * size + margin, size - 2.0 * margin, size - 2.0 * margin); const double dark = 0.8; context->set_source_rgba(color.get_red() * dark, color.get_green() * dark, color.get_blue() * dark, 1.0); context->stroke(); } void group_square::draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const { const double width = 2.0, margin = (width + 1.0) * 0.5; context->set_line_width(width); int left = -cols / 2, right = left + cols, bottom = rows; // left side context->move_to(left * size - margin, 0.0); context->line_to(left * size - margin, bottom * size + margin); // bottom context->line_to(right * size + margin, bottom * size + margin); // right side context->line_to(right * size + margin, 0.0); // clear inside context->set_source_rgba(0.0, 0.0, 0.0, 1.0); context->fill_preserve(); // draw outline context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->stroke(); } unsigned group_square_mirror::rotate(unsigned n, unsigned m) const { const unsigned r[] = { 1, 2, 3, 0, 7, 4, 5, 6, }; return r[n % size()]; } unsigned group_square_mirror::reflect(unsigned n) const { const unsigned r[] = { 4, 5, 6, 7, 0, 1, 2, 3, }; return r[n % size()]; } grid group_square_mirror::transform(const grid &g, unsigned n) const { // transformation matrix coefficients const int xx[] = { 1, 0, -1, 0, -1, 0, 1, 0, }; const int xy[] = { 0, -1, 0, 1, 0, -1, 0, 1, }; const int yx[] = { 0, 1, 0, -1, 0, -1, 0, 1, }; const int yy[] = { 1, 0, -1, 0, 1, 0, -1, 0, }; n = n % size(); grid t; for (int i=0; i. */ #ifndef __HEXAGON_ #define __HEXAGON_ #include #include #include "grid.h" #include "group.h" class group_hexagon : public group_2d { private: virtual unsigned size() const { return 6; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual int type(const coords &c) const { return ((c.x + c.y) % 2 == 0) ? 0 : -1; } virtual std::vector neighbors(const coords &c) const; virtual std::vector blockers(const coords &c) const { return std::vector(); } virtual grid transform(const grid &g, unsigned n) const; virtual grid center(const grid &g) const; public: virtual unsigned blockset_max() const { return 60; } // game virtual coords left(const coords &c) const { return c + make_coords(-1, (c.x % 2 == 0) ? 1 : -1); } virtual coords right(const coords &c) const { return c + make_coords(1, (c.x % 2 == 0) ? 1 : -1); } virtual coords down(const coords &c) const { return c + make_coords(0, 2); } virtual grid make_board(int width, int depth = 1) const { return grid(40, width, 1, -width / 2, 0, 0); } virtual std::vector check_lines(grid &g, int n) const; virtual void color_line(grid &g, int n, int c) const; virtual void remove_line(grid &g, int n) const; // drawing methods virtual Gdk::Rectangle block_size(const grid &b, int size) const; virtual Gdk::Rectangle board_size(int size, int rows, int cols, int layers) const; virtual void draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const; virtual void draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const; }; class group_hexagon_mirror : public group_hexagon { private: virtual unsigned size() const { return 12; } virtual unsigned rotate(unsigned n, unsigned m) const; virtual unsigned reflect(unsigned n) const; virtual grid transform(const grid &g, unsigned n) const; public: virtual unsigned blockset_max() const { return 40; } }; #endif /* __HEXAGON_ */ galois-0.7/src/area.cc0000644000175000017500000002373612565125650012466 0ustar ioio/* area.cc -- game widgets for falling blocks game. -*- C++ -*- Copyright (C) 2011-2014 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "area.h" #include "grid.h" #include "group.h" void BoardArea::draw_2d(Cairo::RefPtr context) { // draw board g->draw_board(context, cells->get_rows(), cells->get_cols(), 1, brick_size); // draw fallen bricks for (int i=0; iget_rows(); ++i) for (int j=0; jget_cols(); ++j) { coords c = cells->get_c0() + make_coords(j, i); int n = cells->get(c); if (n > 0) g->draw_brick(context, c, colors[n % ncolors], brick_size); } // draw shadow of active block for (int i=0; idraw_shadow(context, c, colors[iblock], brick_size); } // draw active block for (int i=0; idraw_brick(context, c, colors[iblock], brick_size); } } void BoardArea::draw_3d(Cairo::RefPtr context) { const group_3d *g3 = dynamic_cast(g); if (!g3) return; // draw board g->draw_board(context, cells->get_rows(), cells->get_cols(), cells->get_layers(), brick_size); // draw bottom planes first for (int i=cells->get_rows()-1; i>=0; --i) { // color each plane differently const int offset = 10; int n = (i + offset) % ncolors; // draw plane which frames block int y = cells->get_y0() + i; if (y == block.get_y0() + block.get_rows() / 2) g3->draw_plane(context, y, cells->get_cols(), cells->get_layers(), brick_size); for (int j=0; jget_layers(); ++j) for (int k=0; kget_cols(); ++k) { // draw fallen bricks coords c = cells->get_c0() + make_coords(k, i, j); int nn = cells->get(c); if (nn > 0) g->draw_brick(context, c, colors[n], brick_size); else if (nn < 0) g->draw_brick(context, c, colors[-nn % ncolors], brick_size); // draw shadow of active block if (shadow.is_in(c) && shadow.get(c)) g->draw_shadow(context, c, colors[n], brick_size); // draw active block if (block.is_in(c) && block.get(c)) g->draw_brick(context, c, colors[n], brick_size); } } // draw board g3->draw_board_front(context, cells->get_rows(), cells->get_cols(), cells->get_layers(), brick_size); } void BoardArea::draw_pause_message(Cairo::RefPtr context) { // center of board Gdk::Rectangle rectangle = g->board_size(brick_size, cells->get_rows(), cells->get_cols(), cells->get_layers()); int cx = rectangle.get_x() + rectangle.get_width() / 2, cy = rectangle.get_y() + rectangle.get_height() / 2; // text dimensions Glib::RefPtr layout1 = create_pango_layout("Game paused"), layout2 = create_pango_layout(Glib::ustring("Press ") + pause_key + " to resume"); Pango::Rectangle extent1 = layout1->get_line(0)->get_pixel_logical_extents(), extent2 = layout2->get_line(0)->get_pixel_logical_extents(); int w1 = (extent1.get_width() - extent1.get_lbearing()), w2 = (extent2.get_width() - extent2.get_lbearing()), h1 = extent1.get_height(), h2 = extent2.get_descent(), h3 = (extent1.get_descent() + extent2.get_height()); // draw with extra thickness and inverted color as background context->set_source_rgba(0.0, 0.0, 0.0, 1.0); context->set_line_width(4.0); context->move_to(cx - w1 / 2, cy + (h1 - h2 - h3) / 2); layout1->get_line(0)->add_to_cairo_context(context); context->move_to(cx - w2 / 2, cy + (h1 - h2 + h3) / 2); layout2->get_line(0)->add_to_cairo_context(context); context->stroke(); // draw as foreground context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->move_to(cx - w1 / 2, cy + (h1 - h2 - h3) / 2); layout1->get_line(0)->show_in_cairo_context(context); context->move_to(cx - w2 / 2, cy + (h1 - h2 + h3) / 2); layout2->get_line(0)->show_in_cairo_context(context); } void BoardArea::draw_game_over_message(Cairo::RefPtr context) { // text dimensions Glib::RefPtr layout = create_pango_layout("Game over"); Pango::Rectangle extent = layout->get_line(0)->get_pixel_logical_extents(); int w = (extent.get_width() - extent.get_lbearing()), h1 = extent.get_height(), h2 = extent.get_descent(); // center of board Gdk::Rectangle rectangle = g->board_size(brick_size, cells->get_rows(), cells->get_cols(), cells->get_layers()); int cx = (rectangle.get_x() + rectangle.get_width() / 2), cy = (rectangle.get_y() + rectangle.get_height() / 2); // draw large font, but make sure that it fits within board double scale = 2.0; if (w * scale > rectangle.get_width()) scale = rectangle.get_width() / w; context->scale(scale, scale); // draw with extra thickness and inverted color as background context->set_source_rgba(0.0, 0.0, 0.0, 1.0); context->set_line_width(5.0 / scale); context->move_to(cx / scale - w / 2, cy / scale + (h1 - h2) / 2); layout->get_line(0)->add_to_cairo_context(context); context->stroke(); // draw as foreground context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->move_to(cx / scale - w / 2, cy / scale + (h1 - h2) / 2); layout->get_line(0)->show_in_cairo_context(context); } bool BoardArea::on_draw(const Cairo::RefPtr &context) { if (!g || !cells) return true; Glib::RefPtr window = get_window(); if (!window) return false; // set largest brick size that fits within widget (must be even) for (brick_size=min_brick_size+2; brick_size<1000; brick_size+=2) { Gdk::Rectangle rectangle = g->board_size(brick_size, cells->get_rows(), cells->get_cols(), cells->get_layers()); if (rectangle.get_width() > get_width() || rectangle.get_height() > get_height()) break; } brick_size -= 2; // set coordinate system Gdk::Rectangle rectangle = g->board_size(brick_size, cells->get_rows(), cells->get_cols(), cells->get_layers()); // align to the right, top // offset by half pixel to create sharp edges context->translate(-rectangle.get_x() + get_width() - rectangle.get_width() + 0.5, -rectangle.get_y() + 0.5); // draw things if (g->is_3d()) draw_3d(context); else draw_2d(context); if (pause) draw_pause_message(context); if (over) draw_game_over_message(context); return true; } void BoardArea::start_game(const group *gg, const grid *c, const grid &b, int i) { g = gg; cells = c; block = b; iblock = i % ncolors; pause = over = false; // set minimum widget size Gdk::Rectangle rectangle = g->board_size(min_brick_size, cells->get_rows(), cells->get_cols(), cells->get_layers()); set_size_request(rectangle.get_width(), rectangle.get_height()); } void BoardArea::set_block(const grid &b, const grid &s, int i) { block = b; iblock = i % ncolors; shadow = s; queue_draw(); } void NextArea::draw_2d(Cairo::RefPtr context) { for (int i=0; idraw_brick(context, c, colors[nblock], brick_size); } } void NextArea::draw_3d(Cairo::RefPtr context) { // draw bottom planes first for (int i=block.get_rows()-1; i>=0; --i) { // color each plane differently const int offset = 10; int n = (i + offset) % ncolors; for (int j=0; jdraw_brick(context, c, colors[n], brick_size); } } } bool NextArea::on_draw(const Cairo::RefPtr &context) { if (!g) return true; Glib::RefPtr window = get_window(); if (!window) return false; // set brick size if (b) brick_size = b->get_brick_size(); else brick_size = min_brick_size; // draw background context->set_source_rgb(0.0, 0.0, 0.0); context->rectangle(0, 0, width * brick_size, height * brick_size); context->fill(); // set coordinate system // offset by half pixel to create sharp edges Gdk::Rectangle rectangle = g->block_size(block, brick_size); context->translate (-rectangle.get_x() + (width * brick_size - rectangle.get_width()) / 2 + 0.5, -rectangle.get_y() + (height * brick_size - rectangle.get_height()) / 2 + 0.5); // draw block if (g->is_3d()) draw_3d(context); else draw_2d(context); return true; } void NextArea::set_block(const grid &b, int n) { block = b; nblock = n % ncolors; // increase widget size if needed Gdk::Rectangle rectangle = g->block_size(block, min_brick_size); if (rectangle.get_width() > width * min_brick_size || rectangle.get_height() > height * min_brick_size) { int w = static_cast(std::ceil(double(rectangle.get_width()) / min_brick_size)), h = static_cast(std::ceil(double(rectangle.get_height()) / min_brick_size)); if (width < w) width = w; if (height < h) height = h; set_size_request(width * min_brick_size, height * min_brick_size); } queue_draw(); } galois-0.7/src/scores.cc0000644000175000017500000004401713221541076013041 0ustar ioio/* scores.cc -- preferences dialog for falling blocks game. -*- C++ -*- Copyright (C) 2012-2017 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "scores.h" bool ScoresDialog::pass(const std::vector::const_iterator &i) const { // get current filters int geometry = geometry_combo.get_active_row_number(), mode1 = mode1_combo.get_active_row_number(); bool reflect_flag = reflect_check.get_active(), mode2_flag = mode2_check.get_active(), size_flag = size_check.get_active(), empty_flag = empty_check.get_active(); int reflection = reflect_combo.get_active_row_number(), mode2 = mode2_combo.get_active_row_number(), imax = imax_spin.get_value_as_int(), imin = imin_spin.get_value_as_int(), empty = empty_spin.get_value_as_int(); // apply filters if (geometry != 4 && i->geometry != geometry) return false; if (mode1 != 3 && i->mode1 != mode1) return false; if (reflect_flag && i->reflection != reflection) return false; if (mode2_flag && mode1 == 1 && i->mode2 != mode2) return false; if (size_flag && i->imax != imax) return false; if (size_flag && i->imin != imin) return false; if (empty_flag && i->empty != empty) return false; // passed all filters return true; } void ScoresDialog::make_list(int active) { list->clear(); active_game = active; active_row = -1; visible_rows = 0; const int max_rows = 10; for (std::vector::const_iterator i=games.begin(); i!=games.end(); ++i) { if (!pass(i)) continue; Gtk::TreeModel::Row row = *(list->append()); row[columns.name] = i->name; row[columns.score] = i->score; row[columns.lines] = i->lines; row[columns.level] = i->level; row[columns.speed] = i->speed; row[columns.bmax] = i->bmax; row[columns.bmin] = i->bmin; row[columns.bsuper] = i->bsuper; if (i - games.begin() == active_game) { active_row = visible_rows; row[columns.editable] = true; } else row[columns.editable] = false; if (++visible_rows == max_rows) break; } } void ScoresDialog::on_hide() { show_button.set_active(false); make_list(); Gtk::Dialog::on_hide(); } bool ScoresDialog::on_delete_event(GdkEventAny *event) { show_button.set_active(false); make_list(); return Gtk::Dialog::on_delete_event(event); } bool ScoresDialog::on_draw(const Cairo::RefPtr &context) { // request minimal space const int min_w = 300, min_h = 100; Gdk::Rectangle rectangle; tree.get_cell_area(Gtk::TreeModel::Path("0"), *tree.get_column(0), rectangle); // some more space for headers and scrollbar int h = (rectangle.get_height() + 6) * (visible_rows + 1) + 6, w = min_w; if (h < min_h) h = min_h; int x, y; scroll.get_size_request(x, y); if (w < x) w = x; if (h != y || w != x) scroll.set_size_request(w, h); // set active row (the first time) if (active_row >= 0) { set_focus(tree); Gtk::TreeModel::iterator iter = list->children().begin(); for (int i=0; iget_path(iter), *tree.get_column(0), true); active_row = -1; } // base widget event handler return Gtk::Dialog::on_draw(context); } void ScoresDialog::on_cell_edited(const Glib::ustring &path, const Glib::ustring &name) { games[active_game].name = name; save(); } void ScoresDialog::on_show_button_signal_toggled() { if (show_button.get_active()) { check_button.show(); filters_box.show(); } else { check_button.hide(); filters_box.hide(); resize(get_width(), 1); } } void ScoresDialog::on_check_button_signal_clicked() { if (reflect_check.get_active() && mode2_check.get_active() && size_check.get_active() && empty_check.get_active()) { reflect_check.set_active(false); mode2_check.set_active(false); size_check.set_active(false); empty_check.set_active(false); } else { reflect_check.set_active(true); mode2_check.set_active(true); size_check.set_active(true); empty_check.set_active(true); } } void ScoresDialog::on_imax_spin_signal_value_changed() { int imax = imax_spin.get_value_as_int(); imin_spin.get_adjustment()->set_upper(imax); if (imin_spin.get_value_as_int() > imax) imin_spin.set_value(imax); make_list(-1); } ScoresDialog::ScoresDialog(Gtk::Window &parent) : Gtk::Dialog("Scores", parent, true), // modal dialog geometry_label("", Gtk::ALIGN_START), mode1_label("", Gtk::ALIGN_START), buttons_box(Gtk::ORIENTATION_HORIZONTAL), filters_box(Gtk::ORIENTATION_VERTICAL), reflect_box(Gtk::ORIENTATION_HORIZONTAL), mode2_box(Gtk::ORIENTATION_HORIZONTAL), size_box(Gtk::ORIENTATION_HORIZONTAL), empty_box(Gtk::ORIENTATION_HORIZONTAL), active_game(-1), active_row(-1) { get_vbox()->set_spacing(6); // filters get_vbox()->pack_start(grid, Gtk::PACK_SHRINK); grid.set_margin_start(4); grid.set_column_spacing(6); grid.attach(geometry_label, 0, 0, 1, 1); geometry_label.set_label("Brick shape:"); grid.attach(geometry_combo, 1, 0, 1, 1); geometry_combo.set_hexpand(); geometry_combo.append("square"); geometry_combo.append("hexagonal"); geometry_combo.append("triangular"); geometry_combo.append("cubic"); geometry_combo.append(""); geometry_combo.set_active(0); geometry_combo.signal_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); grid.attach(mode1_label, 0, 1, 1, 1); mode1_label.set_label("Level change:"); grid.attach(mode1_combo, 1, 1, 1, 1); mode1_combo.set_hexpand(); mode1_combo.append("speed"); mode1_combo.append("block size"); mode1_combo.append("superblock size"); mode1_combo.append(""); mode1_combo.set_active(0); mode1_combo.signal_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); get_vbox()->pack_start(buttons_box, Gtk::PACK_SHRINK); buttons_box.set_spacing(6); buttons_box.pack_start(show_button, Gtk::PACK_SHRINK); show_button.set_label("Show all filters"); show_button.signal_toggled().connect (sigc::mem_fun(*this, &ScoresDialog::on_show_button_signal_toggled)); buttons_box.pack_start(check_button, Gtk::PACK_SHRINK); check_button.set_label("Check/uncheck filters"); check_button.signal_clicked().connect (sigc::mem_fun(*this, &ScoresDialog::on_check_button_signal_clicked)); get_vbox()->pack_start(filters_box, Gtk::PACK_SHRINK); filters_box.set_homogeneous(true); filters_box.pack_start(reflect_box); reflect_box.set_spacing(6); reflect_box.pack_start(reflect_check, Gtk::PACK_SHRINK); reflect_check.signal_toggled().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); reflect_box.pack_start(reflect_label, Gtk::PACK_SHRINK); reflect_label.set_label("Allow block reflection:"); reflect_box.pack_start(reflect_combo, Gtk::PACK_SHRINK); reflect_combo.append("no"); reflect_combo.append("yes"); reflect_combo.set_active(0); reflect_combo.signal_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); filters_box.pack_start(mode2_box); mode2_box.set_spacing(6); mode2_box.pack_start(mode2_check, Gtk::PACK_SHRINK); mode2_check.signal_toggled().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); mode2_box.pack_start(mode2_label1, Gtk::PACK_SHRINK); mode2_label1.set_label("On level change:"); mode2_box.pack_start(mode2_combo, Gtk::PACK_SHRINK); mode2_combo.append("decrease"); mode2_combo.append("keep fixed"); mode2_combo.append("increase"); mode2_combo.set_active(0); mode2_combo.signal_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); mode2_box.pack_start(mode2_label2, Gtk::PACK_SHRINK); mode2_label2.set_label("min. block size"); filters_box.pack_start(size_box); size_box.set_spacing(6); size_box.pack_start(size_check, Gtk::PACK_SHRINK); size_check.signal_toggled().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); size_box.pack_start(imax_label, Gtk::PACK_SHRINK); imax_label.set_label("Initial block size: max"); size_box.pack_start(imax_spin, Gtk::PACK_SHRINK); imax_spin.set_adjustment(Gtk::Adjustment::create(4, 4, 8)); imax_spin.signal_value_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_imax_spin_signal_value_changed)); size_box.pack_start(imin_label, Gtk::PACK_SHRINK); imin_label.set_label("min"); size_box.pack_start(imin_spin, Gtk::PACK_SHRINK); imin_spin.set_adjustment(Gtk::Adjustment::create(4, 2, 4)); imin_spin.signal_value_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); filters_box.pack_start(empty_box); empty_box.set_spacing(6); empty_box.pack_start(empty_check, Gtk::PACK_SHRINK); empty_check.signal_toggled().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); empty_box.pack_start(empty_label1, Gtk::PACK_SHRINK); empty_label1.set_label("Remove lines with"); empty_box.pack_start(empty_spin, Gtk::PACK_SHRINK); empty_spin.set_adjustment(Gtk::Adjustment::create(0, 0, 2)); empty_spin.signal_value_changed().connect (sigc::mem_fun(*this, &ScoresDialog::on_filter_changed)); empty_box.pack_start(empty_label2, Gtk::PACK_SHRINK); empty_label2.set_label("empty cells"); // board get_vbox()->pack_start(scroll); scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); scroll.add(tree); list = Gtk::ListStore::create(columns); tree.set_model(list); tree.append_column_editable("Name", columns.name); tree.append_column("Score", columns.score); tree.append_column("Lines", columns.lines); tree.append_column("Level", columns.level); tree.append_column("Speed", columns.speed); tree.append_column("Max s.", columns.bmax); tree.append_column("Min s.", columns.bmin); tree.append_column("Super s.", columns.bsuper); tree.get_column(0)->add_attribute(*tree.get_column_cell_renderer(0), "editable", columns.editable); dynamic_cast (tree.get_column_cell_renderer(0))->signal_edited().connect (sigc::mem_fun(*this, &ScoresDialog::on_cell_edited)); // close button add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_DELETE_EVENT); load(); get_vbox()->show_all_children(); check_button.hide(); filters_box.hide(); } void ScoresDialog::add(const Glib::ustring &name, double time, int score, int lines, int level, int speed, int bmax, int bmin, int bsuper, int geometry, bool reflection, int width, int depth, int mode1, int mode2, int ispeed, int imax, int imin, int empty, bool next, bool land) { // set filters filter(geometry, reflection, width, depth, mode1, mode2, ispeed, imax, imin, empty, next, land); // don't use an iterator as the loop index // because I'm not sure it would still point to the correct place // after an insert or erase unsigned pos = 0, top = 0; int added = -1; // skip scores greater than this, count those which pass the filters for (; pos 10) { games.erase(games.begin() + pos); --pos; } // write to file if anything changed if (added >= 0 || top > 10) save(); // show make_list(added); } void ScoresDialog::filter(int geometry, bool reflection, int width, int depth, int mode1, int mode2, int ispeed, int imax, int imin, int empty, bool next, bool land) { set_geometry(geometry); set_mode1(mode1); reflect_check.set_active(); set_reflection(reflection); mode2_check.set_active(); set_mode2(mode2); size_check.set_active(); set_imax(imax); set_imin(imin); empty_check.set_active(); set_empty(empty); } bool ScoresDialog::load() { try { // open file Glib::ustring file = // Debian 6.0 hasn't the three-arguments version // keep supporting it for now Glib::build_filename(Glib::build_filename(Glib::get_user_data_dir(), "galois"), "galois.res"); xmlpp::TextReader *reader = new xmlpp::TextReader(file); reader->read(); // skip whitespace and comments while (reader->get_node_type() == xmlpp::TextReader::SignificantWhitespace || reader->get_node_type() == xmlpp::TextReader::Comment) reader->read(); // document node if (reader->get_node_type() != xmlpp::TextReader::Element || reader->get_name() != "galois_scores") return false; // read game nodes std::vector v; for (;;) { reader->read(); // skip whitespace and comments while (reader->get_node_type() == xmlpp::TextReader::SignificantWhitespace || reader->get_node_type() == xmlpp::TextReader::Comment) reader->read(); // end of document node if (reader->get_node_type() == xmlpp::TextReader::EndElement && reader->get_name() == "galois_scores") break; if (reader->get_node_type() != xmlpp::TextReader::Element || reader->get_name() != "game") return false; // read attributes, store game game g = make_game(); if (reader->has_attributes()) { reader->move_to_first_attribute(); do { if (reader->get_name() == "name") g.name = reader->get_value(); else if (reader->get_name() == "time") g.time = std::atof(reader->get_value().c_str()); else if (reader->get_name() == "score") g.score = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "lines") g.lines = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "level") g.level = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "speed") g.speed = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "bmax") g.bmax = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "bmin") g.bmin = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "bsuper") g.bsuper = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "geometry") g.geometry = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "reflection") g.reflection = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "width") g.width = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "depth") g.depth = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "mode1") g.mode1 = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "mode2") g.mode2 = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "ispeed") g.ispeed = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "imax") g.imax = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "imin") g.imin = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "empty") g.empty = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "next") g.next = std::atoi(reader->get_value().c_str()); else if (reader->get_name() == "land") g.land = std::atoi(reader->get_value().c_str()); } while (reader->move_to_next_attribute()); } v.push_back(g); } // file was parsed successfully games = v; make_list(); return true; } catch (const std::exception &e) { } return false; } bool ScoresDialog::save() const { // open file, create directory if doesn't exist Glib::ustring dir = Glib::build_filename(Glib::get_user_data_dir(), "galois"), file = Glib::build_filename(dir, "galois.res"); g_mkdir_with_parents(dir.c_str(), 0755); std::ofstream os(file.c_str()); // xml header os << "" << std::endl; // document node os << "" << std::endl; // games for (std::vector::const_iterator i=games.begin(); i!=games.end() && os.good(); ++i) os << " name << "\"" << std::fixed << " time=\"" << i->time << "\"" << " score=\"" << i->score << "\"" << " lines=\"" << i->lines << "\"" << " level=\"" << i->level << "\"" << " speed=\"" << i->speed << "\"" << " bmax=\"" << i->bmax << "\"" << " bmin=\"" << i->bmin << "\"" << " bsuper=\"" << i->bsuper << "\"" << " geometry=\"" << i->geometry << "\"" << " reflection=\"" << i->reflection << "\"" << " width=\"" << i->width << "\"" << " depth=\"" << i->depth << "\"" << " mode1=\"" << i->mode1 << "\"" << " mode2=\"" << i->mode2 << "\"" << " ispeed=\"" << i->ispeed << "\"" << " imax=\"" << i->imax << "\"" << " imin=\"" << i->imin << "\"" << " empty=\"" << i->empty << "\"" << " next=\"" << i->next << "\"" << " land=\"" << i->land << "\"" << " />" << std::endl; // close document node os << "" << std::endl; return os.good(); } galois-0.7/src/board.h0000644000175000017500000000611713637670160012503 0ustar ioio/* board.h -- game board for falling blocks game. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __BOARD_ #define __BOARD_ #include #include #include #include "grid.h" #include "group.h" class game_board { private: // game elements const group *g; grid cells; std::vector blocks; std::vector series; // how many blocks for each size // blockset generation std::thread *worker; std::mutex mutex; bool stop_blockset; // whether game is active bool game; // game options int mode1, mode2; int empty; // counters int bmin, bmax, bsuper, bsize, isuper, nsuper; int level, speed, lines, score; std::vector filled; // falling block block fblock; int findex, fshape; coords pos; // next block block nblock; int nsize, nindex, nshape; bool fits(const block &b, int s, coords c) const; bool fits_b(const block &b, int s, coords c) const; coords move_in(const block &b, int s, coords c) const; void first_block(); void land_block(); void next_level(); void next_blockset(); void start_blockset(); void end_blockset(); int score_block() const; int score_lines(int lines) const; public: game_board() : g(0), worker(0), game(false) { } ~game_board(); // read-only access to internals const group *get_group() const { return g; } const grid *get_cells() const { return &cells; } int get_index() const { return findex; } int get_next_index() const { return nindex; } grid get_block() const; const grid & get_next_block() const { return nblock.shape[nshape]; } bool is_game() const { return game; } int get_mode1() const { return mode1; } int get_bmin() const { return bmin; } int get_bmax() const { return bmax; } int get_bsuper() const { return bsuper; } int get_level() const { return level; } int get_speed() const { return speed; } int get_lines() const { return lines; } int get_score() const { return score; } const std::vector get_filled() const { return filled; } grid get_shadow(); // start new game void start_game(const group *gg, int w, int d, int mode1, int mode2, int s, int min, int max, int e); // block moves bool rotate(int n); bool reflect(); bool left(); bool right(); bool front(); bool back(); bool down(); bool drop(); // actions void color_lines(int c); void remove_lines(); void next_block(); void stop(); }; #endif /* __BOARD_ */ galois-0.7/src/cube.cc0000644000175000017500000003542013642111070012451 0ustar ioio/* cube.cc -- spatial groups for cubic bricks. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "grid.h" #include "group.h" #include "cube.h" unsigned group_cube::rotate(unsigned n, unsigned m) const { const unsigned r0[] = { 16, 8, 4, 12, 20, 13, 0, 11, 21, 5, 3, 19, 23, 17, 1, 7, 22, 9, 2, 15, 18, 14, 6, 10, }; const unsigned r1[] = { 11, 7, 15, 19, 12, 3, 10, 23, 4, 2, 18, 20, 16, 0, 6, 22, 8, 1, 14, 21, 13, 5, 9, 17, }; const unsigned r2[] = { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12, 17, 18, 19, 16, 21, 22, 23, 20, }; n = n % size(); switch (m % 3) { case 0: return r0[n]; case 1: return r1[n]; case 2: return r2[n]; default: return n; // suppress warning } } unsigned group_cube::reflect(unsigned n) const { return n % size(); } std::vector group_cube::neighbors(const coords &c) const { std::vector v; v.push_back(c + make_coords(0, -1, 0)); v.push_back(c + make_coords(-1, 0, 0)); v.push_back(c + make_coords(0, 0, -1)); v.push_back(c + make_coords(0, 0, 1)); v.push_back(c + make_coords(1, 0, 0)); v.push_back(c + make_coords(0, 1, 0)); return v; } grid group_cube::transform(const grid &g, unsigned n) const { // rotation matrix coefficients const int xx[] = { 1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 1, 0, -1, 0, }; const int xy[] = { 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 1, }; const int xz[] = { 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, }; const int yx[] = { 0, 1, 0, -1, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, }; const int yy[] = { 1, 0, -1, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 0, }; const int yz[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, }; const int zx[] = { 0, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 0, 0, }; const int zy[] = { 0, 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0, 0, }; const int zz[] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, }; n = n % size(); grid t; for (int i=0; i group_cube::center(const grid &g) const { // find center of mass coords s = make_coords(), m = make_coords(); int n = 0; for (int i=0; i 0) m = make_coords(-static_cast(std::floor(double(s.x) / n + 0.5)), -static_cast(std::floor(double(s.y) / n + 0.5)), -static_cast(std::floor(double(s.z) / n + 0.5))); grid c = g; c.move(m); return c; } std::vector group_cube::check_lines(grid &g, int n) const { std::vector filled; for (int i=0; i &g, int n, int color) const { for (int i=0; i &g, int n) const { for (int i=n; i>=0; --i) for (int j=0; j 0) ? g.get(c + make_coords(0, -1, 0)) : 0)); } } Gdk::Rectangle group_cube::block_size(const grid &b, int size) const { int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; return Gdk::Rectangle (b.get_x0() * size + b.get_y0() * offset1, (1 - b.get_layers() - b.get_z0()) * size + b.get_y0() * offset2, b.get_cols() * size + (b.get_rows() - 0) * offset1, b.get_layers() * size + (b.get_rows() - 0) * offset2); } Gdk::Rectangle group_cube::board_size(int size, int rows, int cols, int layers) const { int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; return Gdk::Rectangle(-(cols + 2) / 2 * size, -(layers - 1) / 2 * size, (cols + 2) * size + (rows - 1) * offset1, (layers + 1) * size + (rows - 1) * offset2); } void group_cube::draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; context->move_to(c.x * size + c.y * offset1 + margin, -c.z * size + c.y * offset2 + margin); context->line_to(c.x * size + c.y * offset1 + margin, (1 - c.z) * size + c.y * offset2 - margin); context->line_to(c.x * size + (c.y + 1) * offset1 + margin - 1, (1 - c.z) * size + (c.y + 1) * offset2 - margin - 1); context->line_to((c.x + 1) * size + (c.y + 1) * offset1 - margin - 1, (1 - c.z) * size + (c.y + 1) * offset2 - margin - 1); context->line_to((c.x + 1) * size + (c.y + 1) * offset1 - margin - 1, -c.z * size + (c.y + 1) * offset2 + margin - 1); context->line_to((c.x + 1) * size + c.y * offset1 - margin, -c.z * size + c.y * offset2 + margin); context->close_path(); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 0.8); context->fill(); context->rectangle(c.x * size + c.y * offset1 + margin, -c.z * size + c.y * offset2 + margin, size - 2.0 * margin, size - 2.0 * margin); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 1.0); context->stroke(); } void group_cube::draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; context->rectangle(c.x * size + (c.y + 1) * offset1 - margin, -c.z * size + (c.y + 1) * offset2 - margin, size - 2.0 * margin, size - 2.0 * margin); const double back = 0.8; context->set_source_rgba(color.get_red() * back, color.get_green() * back, color.get_blue() * back, 1.0); context->stroke(); context->rectangle(c.x * size + c.y * offset1 + margin, -c.z * size + c.y * offset2 + margin, size - 2.0 * margin, size - 2.0 * margin); const double front = 0.9; context->set_source_rgba(color.get_red() * front, color.get_green() * front, color.get_blue() * front, 1.0); context->stroke(); } void group_cube::draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const { const double width = 2.0, margin = (width + 1.0) * 0.5; context->set_line_width(width); int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; int left = -cols / 2, right = left + cols, bottom = rows, front = -layers / 2, back = front + layers; // left side context->move_to(left * size - (layers * size + margin) * offset1 / offset2, (1 - back) * size); // front side context->line_to(left * size + bottom * offset1, (1 - front) * size + bottom * offset2 + margin); context->line_to(right * size + bottom * offset1 + margin, (1 - front) * size + bottom * offset2 + margin); // right side context->line_to(right * size + bottom * offset1 + margin, (1 - back) * size + bottom * offset2); // back side context->line_to(right * size + margin, (1 - back) * size); // clear inside context->set_source_rgba(0.0, 0.0, 0.0, 1.0); context->fill_preserve(); // add other edges // base rectangle context->move_to(left * size + bottom * offset1, (1 - front) * size + bottom * offset2 + margin); context->line_to(left * size + bottom * offset1, (1 - back) * size + bottom * offset2); context->line_to(right * size + bottom * offset1 + margin, (1 - back) * size + bottom * offset2); // side edge context->move_to(left * size, (1 - back) * size); context->line_to(left * size + bottom * offset1, (1 - back) * size + bottom * offset2); // draw outline context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->stroke(); } void group_cube::draw_board_front(Cairo::RefPtr context, int rows, int cols, int layers, int size) const { const double width = 2.0, margin = (width + 1.0) * 0.5; context->set_line_width(width); int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; int left = -cols / 2, right = left + cols, bottom = rows, front = -layers / 2, back = front + layers; // front edge context->move_to(right * size + margin - (layers * size + margin) * offset1 / offset2, (1 - back) * size); context->line_to(right * size + bottom * offset1 + margin, (1 - front) * size + bottom * offset2 + margin); context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->stroke(); } void group_cube::draw_plane(Cairo::RefPtr context, int y, int cols, int layers, int size) const { const double width = 2.0, margin = (width + 1.0) * 0.5; context->set_line_width(width); int offset1 = (size - 1) / 4, offset2 = (size - 1) / 3; int left = -cols / 2, front = -layers / 2, back = front + layers; context->rectangle(left * size + y * offset1 + offset1 / 2, (1 - back) * size + y * offset2 + offset2 / 2, cols * size + margin, layers * size + margin); context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->stroke(); } unsigned group_cube_mirror::rotate(unsigned n, unsigned m) const { const unsigned r0[] = { 16, 8, 4, 12, 20, 13, 0, 11, 21, 5, 3, 19, 23, 17, 1, 7, 22, 9, 2, 15, 18, 14, 6, 10, 30, 38, 42, 34, 26, 33, 46, 39, 25, 41, 47, 31, 27, 29, 45, 43, 24, 37, 44, 35, 28, 32, 40, 36, }; const unsigned r1[] = { 11, 7, 15, 19, 12, 3, 10, 23, 4, 2, 18, 20, 16, 0, 6, 22, 8, 1, 14, 21, 13, 5, 9, 17, 35, 31, 39, 43, 36, 27, 34, 47, 28, 26, 42, 44, 40, 24, 30, 46, 32, 25, 38, 45, 37, 29, 33, 41, }; const unsigned r2[] = { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12, 17, 18, 19, 16, 21, 22, 23, 20, 27, 24, 25, 26, 31, 28, 29, 30, 35, 32, 33, 34, 39, 36, 37, 38, 43, 40, 41, 42, 47, 44, 45, 46, }; n = n % size(); switch (m % 3) { case 0: return r0[n]; case 1: return r1[n]; case 2: return r2[n]; default: return n; // suppress warning } } unsigned group_cube_mirror::reflect(unsigned n) const { const unsigned r[] = { 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, }; return r[n % size()]; } grid group_cube_mirror::transform(const grid &g, unsigned n) const { // rotation matrix coefficients const int xx[] = { 1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0, }; const int xy[] = { 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 1, }; const int xz[] = { 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, }; const int yx[] = { 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, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, }; const int yy[] = { 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, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 0, }; const int yz[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, }; const int zx[] = { 0, 0, 0, 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, 0, 0, 0, 0, }; const int zy[] = { 0, 0, 0, 0, 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, 0, 0, 0, }; const int zz[] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, }; n = n % size(); grid t; for (int i=0; i. */ #ifndef __GROUP_ #define __GROUP_ #include #include #include "grid.h" struct block { std::vector > shape, blocker; std::vector rotate, reflect; }; // virtual base class class group { // abstract interface private: // define symmetry group, translations etc. virtual unsigned size() const = 0; virtual unsigned rotations() const = 0; virtual unsigned rotate(unsigned n, unsigned m) const = 0; virtual unsigned reflect(unsigned n) const = 0; virtual int type(const coords &c) const = 0; virtual std::vector neighbors(const coords &c) const = 0; virtual std::vector blockers(const coords &c) const = 0; virtual grid transform(const grid &g, unsigned n) const = 0; virtual grid center(const grid &g) const = 0; public: virtual bool is_3d() const = 0; virtual unsigned blockset_max() const = 0; // values determined empirically // game virtual coords left(const coords &c) const = 0; virtual coords right(const coords &c) const = 0; virtual coords front(const coords &c) const = 0; virtual coords back(const coords &c) const = 0; virtual coords down(const coords &c) const = 0; virtual grid make_board(int width, int depth = 1) const = 0; virtual std::vector check_lines(grid &g, int n) const = 0; virtual void color_line(grid &g, int n, int color) const = 0; virtual void remove_line(grid &g, int n) const = 0; // drawing methods virtual Gdk::Rectangle block_size(const grid &b, int size) const = 0; virtual Gdk::Rectangle board_size(int size, int rows, int cols, int layers) const = 0; virtual void draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const = 0; virtual void draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const = 0; virtual void draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const = 0; virtual ~group() { } // generic methods private: grid augmentation_set(const grid &g) const; std::vector > augment_grid(const grid &g) const; grid blockers_set(const grid &g) const; block make_block(const grid &g) const; public: block block_zero() const; void augment_block(const block &b, std::vector &v, int x0 = 0, int z0 = 0, int cols = 1, int layers = 1) const; }; class group_2d : public group { private: virtual unsigned rotations() const { return 1; } virtual coords front(const coords &c) const { return c; } virtual coords back(const coords &c) const { return c; } public: virtual bool is_3d() const { return false; } }; class group_3d : public group { private: virtual unsigned rotations() const { return 3; } public: virtual bool is_3d() const { return true; } virtual void draw_board_front(Cairo::RefPtr context, int rows, int cols, int layers, int size) const = 0; virtual void draw_plane(Cairo::RefPtr context, int y, int cols, int layers, int size) const = 0; }; #endif /* __GROUP_ */ galois-0.7/src/main.cc0000644000175000017500000003753213720463161012475 0ustar ioio/* main.cc -- main window for falling blocks game. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "board.h" #include "cube.h" #include "group.h" #include "hexagon.h" #include "main.h" #include "preferences.h" #include "square.h" #include "triangle.h" bool MainWindow::on_key_press_event(GdkEventKey *event) { if (board.is_game()) { unsigned key = event->keyval; // pause if (key == (board.get_group()->is_3d() ? preferences.get_key_3d(9) : preferences.get_key_2d(5))) { if (pause) { pause = false; board_area.set_pause(false); // resume game timeout.disconnect(); delay = 1000 / board.get_speed(); timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &MainWindow::on_timeout_down), delay); } else { pause = true; board_area.set_pause(true); board_area.set_pause_key(gdk_keyval_name(key)); } } if (!pause && !drop && !animation) { bool refresh = false; if (board.get_group()->is_3d()) { // move in four directions, three rotations, one reflection if (key == preferences.get_key_3d(0)) refresh = board.left(); else if (key == preferences.get_key_3d(1)) refresh = board.right(); else if (key == preferences.get_key_3d(2)) refresh = board.back(); else if (key == preferences.get_key_3d(3)) refresh = board.front(); else if (key == preferences.get_key_3d(4)) refresh = board.rotate(0); else if (key == preferences.get_key_3d(5)) refresh = board.rotate(1); else if (key == preferences.get_key_3d(6)) refresh = board.rotate(2); else if (key == preferences.get_key_3d(7)) refresh = board.reflect(); else if (key == preferences.get_key_3d(8)) on_game_drop(); } else { // move in two directions, one rotation, one reflection if (key == preferences.get_key_2d(0)) refresh = board.left(); else if (key == preferences.get_key_2d(1)) refresh = board.right(); else if (key == preferences.get_key_2d(2)) refresh = board.rotate(0); else if (key == preferences.get_key_2d(3)) refresh = board.reflect(); else if (key == preferences.get_key_2d(4)) on_game_drop(); } if (refresh) board_area.set_block(board.get_block(), land ? board.get_shadow() : grid(), board.get_index()); } } Gtk::Window::on_key_press_event(event); // default handler return true; } void MainWindow::on_menu_new() { if (board.is_game()) return; // update actions status action_new->set_enabled(false); action_stop->set_enabled(true); action_prefs->set_enabled(false); action_scores->set_enabled(false); // select spatial group int geometry = preferences.get_geometry(); bool reflection = preferences.get_reflection(); const group *g = 0; switch (geometry) { case 0: if (reflection) g = new group_square_mirror; else g = new group_square; break; case 1: if (reflection) g = new group_hexagon_mirror; else g = new group_hexagon; break; case 2: if (reflection) g = new group_triangle_mirror; else g = new group_triangle; break; case 3: if (reflection) g = new group_cube_mirror; else g = new group_cube; break; } // board width int width = preferences.get_width(), depth = preferences.get_depth(); // level change mode int mode1 = preferences.get_mode1(), mode2 = preferences.get_mode2(); // speed level int speed = preferences.get_speed(); // number of bricks per block int bmax = preferences.get_bricks_max(), bmin = preferences.get_bricks_min(); // empty cells per line int empty = preferences.get_empty(); // preview next block next = preferences.get_next(); // show where block will land land = preferences.get_land(); // start game animation = 0; drop = pause = false; board.start_game(g, width, depth, mode1, mode2, speed, bmin, bmax, empty); board_area.start_game(g, board.get_cells(), board.get_block(), board.get_index()); next_area.set_group(g); if (next) next_area.set_block(board.get_next_block(), board.get_next_index()); else next_area.set_block(grid(), 0); // game statistics std::ostringstream o; o << "Level: " << board.get_level(); level_label.set_text(o.str()); lines_label.set_text("Lines: 0"); score_label.set_text("Score: 0"); // start timeout delay = 1000 / board.get_speed(); timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &MainWindow::on_timeout_down), delay); } void MainWindow::on_menu_stop() { if (!board.is_game()) return; board.stop(); board_area.set_pause(false); // set y to negative so that plane isn't drawn in 3D game board_area.set_block(grid(0, 0, 0, 0, -1, 0), grid(), 0); next_area.set_block(grid(), 0); // stop timeout timeout.disconnect(); // update actions status action_new->set_enabled(true); action_stop->set_enabled(false); action_prefs->set_enabled(true); action_scores->set_enabled(true); } void MainWindow::on_menu_prefs() { preferences.reset_page(); preferences.show(); } void MainWindow::on_menu_scores() { // I would place this in the constructor // if I could made sure that scores is initialized after preferences static bool first = true; if (first) { first = false; scores.filter(preferences.get_geometry(), preferences.get_reflection(), preferences.get_width(), preferences.get_depth(), preferences.get_mode1(), preferences.get_mode2(), preferences.get_speed(), preferences.get_bricks_max(), preferences.get_bricks_min(), preferences.get_empty(), preferences.get_next(), preferences.get_land()); } scores.show(); } void MainWindow::on_menu_quit() { on_menu_stop(); hide(); } void MainWindow::on_menu_help() { #if GTKMM_MINOR_VERSION >= 22 // launch help browser if (!gtk_show_uri_on_window(static_cast(this)->gobj(), "ghelp:galois", GDK_CURRENT_TIME, 0)) // fall back to html manual (requires network connection) gtk_show_uri_on_window(static_cast(this)->gobj(), "http://www.nongnu.org/galois/galois.html", GDK_CURRENT_TIME, 0); #else // launch help browser if (!gtk_show_uri(get_screen()->gobj(), "ghelp:galois", GDK_CURRENT_TIME, 0)) // fall back to html manual (requires network connection) gtk_show_uri(get_screen()->gobj(), "http://www.nongnu.org/galois/galois.html", GDK_CURRENT_TIME, 0); #endif } void MainWindow::on_menu_about() { Gtk::AboutDialog dialog; dialog.set_transient_for(*this); // don't show missing icon, I don't like how it looks dialog.set_logo(Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, true, 8, 1, 1)); dialog.set_program_name("Galois"); dialog.set_version("0.7"); dialog.set_comments("A falling blocks game with blocks of various shapes" " and sizes"); dialog.set_website("http://www.nongnu.org/galois/"); dialog.set_copyright("Copyright © 2011-2020 Gerardo Ballabio"); dialog.set_license ("Galois 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" "Galois is distributed in the hope that it will be useful, but\n" "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 Galois. If not, see ."); dialog.run(); } void MainWindow::on_response_prefs(int response_id) { if (response_id == Gtk::RESPONSE_DELETE_EVENT) preferences.hide(); } void MainWindow::on_response_scores(int response_id) { if (response_id == Gtk::RESPONSE_DELETE_EVENT) scores.hide(); } bool MainWindow::on_timeout_down() { if (pause) timeout.disconnect(); else if (!board.down()) on_game_next(); else board_area.set_block(board.get_block(), land ? board.get_shadow() : grid(), board.get_index()); return true; } bool MainWindow::on_timeout_drop() { if (!board.down()) { // switch timeout timeout.disconnect(); delay = 1000 / board.get_speed(); timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &MainWindow::on_timeout_down), delay); drop = false; on_game_next(); } else board_area.set_block(board.get_block(), land ? board.get_shadow() : grid(), board.get_index()); return true; } bool MainWindow::on_timeout_lines() { if (animation > 0) { board.color_lines(--animation); board_area.queue_draw(); return true; } // else board.remove_lines(); // update scores std::ostringstream o1, o2, o3; o1 << "Level: " << board.get_level(); level_label.set_text(o1.str()); o2 << "Lines: " << board.get_lines(); lines_label.set_text(o2.str()); o3 << "Score: " << board.get_score(); score_label.set_text(o3.str()); // continue game timeout.disconnect(); delay = 1000 / board.get_speed(); timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &MainWindow::on_timeout_down), delay); // new blocks board_area.set_block(board.get_block(), land ? board.get_shadow() : grid(), board.get_index()); if (next) next_area.set_block(board.get_next_block(), board.get_next_index()); // check for end of game if (!board.is_game()) on_game_over(); return true; } void MainWindow::on_game_drop() { if (!drop) { // switch timeout timeout.disconnect(); timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &MainWindow::on_timeout_drop), 10); drop = true; } } void MainWindow::on_game_next() { // update score std::ostringstream o; o << "Score: " << board.get_score(); score_label.set_text(o.str()); std::vector filled = board.get_filled(); if (filled.size() > 0) { // switch timeout timeout.disconnect(); timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &MainWindow::on_timeout_lines), 20); animation = ncolors; // refresh, but without active block board_area.set_block(grid(), grid(), 0); } else { // new blocks board.next_block(); board_area.set_block(board.get_block(), land ? board.get_shadow() : grid(), board.get_index()); if (next) next_area.set_block(board.get_next_block(), board.get_next_index()); // check for end of game if (!board.is_game()) on_game_over(); } } void MainWindow::on_game_over() { board_area.end_game(); next_area.set_block(grid(), 0); // stop timeout timeout.disconnect(); // register score Glib::ustring name = Glib::get_real_name(); if (name == "") name = Glib::get_user_name(); Glib::TimeVal timeval; timeval.assign_current_time(); double time = timeval.as_double(); scores.add(name, time, board.get_score(), board.get_lines(), board.get_level(), board.get_speed(), board.get_bmax(), board.get_bmin(), board.get_bsuper(), preferences.get_geometry(), preferences.get_reflection(), preferences.get_width(), preferences.get_depth(), preferences.get_mode1(), preferences.get_mode2(), preferences.get_speed(), preferences.get_bricks_max(), preferences.get_bricks_min(), preferences.get_empty(), preferences.get_next(), preferences.get_land()); if (scores.is_active()) scores.show(); // update actions status action_new->set_enabled(true); action_stop->set_enabled(false); action_prefs->set_enabled(true); action_scores->set_enabled(true); } MainWindow::MainWindow() : level_label("", 0.0, 0.0), lines_label("", 0.0, 0.0), score_label("", 0.0, 0.0), preferences(*this), scores(*this) { add(grid_all); // game elements grid_all.attach(board_area, 0, 0, 1, 4); board_area.set_hexpand(true); board_area.set_vexpand(true); grid_all.attach(next_area, 1, 0, 1, 1); next_area.set_hexpand(true); next_area.set_vexpand(true); next_area.set_board_area(&board_area); grid_all.attach(level_label, 1, 1, 1, 1); grid_all.attach(lines_label, 1, 2, 1, 1); grid_all.attach(score_label, 1, 3, 1, 1); score_label.set_vexpand(true); // connect signals preferences.signal_response().connect (sigc::mem_fun(*this, &MainWindow::on_response_prefs)); scores.signal_response().connect (sigc::mem_fun(*this, &MainWindow::on_response_scores)); } void MainWindow::on_startup(Glib::RefPtr &app) { // build application menu Glib::RefPtr menu = Gio::Menu::create(); action_new = add_action("new", sigc::mem_fun(*this, &MainWindow::on_menu_new)); app->set_accel_for_action("win.new", "n"); action_stop = add_action("stop", sigc::mem_fun(*this, &MainWindow::on_menu_stop)); Glib::RefPtr section1 = Gio::Menu::create(); section1->append("_New Game", "win.new"); section1->append("_Stop Game", "win.stop"); menu->append_section(section1); action_prefs = add_action("prefs", sigc::mem_fun(*this, &MainWindow::on_menu_prefs)); action_scores = add_action("scores", sigc::mem_fun(*this, &MainWindow::on_menu_scores)); Glib::RefPtr section2 = Gio::Menu::create(); section2->append("_Preferences", "win.prefs"); section2->append("_Scores", "win.scores"); menu->append_section(section2); add_action("help", sigc::mem_fun(*this, &MainWindow::on_menu_help)); app->set_accel_for_action("win.help", "F1"); add_action("about", sigc::mem_fun(*this, &MainWindow::on_menu_about)); add_action("quit", sigc::mem_fun(*this, &MainWindow::on_menu_quit)); app->set_accel_for_action("win.quit", "q"); Glib::RefPtr section3 = Gio::Menu::create(); section3->append("_Help", "win.help"); section3->append("_About", "win.about"); section3->append("_Quit", "win.quit"); menu->append_section(section3); // set initial actions status action_stop->set_enabled(false); if (app->prefers_app_menu()) app->set_app_menu(menu); // else { // application menu not supported, use menubar Glib::RefPtr menubar = Gio::Menu::create(); Glib::RefPtr game = Gio::Menu::create(); game->append("_New", "win.new"); game->append("_Stop", "win.stop"); game->append("_Preferences", "win.prefs"); game->append("_Scores", "win.scores"); game->append("_Quit", "win.quit"); menubar->append_submenu("_Game", game); Glib::RefPtr help = Gio::Menu::create(); help->append("_Contents", "win.help"); help->append("_About", "win.about"); menubar->append_submenu("_Help", help); app->set_menubar(menubar); } app->add_window(*this); show_all(); } int main(int argc, char *argv[]) { Glib::RefPtr app = Gtk::Application::create(argc, argv); MainWindow window; app->signal_startup().connect (sigc::bind &> (sigc::mem_fun(window, &MainWindow::on_startup), app)); return app->run(window); } galois-0.7/src/main.h0000644000175000017500000000424013637725621012336 0ustar ioio/* main.h -- main window for falling blocks game. -*- C++ -*- Copyright (C) 2011-2017 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __MAIN_ #define __MAIN_ #include #include "area.h" #include "board.h" #include "group.h" #include "preferences.h" #include "scores.h" class MainWindow : public Gtk::ApplicationWindow { private: // child widgets Gtk::Grid grid_all; ; BoardArea board_area; ; NextArea next_area; ; Gtk::Label level_label; ; Gtk::Label lines_label; ; Gtk::Label score_label; // standalone dialogs PrefsDialog preferences; ScoresDialog scores; // menu actions Glib::RefPtr action_new, action_stop, action_prefs, action_scores; // timeout sigc::connection timeout; int delay; // milliseconds int animation; bool drop, pause; // game logic game_board board; bool next, land; protected: virtual bool on_key_press_event(GdkEventKey *); virtual void on_menu_new(); virtual void on_menu_stop(); virtual void on_menu_prefs(); virtual void on_menu_scores(); virtual void on_menu_quit(); virtual void on_menu_help(); virtual void on_menu_about(); virtual void on_response_prefs(int response_id); virtual void on_response_scores(int response_id); virtual bool on_timeout_down(); virtual bool on_timeout_drop(); virtual bool on_timeout_lines(); virtual void on_game_drop(); virtual void on_game_next(); virtual void on_game_over(); public: MainWindow(); ~MainWindow() { } virtual void on_startup(Glib::RefPtr &app); }; #endif /* __MAIN_ */ galois-0.7/src/area.h0000644000175000017500000000637212566354761012335 0ustar ioio/* area.h -- game widgets for falling blocks game. -*- C++ -*- Copyright (C) 2011-2015 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 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 __AREA_ #define __AREA_ #include #include #include "grid.h" #include "group.h" const Gdk::RGBA colors[] = { Gdk::RGBA("#b0ff00"), // yellow-green Gdk::RGBA("#ffa0a0"), // pink Gdk::RGBA("#b060ff"), // violet Gdk::RGBA("#00ffb0"), // green-blue Gdk::RGBA("#ff40a0"), // purple-red Gdk::RGBA("#40a0ff"), // light blue Gdk::RGBA("#ffff00"), // yellow Gdk::RGBA("#00ff00"), // green Gdk::RGBA("#ff4040"), // red Gdk::RGBA("#00ffff"), // cyan Gdk::RGBA("#ff00ff"), // purple Gdk::RGBA("#ffa040"), // orange Gdk::RGBA("#8080ff"), // blue-violet Gdk::RGBA("#c08080"), // brown Gdk::RGBA("#b0b040"), // yellow-brown }; const int ncolors = sizeof(colors) / sizeof(colors[0]); const int min_brick_size = 24; class BoardArea : public Gtk::DrawingArea { private: const group *g; const grid *cells; grid block, shadow; int iblock; int brick_size; // unit of measure for drawing bool pause, over; Glib::ustring pause_key; void draw_2d(Cairo::RefPtr context); void draw_3d(Cairo::RefPtr context); void draw_pause_message(Cairo::RefPtr context); void draw_game_over_message(Cairo::RefPtr context); protected: virtual bool on_draw(const Cairo::RefPtr &context); public: BoardArea() : g(0), cells(0), brick_size(min_brick_size), pause(false), over(false) { set_size_request(brick_size * 12, brick_size * 21); } int get_brick_size() const { return brick_size; } void start_game(const group *gg, const grid *c, const grid &b, int i); void end_game() { over = true; queue_draw(); } void set_block(const grid &b, const grid &s, int i); void set_pause(bool p) { pause = p; queue_draw(); } void set_pause_key(const Glib::ustring &key) { pause_key = key; } }; class NextArea : public Gtk::DrawingArea { const group *g; grid block; int nblock; int brick_size; // unit of measure for drawing int width, height; const BoardArea *b; void draw_2d(Cairo::RefPtr context); void draw_3d(Cairo::RefPtr context); protected: virtual bool on_draw(const Cairo::RefPtr &context); public: NextArea() : g(0), brick_size(min_brick_size), width(4), height(4), b(0) { set_size_request(width * min_brick_size, height * min_brick_size); } void set_group(const group *gg) { g = gg; } void set_block(const grid &b, int n); void set_board_area(const BoardArea *bb) { b = bb; } }; #endif /* __AREA_ */ galois-0.7/src/group.cc0000644000175000017500000001072113642110737012675 0ustar ioio/* group.cc -- spatial groups for falling block game. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "grid.h" #include "group.h" grid group::augmentation_set(const grid &g) const { grid s; if (g.get_rows() == 0 || g.get_cols() == 0 || g.get_layers() == 0) { s.add(make_coords()); return s; } for (int i=0; i n = neighbors(c); for (std::vector::const_iterator l=n.begin(); l!=n.end(); ++l) if (!g.is_in(*l) || !g.get(*l)) s.add(*l); } } return s; } std::vector > group::augment_grid(const grid &g) const { std::vector > v; grid s = augmentation_set(g); for (int i=0; i t = g; t.add(c); v.push_back(center(t)); } } return v; } grid group::blockers_set(const grid &g) const { grid s; if (g.get_rows() == 0 || g.get_cols() == 0 || g.get_layers() == 0) { s.add(make_coords()); return s; } for (int i=0; i b = blockers(c); for (std::vector::const_iterator l=b.begin(); l!=b.end(); ++l) if (!g.is_in(*l) || !g.get(*l)) s.add(*l); } } return s; } block group::make_block(const grid &g) const { block b; // find symmetry subgroup for this block std::vector subgroup; for (unsigned i=0; i t = center(transform(g, i)); bool dup = false; for (std::vector >::const_iterator j=b.shape.begin(); j!=b.shape.end(); ++j) if (t == *j) { dup = true; subgroup.push_back(j - b.shape.begin()); break; } if (!dup) { b.shape.push_back(t); b.blocker.push_back(blockers_set(t)); subgroup.push_back(b.shape.size() - 1); } } // remap rotate and reflect onto subgroup for (std::vector::const_iterator i=subgroup.begin(); i!=subgroup.end(); ++i) if (*i == b.reflect.size()) { for (unsigned j=0; j()); b.blocker.push_back(grid()); for (unsigned i=0; i &v, int x0, int z0, int cols, int layers) const { std::vector > a = augment_grid(b.shape.front()); for (std::vector >::const_iterator i=a.begin(); i!=a.end(); ++i) { bool dup = false; for (std::vector::const_iterator j=v.begin(); j!=v.end(); ++j) for (std::vector >::const_iterator k=j->shape.begin(); k!=j->shape.end(); ++k) if (*i == *k) { dup = true; break; } if (!dup) { block b = make_block(*i); bool fits = true; if (cols > 1) { // check whether block fits within bounds for (std::vector >::const_iterator l=b.shape.begin(); l!=b.shape.end(); ++l) if (l->get_cols() > cols || l->get_layers() > layers) fits = false; } if (fits) v.push_back(b); } } } galois-0.7/src/board.cc0000644000175000017500000002507013643377525012646 0ustar ioio/* board.cc -- game board for falling blocks game. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "board.h" #include "grid.h" #include "group.h" #include #include bool game_board::fits(const block &b, int s, coords c) const { std::vector bricks = get_bricks(b.shape[s]); for (std::vector::const_iterator i=bricks.begin(); i!=bricks.end(); ++i) { coords n = c + *i; if (!cells.is_in(n) || cells.get(n)) return false; } return true; } bool game_board::fits_b(const block &b, int s, coords c) const { std::vector bricks = get_bricks(b.blocker[s]); for (std::vector::const_iterator i=bricks.begin(); i!=bricks.end(); ++i) { coords n = c + *i; if (!cells.is_in(n) || cells.get(n)) return false; } return true; } coords game_board::move_in(const block &b, int s, coords c) const { // move down if necessary while (b.shape[s].get_y0() + c.y < cells.get_y0()) c = g->down(c); // move right if necessary while (b.shape[s].get_x0() + c.x < cells.get_x0()) c = g->right(c); // move left if necessary while (b.shape[s].get_x0() + b.shape[s].get_cols() + c.x > cells.get_x0() + cells.get_cols()) c = g->left(c); // move back if necessary while (b.shape[s].get_z0() + c.z < cells.get_z0()) c = g->back(c); // move front if necessary while (b.shape[s].get_z0() + b.shape[s].get_layers() + c.z > cells.get_z0() + cells.get_layers()) c = g->front(c); return c; } void game_board::first_block() { nsize = bmax; // choose block nindex = rand() % series[nsize]; for (int i=0; i bricks = get_bricks(fblock.shape[fshape]); for (std::vector::const_iterator i=bricks.begin(); i!=bricks.end(); ++i) { coords n = pos + *i; cells.set(n, findex); } score += score_block(); // search for filled lines filled = g->check_lines(cells, empty); } void game_board::next_level() { // increment level ++level; switch (mode1) { case 0: // increase falling block speed speed = level; break; case 1: // increase maximum block size ++bmax; switch (mode2) { case 0: if (bmin > 1) --bmin; break; case 1: break; case 2: ++bmin; break; } start_blockset(); break; case 2: // increase superblock size ++bsuper; start_blockset(); break; } } void game_board::next_blockset() { if (blocks.size() == 0) { blocks.push_back(g->block_zero()); series.push_back(1); return; } // extract last blockset unsigned offset = blocks.size() - ((series.size() > 0) ? series.back() : 0); std::vector last(blocks.size() - offset); for (unsigned i=0; iblockset_max(), max2 = max1 * 5; if (max2 > last.size()) max2 = last.size(); if (max1 < last.size()) // randomize for (unsigned i=0; i i) std::swap(last[index], last[i]); } // generate and append new blockset std::vector v; for (unsigned i=0; iaugment_block(blocks[last[i]], v, cells.get_x0(), cells.get_z0(), cells.get_cols(), cells.get_layers()); // blocks, series may be reallocated // so this must be safeguarded to prevent the main thread from copying an // invalid block { // acquire lock std::lock_guard lock(mutex); blocks.insert(blocks.end(), v.begin(), v.end()); series.push_back(v.size()); // lock released at end of scope } } void game_board::start_blockset() { // stop worker if it hasn't already end_blockset(); // offload blockset generation to a separate thread stop_blockset = false; worker = new std::thread(&game_board::next_blockset, this); } void game_board::end_blockset() { // terminate blockset-generating thread stop_blockset = true; if (worker) { worker->join(); delete worker; worker = 0; } } int game_board::score_block() const { return (speed + bmax * 5 + bsuper) * (bmax + bmin - 5) / (1 + empty); } int game_board::score_lines(int lines) const { return score_block() * 20 * (1 << lines); } game_board::~game_board() { if (g) delete g; if (worker) { worker->join(); delete worker; worker = 0; } } grid game_board::get_block() const { grid g = fblock.shape[fshape]; g.move(pos); return g; } grid game_board::get_shadow() { // move block down until it lands coords c = pos; while (fits(fblock, fshape, g->down(c))) c = g->down(c); grid g = fblock.shape[fshape]; g.move(c); return g; } void game_board::start_game(const group *gg, int width, int depth, int m1, int m2, int s, int min, int max, int e) { if (game) return; // delete previous group, if any if (g) delete g; // initialize random numbers generator Glib::TimeVal timeval; timeval.assign_current_time(); std::srand(static_cast(timeval.as_double() * G_USEC_PER_SEC)); // set spatial group g = gg; // generate game board cells = g->make_board(width, depth); // generate block set std::vector v; blocks.resize(0); series.resize(0); stop_blockset = false; for (int i=0; i<=max; ++i) next_blockset(); if (min > max) min = max; bmin = min; bmax = nsize = nsuper = max; isuper = bsuper = 0; empty = e; // start game mode1 = m1; if (mode1 == 2) { bsuper = max + 1; next_blockset(); } mode2 = m2; speed = s; level = (mode1 == 0) ? speed : 1; lines = score = 0; filled.resize(0); game = true; // more blocksets needed if (mode1 == 1 || mode1 == 2) start_blockset(); first_block(); } bool game_board::rotate(int n) { int rotations = fblock.rotate.size() / fblock.shape.size(); if (n >= rotations) return false; // do nothing int nshape = fblock.rotate[fshape * rotations + n]; coords m = move_in(fblock, nshape, pos); if (!fits(fblock, nshape, m)) return false; // reject move // accept move pos = m; fshape = nshape; return true; } bool game_board::reflect() { int nshape = fblock.reflect[fshape]; coords m = move_in(fblock, nshape, pos); if (!fits(fblock, nshape, m)) return false; // reject move // accept move pos = m; fshape = nshape; return true; } bool game_board::left() { coords c = g->left(pos); if (!fits(fblock, fshape, c)) return false; // reject move // accept move pos = c; return true; } bool game_board::right() { coords c = g->right(pos); if (!fits(fblock, fshape, c)) return false; // reject move // accept move pos = c; return true; } bool game_board::front() { coords c = g->front(pos); if (!fits(fblock, fshape, c)) return false; // reject move // accept move pos = c; return true; } bool game_board::back() { coords c = g->back(pos); if (!fits(fblock, fshape, c)) return false; // reject move // accept move pos = c; return true; } bool game_board::down() { coords c = g->down(pos); if (fits(fblock, fshape, c) && fits_b(fblock, fshape, pos)) { // move block down and continue pos = c; return true; } else { land_block(); return false; } } bool game_board::drop() { // move block down until it lands while (down()) ; return true; } void game_board::color_lines(int c) { for (std::vector::const_iterator i=filled.begin(); i!=filled.end(); ++i) g->color_line(cells, *i, c); } void game_board::remove_lines() { // remove filled lines for (std::vector::const_iterator i=filled.begin(); i!=filled.end(); ++i) g->remove_line(cells, *i); // update lines count lines += filled.size(); score += score_lines(filled.size()); const int level_lines = 10; if (lines / level_lines > level) next_level(); // choose new block next_block(); } void game_board::next_block() { // new active block fblock = nblock; findex = nindex; fshape = nshape; bsize = nsize; // set initial position pos = make_coords(); if (findex != 0) pos = move_in(fblock, fshape, pos); // if it doesn't fit, game is over if (!fits(fblock, fshape, pos)) { // stop worker if it hasn't already end_blockset(); game = false; } // next block int max_super = bsuper; if (bsuper > 18) { max_super = (55 - bsuper) / 2; if (max_super < 2) max_super = 2; } if (mode1 == 2 && ++isuper >= max_super) { // superblock isuper = 0; nsuper = nsize; nsize = bsuper; } else { if (mode1 == 2 && isuper == 1) nsize = nsuper; // resume cycle where it was left // cycle over block sizes (not in order) int plus = (bmax - bmin + 1) / 2, minus = plus * 2 + 1; nsize += plus; while (nsize > bmax) nsize -= minus; if (nsize < bmin) nsize += (plus > 0) ? plus : 1; } // this must be safeguarded because blocks, series may be reallocated // in the worker thread { // acquire lock std::lock_guard lock(mutex); // choose block nindex = rand() % series[nsize]; for (int i=0; i(cells.get_rows(), cells.get_cols(), cells.get_layers(), cells.get_c0()); } galois-0.7/src/triangle.cc0000644000175000017500000002403613630267263013356 0ustar ioio/* triangle.cc -- spatial groups for triangular bricks. -*- C++ -*- Copyright (C) 2011-2020 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 "grid.h" #include "group.h" #include "triangle.h" unsigned group_triangle::rotate(unsigned n, unsigned m) const { const unsigned r[] = { 1, 2, 3, 4, 5, 0, }; return r[n % size()]; } unsigned group_triangle::reflect(unsigned n) const { return n % size(); } int group_triangle::type(const coords &c) const { int x = c.x - static_cast(std::floor(double(c.x) / 6) * 6); switch (x) { case 0: return (c.y % 2 == 0) ? 0 : -1; case 1: return (c.y % 2 == 0) ? -1 : 1; case 2: return -1; case 3: return (c.y % 2 == 0) ? -1 : 0; case 4: return (c.y % 2 == 0) ? 1 : -1; case 5: return -1; } // should never get here return 0; } std::vector group_triangle::neighbors(const coords &c) const { std::vector v; switch (type(c)) { case 0: v.push_back(c + make_coords(1, -1)); v.push_back(c + make_coords(-2, 0)); v.push_back(c + make_coords(1, 1)); break; case 1: v.push_back(c + make_coords(-1, -1)); v.push_back(c + make_coords(2, 0)); v.push_back(c + make_coords(-1, 1)); break; } return v; } std::vector group_triangle::blockers(const coords &c) const { std::vector v; switch (type(c)) { case 0: v.push_back(c + make_coords(1, 1)); break; case 1: v.push_back(c + make_coords(-1, 1)); break; } return v; } grid group_triangle::transform(const grid &g, unsigned n) const { // rotation matrix coefficients (times 2) const int xx[] = { 2, 1, -1, -2, -1, 1, }; const int xy[] = { 0, -1, -1, 0, 1, 1, }; const int yx[] = { 0, 3, 3, 0, -3, -3, }; const int yy[] = { 2, 1, -1, -2, -1, 1, }; // translations const int nx[] = { 0, -2, -3, -2, 0, 1, }; const int ny[] = { 0, 0, 1, 2, 2, 1, }; n = n % size(); grid t; for (int i=0; i group_triangle::center(const grid &g) const { // find center of mass coords s = make_coords(), m = make_coords(); int n = 0; for (int i=0; i 0) m = make_coords(-static_cast(std::floor(double(s.x) / n / 6 + 0.5)), -static_cast(std::floor(double(s.y) / n / 6 + 0.5))); // change back coordinate system coords mm = make_coords((m.x - m.y) * 3, m.x + m.y); grid c = g; c.move(mm); return c; } std::vector group_triangle::check_lines(grid &g, int n) const { std::vector filled; for (int i=1; i &g, int n, int color) const { for (int i=n-1; i<=n; ++i) for (int j=0; j= 0 && g.get(c)) g.set(c, color); } } void group_triangle::remove_line(grid &g, int n) const { for (int i=n; i>=0; --i) for (int j=0; j= 0) g.set(c, ((c.y > 1) ? g.get(c + make_coords(0, -2)) : 0)); } } Gdk::Rectangle group_triangle::block_size(const grid &b, int size) const { double xunit = size * 0.333333333333333, yunit = size * 0.577350269189626; int ileft = (b.get_x0() % 3 == 0) ? 0 : -1, iright = 3 - b.get_cols() % 3; return Gdk::Rectangle((b.get_x0() + ileft) * xunit, b.get_y0() * yunit, (b.get_cols() + iright) * xunit, (b.get_rows() + 1) * yunit); } Gdk::Rectangle group_triangle::board_size(int size, int rows, int cols, int layers) const { double xunit = size * 0.333333333333333; return Gdk::Rectangle (-static_cast(std::ceil((cols + 6) / 6 * 3 * xunit)), 0, static_cast(std::ceil((cols + 6) * xunit)), static_cast(std::ceil((rows + 2) * 1.15470053837925152902)) * size / 2); } void group_triangle::draw_brick(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { if (type(c) < 0) return; const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); double xunit = size * 0.333333333333333, yunit = size * 0.577350269189626; double xmargin = margin, ymargin = margin * 1.732050807568877; switch (type(c)) { case 0: context->move_to(c.x * xunit + xmargin, c.y * yunit + ymargin); context->line_to((c.x + 3) * xunit - 2 * xmargin, (c.y + 1) * yunit); context->line_to(c.x * xunit + xmargin, (c.y + 2) * yunit - ymargin); break; case 1: context->move_to((c.x + 2) * xunit - xmargin, c.y * yunit + ymargin); context->line_to((c.x - 1) * xunit + 2 * xmargin, (c.y + 1) * yunit); context->line_to((c.x + 2) * xunit - xmargin, (c.y + 2) * yunit - ymargin); break; } context->close_path(); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 0.8); context->fill_preserve(); context->set_source_rgba(color.get_red(), color.get_green(), color.get_blue(), 1.0); context->stroke(); } void group_triangle::draw_shadow(Cairo::RefPtr context, const coords &c, const Gdk::RGBA &color, int size) const { if (type(c) < 0) return; const double lwidth = 2.0, margin = (lwidth + 1.0) * 0.5; context->set_line_width(lwidth); double xunit = size * 0.333333333333333, yunit = size * 0.577350269189626; double xmargin = margin, ymargin = margin * 1.732050807568877; switch (type(c)) { case 0: context->move_to(c.x * xunit + xmargin, c.y * yunit + ymargin); context->line_to((c.x + 3) * xunit - 2 * xmargin, (c.y + 1) * yunit); context->line_to(c.x * xunit + xmargin, (c.y + 2) * yunit - ymargin); break; case 1: context->move_to((c.x + 2) * xunit - xmargin, c.y * yunit + ymargin); context->line_to((c.x - 1) * xunit + 2 * xmargin, (c.y + 1) * yunit); context->line_to((c.x + 2) * xunit - xmargin, (c.y + 2) * yunit - ymargin); break; } context->close_path(); const double dark = 0.8; context->set_source_rgba(color.get_red() * dark, color.get_green() * dark, color.get_blue() * dark, 1.0); context->stroke(); } void group_triangle::draw_board(Cairo::RefPtr context, int rows, int cols, int layers, int size) const { const double width = 2.0, margin = (width + 1.0) * 0.5; context->set_line_width(width); double xunit = size * 0.333333333333333, yunit = size * 0.577350269189626; double xmargin = margin, ymargin = margin * 1.154700538379252; int left = (-cols / 6) * 3, right = left + cols, bottom = rows; int lparity = ((bottom + left / 3) % 2 == 0) ? 0 : 1, rparity = ((bottom + right / 3) % 2 == 0) ? 0 : 1; // left side context->move_to(left * xunit - xmargin, 0.0); context->line_to(left * xunit - margin, (bottom + lparity) * yunit + 0.5 * ymargin); // bottom for (int i=left; i<=right; i+=3) { int iparity = ((bottom + i / 3) % 2 == 0) ? 0 : 1; context->line_to(i * xunit, (bottom + iparity) * yunit + ymargin); } // right side context->line_to(right * xunit + margin, (bottom + rparity) * yunit + 0.5 * ymargin); context->line_to(right * xunit + xmargin, 0.0); // clear inside context->set_source_rgba(0.0, 0.0, 0.0, 1.0); context->fill_preserve(); // draw outline context->set_source_rgba(1.0, 1.0, 1.0, 1.0); context->stroke(); } unsigned group_triangle_mirror::rotate(unsigned n, unsigned m) const { const unsigned r[] = { 1, 2, 3, 4, 5, 0, 11, 6, 7, 8, 9, 10, }; return r[n % size()]; } unsigned group_triangle_mirror::reflect(unsigned n) const { const unsigned r[] = { 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, }; return r[n % size()]; } grid group_triangle_mirror::transform(const grid &g, unsigned n) const { // rotation matrix coefficients (times 2) const int xx[] = { 2, 1, -1, -2, -1, 1, -2, -1, 1, 2, 1, -1, }; const int xy[] = { 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, }; const int yx[] = { 0, 3, 3, 0, -3, -3, 0, -3, -3, 0, 3, 3, }; const int yy[] = { 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, }; // translations const int nx[] = { 0, -2, -3, -2, 0, 1, -2, 0, 1, 0, -2, -3, }; const int ny[] = { 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, }; n = n % size(); grid t; for (int i=0; i. dnl Copyright © 2012-2015 Dan Nicholson 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 2 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, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl 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, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR galois-0.7/configure.ac0000644000175000017500000000202612565121754012734 0ustar ioio# configure.ac -- autoconf file for galois. # Copyright (C) 2012-2015 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . AC_INIT AC_CONFIG_FILES([src/makefile doc/makefile misc/makefile]) AC_CONFIG_FILES([doc/galois.6 doc/galois-it.6]) AC_CONFIG_FILES([doc/galois-C.omf doc/galois-it.omf]) AC_CONFIG_FILES([misc/galois.desktop]) AC_PROG_CXX PKG_CHECK_MODULES([gtkmm], [gtkmm-3.0]) PKG_CHECK_MODULES([libxmlplusplus], [libxml++-2.6]) AC_OUTPUT galois-0.7/doc/0000755000175000017500000000000013720471702011206 5ustar ioiogalois-0.7/doc/galois-it.xml0000644000175000017500000007521513720465150013632 0ustar ioio
Manuale di Galois 0.7 2012 2013 2014 2015 2016 2017 2018 2020 Gerardo Ballabio Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in . Gerardo Ballabio Versione 0.1 Novembre 2012 Versione 0.2 Gennaio 2013 Versione 0.3 Marzo 2014 Versione 0.4 Luglio 2015 Versione 0.5 Novembre 2017 Versione 0.6 Giugno 2018 Versione 0.7 Agosto 2020 Questo manuale descrive la versione 0.7 di Galois. GALOIS galois Introduzione Galois è un videogioco del tipo con i "blocchi che cadono", ma con caratteristiche uniche. Diversamente dalla maggior parte degli altri giochi di questo tipo, non è limitato a blocchi fatti da quattro mattoncini quadrati bidimensionali: potete scegliere tra varie diverse forme di mattoncini, blocchi composti da più o meno mattoncini, e persino tra partite bi e tridimensionali. Galois è software libero, rilasciato sotto le condizioni della GNU General Public License, versione 3 o successiva. Questo significa essenzialmente che potete usarlo, modificarlo e redistribuirlo senza restrizioni, eccetto che vi si richiede di trasmettere la stessa libertà a tutti coloro ai quali lo redistribuite. Galois è ospitato su Savannah, il sito di sviluppo software per le persone che tengono al software libero. Nome del gioco Évariste Galois era un matematico francese, uno dei fondatori della "teoria dei gruppi", una struttura che attraversa quasi tutti i campi della matematica moderna. Questo gioco fa uso internamente di gruppi di un tipo specifico, i gruppi di simmetria. Poiché il primo gioco con i blocchi che cadono (che sfortunatamente era un programma proprietario) aveva un nome che terminava con "is", ho pensato che chiamare il mio Galois sarebbe stato un bell'omaggio a entrambi. E come bonus aggiuntivo, comincia con G, come Gtk+ e GNOME. Note legali Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Gerardo Ballabio Galois is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Galois is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the license is included in . Come installare La versione più recente di Galois si può scaricare dal sito web di Galois: http://www.nongnu.org/galois/ Il modo più semplice è installare un binario precompilato, se è disponibile per la vostra piattaforma (vedi ). Altrimenti, dovrete scaricare il codice sorgente e compilarlo (vedi ). Se state aggiornando da una versione più vecchia, vi può interessare leggere le note per l'aggiornamento (vedi ). Piattaforme supportate Galois dovrebbe funzionare su qualunque sistema sul quale le librerie software da cui dipende siano disponibili (vedi ). Questo comprende (ma non è limitato a) GNU/Linux, BSD, Microsoft Windows, e Mac OS X. È stato effettivamente testato sui seguenti sistemi: Debian GNU/Linux stabile, architetture i386 e amd64 (cioè PC a 32 e a 64 bit). Il secondo è il mio computer, quindi è e resterà la piattaforma meglio supportata nel futuro prevedibile. Microsoft Windows XP, 7 e 10. Se lo provate su un altro sistema, sia che riusciate o che falliate, per favore fatemi sapere. Requisiti hardware Essendo un gioco che non richiede un'animazione veloce né grafica sofisticata, Galois ha requisiti molto ridotti. Dovrebbe funzionare bene anche su computer molto vecchi ed economici e senza accelerazione hardware. Pacchetti binari In questo momento, binari precompilati di Galois sono disponibili per le seguenti piattaforme: Debian GNU/Linux: a partire da Debian 10 (Buster) Galois fa parte del rilascio stabile ufficiale di Debian. Questo significa che potete installarlo tramite gli strumenti standard di gestione dei pacchetti di Debian, cioè apt-get o aptitude sulla riga di comando, o un package manager grafico come synaptic. Il nome del pacchetto è galois. Per esempio, se siete autorizzati ad usare sudo, potete eseguire: sudo apt-get install galois Il pacchetto è disponibile per tutte le architetture rilasciate. Ho verificato che funziona su i386 e amd64; si suppone che funzioni anche sulle altre architetture, ma non so se qualcuno abbia effettivamente provato. Se provate, per favore fatemi sapere. La versione in Debian 10 è Galois 0.6. Se volete una versione più recente, potete scaricare un pacchetto binario compilato per stabile dal sito web di Galois e installarlo con dpkg. Questo è disponibile per le architetture i386 e amd64. Il pacchetto Debian potrebbe funzionare anche su distribuzioni derivate da Debian, come Ubuntu e altre. Se provate, per favore fatemi sapere. Microsoft Windows: c'è un binario di Galois che potete scaricare ed eseguire, ma non c'è un pacchetto di installazione completo che installi anche i file di documentazione e faccia comparire Galois nel menù dei programmi. La documentazione è comunque disponibile sul sito web di Galois. Il binario è stato compilato su Debian GNU/Linux usando l'ambiente di cross-compilazione MXE. Per le altre piattaforme, Galois deve essere compilato da sorgente (vedi ). Sono disponibile a fornire pacchetti binari se qualcuno si offre volontario per compilarli e mantenerli. Installazione da sorgente Per installare Galois da sorgente, per prima cosa dovete controllare che tutte le sue dipendenze siano installate sul vostro sistema, e installare tutte quelle mancanti (vedi ). Quando avete fatto questo, estraete il file archivio compresso galois-0.7.tar.gz in una directory a vostra scelta. Poi aprite una shell di comando (console o terminale), spostatevi nella directory base dell'albero dei sorgenti estratto, galois-0.7, e scrivete i seguenti comandi: ./configure make make install configure ha molte opzioni da riga di comando con cui potete specificare dove installare, dove trovare le dipendenze (questo vi servirà se sono installate in posizioni non standard), quali flag di compilazione usare, e così via. Eseguite ./configure --help per una lista completa. Per il passo make install, dovete avere il permesso di scrittura sulla directory di installazione. Su GNU/Linux e altri sistemi Unix-compatibili, se state installando nella posizione standard (cioè sotto /usr/local), ciò vuol dire che dovete eseguire questo comando come root (usate su o sudo). Dipendenze Per poter compilare Galois, i seguenti pacchetti devono essere installati sul vostro sistema: Un ambiente Unix di base, compreso il programma make g++ o un altro compilatore C++ che supporti almeno lo standard C++11 gtkmm libxml++ Per tutte le principali versioni di GNU/Linux, versioni precompilate di questi pacchetti sono disponibili. Le librerie precompilate sono solitamente suddivise in un pacchetto "base" e uno "di sviluppo" (il secondo ha un nome che termina con -dev o -devel). Per compilare Galois, dovete installare entrambi; mentre per eseguire il programma compilato, sono richiesti solo i pacchetti base. Se volete anche poter ricompilare le versioni HTML e PDF della documentazione, vi serviranno anche questi: xmlto dblatex (per la versione PDF) Nomi dei pacchetti per Debian 10 (Buster): pacchetti base: libgtkmm-3.0-1v5, libxml++2.6-2v5. compilatore e pacchetti di sviluppo: make, g++, libgtkmm-3.0-dev, libxml++2.6-dev. strumenti per compilare la documentazione: xmlto, dblatex, texlive-lang-italian (per la versione italiana). I pacchetti per altre distribuzioni di GNU/Linux dovrebbero avere nomi simili, in particolare per le distribuzioni derivate da Debian. Se state installando un pacchetto binario precompilato (vedi ), normalmente non vi dovete preoccupare di avere le necessarie dipendenze installate perché il sistema di gestione dei pacchetti se ne occupa automaticamente. Note per l'aggiornamento In Galois 0.3, i percorsi dove sono conservati i file di dati degli utenti sono stati cambiati per essere più coerenti con le convenzioni comunemente usate. Se state aggiornando da una release più vecchia, i file esistenti non verranno spostati automaticamente nei nuovi percorsi: se non volete perdere le vostre impostazioni e i punteggi, dovete spostarli manualmente prima di lanciare la nuova versione. Il nuovo percorso per il file delle impostazioni è config_dir/galois/galois.conf, dove config_dir è il percorso restituito dalla funzione di glibmm get_user_config_dir() sul vostro computer (tipicamente $HOME/.config nei sistemi GNU/Linux). Il vecchio percorso era config_dir/galois.conf (senza la sottodirectory galois). Dovete creare la sottodirectory e spostarvi il file. Il nuovo percorso per il file dei punteggi è data_dir/galois/galois.res, dove data_dir è il percorso restituito dalla funzione di glibmm get_user_data_dir() sul vostro computer (tipicamente $HOME/.local/share nei sistemi GNU/Linux). Il vecchio percorso era data_dir/galois.res (senza la sottodirectory galois). Dovete creare la sottodirectory e spostarvi il file. Come giocare Le partite di Galois si giocano su un tabellone fatto di celle quadrate, esagonali, triangolari o cubiche, dove blocchi fatti di "mattoncini" attaccati insieme, ciascuno dei quali occupa una cella, cadono a passo costante, uno per volta, finché si posano sul fondo del tabellone o sopra altri blocchi. Mentre cadono, potete muoverli orizzontalmente, ruotarli e (se questa opzione è abilitata) rifletterli, in modo che quando si posano, si incastrino con gli altri blocchi, lasciando meno celle vuote possibile. Quando una linea orizzontale (o, nelle partite 3D, un piano) è occupata completamente da mattoncini, viene rimossa dal tabellone, e tutti i mattoncini che stavano al di sopra di essa cadono giù di una cella. (Potete anche rimuovere più linee in una volta sola se le completate con lo stesso blocco.) L'obiettivo è rimuovere le linee (o i piani) abbastanza in fretta da evitare che i mattoncini si impilino fino alla cima del tabellone: quando non c'è più spazio per collocare un nuovo blocco che cade, la partita è finita. Questo diventa sempre più difficile man mano che la partita procede, perché, a seconda della modalità di gioco selezionata, o la velocità con cui i blocchi cadono, o il numero di mattoncini che compongono i blocchi, aumenta man mano che più linee vengono completate. Lanciare Galois Se state utilizzando un ambiente grafico che supporta la specificazione dei menù XDG (per esempio GNOME o KDE), vedrete una voce per Galois nei menù di sistema (sotto Applications Games in Gnome 2) o nella funzionalità equivalente fornita dal vostro ambiente (panoramica delle applicazioni in Gnome 3), e potete lanciarlo cliccando su di essa. Altrimenti, potete creare un collegamento al file eseguibile galois sul vostro desktop (se il vostro ambiente permette i collegamenti sul desktop), o aprire un file manager e navigare nella directory dove esso è stato installato (tipicamente /usr/games o /usr/local/games nei sistemi GNU/Linux), o eseguirlo dalla riga di comando. Per iniziare una nuova partita, scegliete New Game dal menù dell'applicazione (se il vostro ambiente lo supporta), o Game New dalla barra dei menù, o premete Ctrl N . Questo comando è disattivato quando una partita è già attiva (in corso o in pausa). Per mettere in pausa una partita, o far ripartire una partita in pausa, premete il tasto assegnato all'azione Pause: di regola è Esc. Per fermare definitivamente una partita in corso o in pausa, scegliete Stop Game dal menù dell'applicazione, o Game Stop dalla barra dei menù. Se non c'è al momento una partita attiva, questo comando è disattivato. Per aprire la finestra delle preferenze, scegliete Preferences dal menù dell'applicazione, o Game Preferences dalla barra dei menù. Questo comando è disattivato quando c'è una partita attiva. Per aprire la finestra dei punteggi, scegliete Scores dal menù dell'applicazione, o Game Scores dalla barra dei menù. Questo comando è disattivato quando c'è una partita attiva. La finestra dei punteggi si aprirà anche alla fine della partita ogni volta che realizzate un punteggio che si collochi tra i primi 10 per le impostazioni correnti, e vi permetterà di inserire il vostro nome in quella riga. Per avere aiuto su Galois, scegliete Help dal menù dell'applicazione, o Help Contents dalla barra dei menù, o premete F1. Il Manuale di Galois (cioè questo documento) verrà visualizzato. Se non state utilizzando GNOME, questo potrebbe non funzionare; in ogni caso una versione HTML del manuale è distribuita con l'archivio dei sorgenti, e le versioni HTML e PDF possono essere scaricate dal sito web di Galois. Per avere informazioni di base su Galois, scegliete About dal menù dell'applicazione, o Help About dalla barra dei menù. Per uscire da Galois, scegliete Quit dal menù dell'applicazione, o Game Quit dalla barra dei menù, o premete Ctrl Q . Interfaccia del gioco La finestra di Galois contiene i seguenti elementi: Barra dei menù (1) In cima alla finestra. Contiene le voci del menù per iniziare una nuova partita; fermare la partita in corso; aprire le finestre delle preferenze e dei punteggi; ottenere aiuto e informazioni su Galois; e uscire dal programma. Anteprima del prossimo blocco (2) Nell'angolo in alto a destra della finestra. Tabellone del gioco (3) Sulla sinistra della finestra. Questo è l'elemento principale dell'interfaccia del gioco: qui è dove cadono i blocchi. Visualizzazione del punteggio (4) Sulla destra della finestra. Mostra il punteggio attuale, il livello, e il numero di linee completate. Controlli del gioco Mentre i blocchi cadono, potete compiere le seguenti azioni su di essi: Muoverli a destra o a sinistra, e nelle partite 3D in alto e in basso. Ruotarli: nelle partite 2D c'è un solo modo di rotazione (in senso antiorario), nelle partite 3D ce ne sono tre (intorno agli assi X, Y, e Z). Rifletterli: questa azione può essere attivata o disattivata nella finestra delle preferenze. Inizialmente è disattivata. Farli cadere: il blocco cade giù molto velocemente. Potete eseguire ciascuna di queste azioni premendo il tasto corrispondente sulla tastiera. La mappatura tra azioni e tasti è mostrata nella finestra delle preferenze (scheda Controls) e può essere cambiata dall'utente. La mappatura di partenza è come segue: Per le partite 2D: e per muovere il blocco, per ruotarlo, per rifletterlo (se permesso) e spazio per far cadere il blocco. Per le partite 3D: , , e per muovere nelle quattro direzioni, 1, 2 e 3 per ruotare, 4 per riflettere (se permesso) e spazio per far cadere il blocco. Ho impostato diversi gruppi di controlli per le partite 2D e 3D perché in 2D, per ruotare è la norma nei giochi con i blocchi che cadono e permette di giocare comodamente con una sola mano; ma in 3D è naturale usare i quattro tasti freccia per muovere nelle quattro direzioni. Preferenze La finestra delle preferenze ha due schede: Game Impostazioni sulla geometria e le modalità di gioco: Scegliete la geometria tra: quadrata, esagonale, triangolare (tutte queste 2D), e cubica (3D), con o senza riflessione dei blocchi. Scegliete la larghezza del tabellone e (per le partite in 3D) la profondità. Scegliete cosa fare ai cambi di livello (ogni 10 linee completate): aumentare la velocità del gioco, la dimensione massima dei blocchi, o la dimensione dei superblocchi. Se scegliete la dimensione massima dei blocchi, potete anche scegliere se aumentare, tenere fissa o diminuire la dimensione minima. I superblocchi sono blocchi più grandi del massimo: sono abilitati solo se scegliete la dimensione dei superblocchi. Scegliete il livello di velocità iniziale e la dimensione massima e minima dei blocchi. Scegliete se rimuovere le linee anche quando non sono completamente piene: si possono permettere fino a 2 mattoncini mancanti. Scegliete se visualizzare il prossimo blocco. Scegliete se visualizzare dove si poserà il blocco. Controls Impostazioni sui tasti di controllo: per cambiarne uno, fate doppio clic sul nome del tasto corrente (o selezionatelo con la tastiera e premete Invio) e quando viene evidenziato, premete il tasto con cui lo volete sostituire. Le impostazioni sono salvate nel file config_dir/galois/galois.conf, dove config_dir è il percorso restituito dalla funzione di glibmm get_user_config_dir() sul vostro computer (tipicamente $HOME/.config nei sistemi GNU/Linux). Potete ripristinare le impostazioni iniziali cancellando questo file. Punteggi Galois registra i punteggi delle migliori partite insieme alle rispettive impostazioni. La finestra dei punteggi mostra i migliori 10 punteggi per le impostazioni correnti. I punteggi possono essere filtrati secondo vari criteri, per esempio potete scegliere se vedere solo le partite giocate con uno specifico intervallo di dimensioni iniziali, o tutte le partite giocate con mattoncini quadrati, o persino con qualunque forma di mattoncini. I filtri possono essere cambiati usando i pulsanti e i campi in cima alla finestra dei punteggi. Ho cercato di calibrare i punteggi proporzionalmente alla difficoltà del gioco, in modo che partite giocate con impostazioni differenti possano essere confrontate; ma è molto arduo dare una valutazione oggettiva di quanto sia difficile una data modalità di gioco. I punteggi sono salvati nel file data_dir/galois/galois.res, dove data_dir è il path restituito dalla funzione di glibmm get_user_data_dir() sul vostro computer (tipicamente $HOME/.local/share nei sistemi GNU/Linux). Come contribuire
"Gratuitamente avete ricevuto, gratuitamente date." (Matteo 10,8)
Se desiderate aiutare a migliorare Galois, siete invitati a contattarmi (vedi ). Dovete accettare di rilasciare i vostri contributi come software libero sotto la licenza con cui Galois è rilasciato (la GNU General Public License, versione 3 o successiva).
Informazioni per contatti Il sito web di Galois è su http://www.nongnu.org/galois/ La pagina del progetto su Savannah è https://savannah.nongnu.org/projects/galois Per qualsiasi richiesta su Galois, mandate una email a galois-list@nongnu.org Per iscrivervi alla mailing list, o consultare i suoi archivi, andate su https://lists.nongnu.org/mailman/listinfo/galois-list
galois-0.7/doc/figure2.png0000644000175000017500000001004113312016711013243 0ustar ioioPNG  IHDRbKGD pHYs+tIMEIiTXtCommentfigure2.png -- image for galois manual. Copyright (C) 2012-2018 Gerardo Ballabio Permission is granted to copy, distribute and/or modify this image under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You should have received a copy of the GNU Free Documentation License along with this image. If not, see . Owz IDATxݱrWs2`9<ϸ]ͳ)sRRJ39糟`E#;p@w;p@ w;p@ wp@ wp@G^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ruu^m?l?ֿZ':[;5Gspw; w;@[p@ gV5gnyǞu{Nrw9;@lu)u&~mrXB+ew;@ 8߁&}jIENDB`galois-0.7/doc/makefile.in0000644000175000017500000000537113320233510013306 0ustar ioio# makefile -- makefile for galois documentation directory. # Copyright (C) 2012-2018 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @configure_input@ prefix = ${DESTDIR}@prefix@ AC = makefile galois.6 galois-it.6 galois-C.omf galois-it.omf BAK = *~ FIGURES = figure1.png figure2.png figure3.png HELP_DEPS = ${FIGURES} gpl.dbk fdl-1.3.xml HELP = galois.xml ${HELP_DEPS} galois.html OMF = galois-C.omf galois-it.omf .SUFFIXES : .xml .html .pdf .xml.html : xmlto html-nochunks $< .xml.pdf : xmlto --with-dblatex pdf $< default: html : galois.html galois-it.html pdf : galois.pdf galois-it.pdf # other targets clean : - rm -f ${BAK} distclean : clean - rm -f ${AC} install : mkdir -p ${prefix}/share/gnome/help/galois/C cp ${HELP} ${prefix}/share/gnome/help/galois/C for L in it ; do \ mkdir -p ${prefix}/share/gnome/help/galois/$$L ;\ cp galois-$$L.xml \ ${prefix}/share/gnome/help/galois/$$L/galois.xml ;\ ( cd ${prefix}/share/gnome/help/galois/$$L ;\ for D in ${HELP_DEPS} ; do \ ln -s ../C/$$D . ;\ done ) ;\ cp galois-$$L.html \ ${prefix}/share/gnome/help/galois/$$L/galois.html ;\ done mkdir -p ${prefix}/share/man/man6 cp galois.6 ${prefix}/share/man/man6 gzip -9 -f ${prefix}/share/man/man6/galois.6 for L in it ; do \ mkdir -p ${prefix}/share/man/$$L/man6 ;\ cp galois-$$L.6 ${prefix}/share/man/$$L/man6/galois.6 ;\ gzip -9 -f ${prefix}/share/man/$$L/man6/galois.6 ;\ done mkdir -p ${prefix}/share/omf/galois cp ${OMF} ${prefix}/share/omf/galois uninstall : - cd ${prefix}/share/gnome/help/galois/C && rm -f ${HELP} - rmdir ${prefix}/share/gnome/help/galois/C - for L in it ; do \ cd ${prefix}/share/gnome/help/galois/$$L && rm -f ${HELP} ;\ rmdir ${prefix}/share/gnome/help/galois/$$L ;\ done - rmdir ${prefix}/share/gnome/help/galois - cd ${prefix}/share/man/man6 && rm -f galois.6.gz - for L in it; do \ cd ${prefix}/share/man/it/man6 && rm -f galois.6.gz ;\ done - cd ${prefix}/share/omf/galois && rm -f ${OMF} - rmdir ${prefix}/share/omf/galois # dependencies galois.html : ${FIGURES} galois.pdf : ${FIGURES} galois-it.html : ${FIGURES} galois-it.pdf : ${FIGURES} galois-0.7/doc/galois.html0000644000175000017500000031017213720471571013362 0ustar ioioGalois Manual 0.7

Galois Manual 0.7

Gerardo Ballabio

This manual describes version 0.7 of Galois.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in AppendixB, GNU Free Documentation License.

Revision History
Revision Version 0.1November 2012
Revision Version 0.2January 2013
Revision Version 0.3March 2014
Revision Version 0.4July 2015
Revision Version 0.5November 2017
Revision Version 0.6June 2018
Revision Version 0.7August 2020

Introduction

Galois is a computer game of the "falling blocks" type, but with unique features. Unlike most other games of that type, it is not limited to blocks made of four two-dimensional, square bricks: you can choose among several different brick shapes, blocks composed of more or fewer bricks, and even between two- and three-dimensional games.

Galois is free software, released under the terms of the GNU General Public License, version 3 or later. This essentially means that you can use, modify and redistribute it without restrictions, except that you are required to pass along the same freedom to everybody to whom you redistribute it.

Galois is hosted at Savannah, the software forge for people committed to free software.

Name of the Game

variste Galois was a French mathematician, one of the founders of "group theory", a framework that encompasses nearly all fields of modern mathematics. This game makes use internally of groups of a specific kind, namely, symmetry groups. Because the first falling blocks game (which unfortunately was a proprietary program) had a name which ended in "is", I thought calling mine Galois would be a nice homage to both. And as an added bonus, it starts with G, like Gtk+ and GNOME.

Legal Notice

Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Gerardo Ballabio

Galois is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Galois is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the license is included in AppendixA, GNU General Public License version 3 .

How to Install

The most recent version of Galois can be downloaded from the Galois web site: http://www.nongnu.org/galois/

The easiest way is to install a precompiled binary, if that is available for your platform (see the section called “Binary Packages”). Otherwise, you'll have to download the source code and compile it (see the section called “Source Installation”).

If you are upgrading from an older release, you may want to read the upgrade notes (see the section called “Upgrade Notes”).

Supported Platforms

Galois is supposed to run on every system where the software libraries it depends on are available (see the section called “Dependencies”). This includes (but is not limited to) GNU/Linux, BSD, Microsoft Windows, and Mac OS X.

It has actually been tested on the following systems:

  • Debian GNU/Linux stable, i386 and amd64 architectures (i.e., 32-bit and 64-bit PC). The latter is my own computer, thus it is and will remain the best supported platform in the foreseeable future.

  • Microsoft Windows XP, 7 and 10.

If you try it on another system, whether you succeed of fail, please let me know.

Hardware Requirements

Being a game that doesn't require fast animation nor sophisticated graphics, Galois has very low requirements. It should run well even on very old and cheap computers and without hardware acceleration.

Binary Packages

At this moment, precompiled Galois binaries are available for the following platforms:

  • Debian GNU/Linux: since Debian 10 (Buster) Galois is part of the official Debian stable release. That means that you can install it via the standard Debian package management facilities, that is, apt-get or aptitude on the command line, or a graphical package manager like synaptic. The package name is galois. For example, if you are allowed to use sudo, you may run:

      sudo apt-get install galois

    The package is available for all release architectures. I have verified that it works on i386 and amd64; it should supposedly run on the other architectures as well, but I don't know whether anyone has actually tried. If you try, please let me know.

    The version in Debian 10 is Galois 0.6. If you want a more recent version, you can download a binary package built for stable from the Galois web site and install it with dpkg. That is available for the i386 and amd64 architectures.

    The Debian packages may work also on Debian-based distributions, like Ubuntu and others. If you try, please let me know.

  • Microsoft Windows: there is a Galois binary that you can download and run, but there isn't a full installation package which will also install documentation files and make Galois appear on the programs menu. The documentation is available on the Galois web site anyway.

    The binary was built on Debian GNU/Linux using the MXE cross-compiling environment.

For other platforms, Galois must be compiled from source (see the section called “Source Installation”). I am willing to provide binary packages if someone volunteers to build and maintain them.

Source Installation

To install Galois from source, first you need to check that all its dependencies are installed on your system, and install any missing ones (see the section called “Dependencies”). When you've done that, unpack the compressed archive file galois-0.7.tar.gz in a directory of your choice. Then open a command-line shell (console or terminal), change to the base directory of the unpacked source tree, galois-0.7, and type the following commands:

  ./configure
  make
  make install

configure has many command-line options by which you can specify where to install, where to find dependencies (you'll need this if they are installed in nonstandard places), which compiler flags to use, and so on. Run ./configure --help for a complete list.

For the make install step, you need write permission on the installation directory. On GNU/Linux and other Unix-compatible systems, if you are installing in the standard place (i.e., under /usr/local), this means you must run that command as root (use su or sudo).

Dependencies

In order to compile Galois, the following packages must be installed on your system:

  • A basic Unix environment, including the make utility

  • g++ or another C++ compiler supporting at least the C++11 standard

  • gtkmm

  • libxml++

For all major versions of GNU/Linux, precompiled versions of these packages are available. Precompiled libraries are usually split into a "base" and a "development" package (the latter has a name ending with -dev or -devel). In order to compile Galois, you must install both; while in order to run the compiled program, only the base packages are required. If you also want to be able to rebuild the HTML and PDF versions of the documentation, you'll need these too:

Package names for Debian 10 (Buster):

  • base packages: libgtkmm-3.0-1v5, libxml++2.6-2v5.

  • compiler and development packages: make, g++, libgtkmm-3.0-dev, libxml++2.6-dev.

  • documentation building tools: xmlto, dblatex, texlive-lang-italian (for the Italian version).

Packages for other GNU/Linux distributions should have similar names, particularly for Debian-based distributions.

If you are installing a precompiled binary package (see the section called “Binary Packages”), you normally need not worry about having the necessary dependencies installed because the package management system takes care automatically.

Upgrade Notes

In Galois 0.3, the paths where user data files are stored were changed to be more consistent with commonly used conventions. If you are upgrading from an older release, existing files will not be moved automatically to the new paths: if you don't want to lose your settings and scores, you must move them manually before running the new version.

The new pathname for the settings file is config_dir/galois/galois.conf, where config_dir is the path returned by the glibmm function get_user_config_dir() on your computer (typically $HOME/.config on GNU/Linux systems). The old pathname was config_dir/galois.conf (without the galois subdirectory). You must create the subdirectory and move the file therein.

The new pathname for the scores file is data_dir/galois/galois.res, where data_dir is the path returned by the glibmm function get_user_data_dir() on your computer (typically $HOME/.local/share on GNU/Linux systems). The old pathname was data_dir/galois.res (without the galois subdirectory). You must create the subdirectory and move the file therein.

How to Play

Galois games are played on a board made of square, hexagonal, triangular or cubic cells, where blocks made of "bricks" packed together, each brick filling a cell, fall at a regular pace, one at a time, until they land on the bottom of the board or over other blocks.

While they are falling, you can move them horizontally, rotate and (if that option is enabled) reflect them, so that when they land, they fit together with other blocks, leaving as few empty cells as you can. When a horizontal line (or, in 3D games, plane) is filled completely with bricks, it is removed from the board, and all bricks that were above it fall down by one cell. (You can also remove multiple lines at once if you fill them with the same block.)

The goal is to remove lines (or planes) fast enough to prevent bricks from piling up to the top of the board: when there is no more space to accommodate a new falling block, the game is over. This becomes more and more difficult as the game proceeds, because, depending on the selected game mode, either the speed at which the blocks fall down, or the number of bricks composing the blocks, increase as more lines are filled.

Running Galois

If you are running a graphical environment that supports the XDG menu specification (e.g., GNOME or KDE), you'll see an entry for Galois in the system menus (under ApplicationsGames in Gnome 2) or in the equivalent function provided by your environment (Applications overview in Gnome 3), and can start it by clicking on that. Otherwise, you may create a shortcut to the galois executable file on your desktop (if your environment allows desktop shortcuts), or open a file manager and browse to the directory where it was installed (typically /usr/games or /usr/local/games on GNU/Linux systems), or run it from the command line.

To start a new game, choose New Game from the application menu (if your environment supports that), or GameNew from the menu bar, or press Ctrl+N. This command is disabled while a game is already active (running or paused).

To pause a running game, or resume a paused game, press the key assigned to the Pause action: by default it's Esc.

To stop permanently a running or paused game, choose Stop Game from the application menu, or GameStop from the menu bar. If no game is currently active, this command is disabled.

To open the preferences dialog, choose Preferences from the application menu, or GamePreferences from the menu bar. This command is disabled while a game is active.

To open the scores dialog, choose Scores from the application menu, or GameScores from the menu bar. This command is disabled while a game is active. The scores dialog will also pop up at the end of the game whenever you set a score that ranges within the top 10 for the current settings, and will let you enter your name in that entry.

To get help on Galois, choose Help from the application menu, or HelpContents from the menu bar, or press F1. The Galois Manual (i.e., this document) will be displayed. If you aren't running GNOME, this might not work; in any case an HTML version of the manual is shipped with the source tarball, and HTML and PDF versions can be downloaded from the Galois web site.

To get basic information on Galois, choose About from the application menu, or HelpAbout from the menu bar.

To quit Galois, choose Quit from the application menu, or GameQuit from the menu bar, or press Ctrl+Q.

Game Interface

The Galois window contains the following elements:

Menu bar (1)

At the top of the window. It contains menu entries to start a new game; stop the current game; open the preferences and scores dialogs; get help and information about Galois; and quit the program.

Next block preview (2)

At the upper-right corner of the window.

Game board (3)

At the left of the window. This is the main element of the game interface: that's where blocks fall.

Score display (4)

At the right of the window. Shows the current score, level, and number of filled lines.

Game Controls

While blocks fall, you can perform the following actions on them:

  • Move left or right, and in 3D games up or down.

  • Rotate: in 2D games there is a single rotation mode (counterclockwise), in 3D games there are three (along axis X, Y, and Z).

  • Reflect: this action can be turned on or off in the preferences dialog. By default it's off.

  • Drop: the block falls down very fast.

You can perform each of those actions by pressing the corresponding key on the keyboard. The mapping between actions and keys is shown in the preferences dialog (Controls tab) and can be changed by the user. The default mapping is as follows:

  • For 2D games: and to move the block, to rotate, to reflect (if allowed) and space to drop the block.

  • For 3D games: , , and to move in the four directions, 1, 2 and 3 to rotate, 4 to reflect (if allowed) and space to drop the block.

I set up separate sets of controls for 2D and 3D games because in 2D, for rotate is the norm in falling blocks games and lets you play comfortably with a single hand; but in 3D it is natural to use the four arrow keys to move in the four directions.

Preferences

The preferences dialog has two tabs:

Game

Settings about the game geometry and playing modes:

  • Choose the game geometry among: square, hexagonal, triangular (all these 2D), and cubic (3D), with or without block reflection.

  • Choose the board width and (for 3D games) depth.

  • Choose what to do on level changes (every 10 filled lines): increase game speed, maximum block size, or superblock size. If you choose maximum block size, you can also choose whether to increase, keep fixed or decrease the minimum block size. Superblocks are blocks larger than the maximum: they are enabled only if you choose superblock size.

  • Choose the initial speed level and maximum and minimum block size.

  • Choose whether to remove lines also when they aren't completely filled: up to 2 missing bricks can be allowed.

  • Choose whether to preview the next block.

  • Choose whether to display where the block will land.

Controls

Settings about the keyboard controls: to change any of them, double-click on the current key label (or select it with the keyboard and hit Enter) and when it gets highlighted, press the key that you want to replace it with.

Settings are saved into the file config_dir/galois/galois.conf, where config_dir is the path returned by the glibmm function get_user_config_dir() on your computer (typically $HOME/.config on GNU/Linux systems). You may restore the pristine settings by deleting that file.

Scores

Galois records the scores of the best games together with their respective settings. The scores dialog shows the top 10 scores for the current settings.

Scores can be filtered by various criteria, for example you can choose whether to see only games played with a specified initial range of block sizes, or all games played with square bricks, or even with any brick shape. The filters can be changed using the buttons and boxes at the top of the scores dialog.

I tried to calibrate the scores proportionally to the difficulty of the game, so that games played with different settings can be compared; but it is very hard to give an objective evaluation of how difficult a given game mode is.

Scores are saved into the file data_dir/galois/galois.res, where data_dir is the path returned by the glibmm function get_user_data_dir() on your computer (typically $HOME/.local/share on GNU/Linux systems).

How to Contribute

"Freely you have received, freely give." (Matthew 10:8)

If you would like to help making Galois better, you're welcome to contact me (see the section called “Contact Information”). You must agree to license your contributions as free software under the license Galois is released with (the GNU General Public License, version 3 or later).

Contact Information

The Galois web site is at http://www.nongnu.org/galois/

The project's page on Savannah is at https://savannah.nongnu.org/projects/galois

For any requests about Galois, send email to

To subscribe to the mailing list, or browse its archives, go to https://lists.nongnu.org/mailman/listinfo/galois-list

A. GNU General Public License version 3

Version 3, 29 June 2007

Copyright 2007 Free Software Foundation, Inc. http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers’ and authors’ protection, the GPL clearly explains that there is no warranty for this free software. For both users’ and authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS

0. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.

The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

  1. The work must carry prominent notices stating that you modified it, and giving a relevant date.

  2. 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”.

  3. 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.

  4. 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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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:

  1. Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or

  2. 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

  3. 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

  4. Limiting the use for publicity purposes of names of licensors or authors of the material; or

  5. Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or

  6. Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.

All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.

A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

one line to give the program’s name and a brief idea of what it does.
Copyright (C) year name of author

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
  

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

program Copyright (C) year name of author
This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘show c’ for details.
  

The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see http://www.gnu.org/licenses/.

The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-lgpl.html.

B.GNU Free Documentation License

Version 1.3, 3 November 2008

Copyright 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.

The “publisher” means any person or entity that distributes copies of the Document to the public.

A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

  1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
  2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
  3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
  4. Preserve all the copyright notices of the Document.
  5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
  6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
  7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice.
  8. Include an unaltered copy of this License.
  9. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
  10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
  11. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
  12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
  13. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.
  14. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.
  15. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.

You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties — for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”.

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

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, receipt of a copy of some or all of the same material does not give you any rights to use it.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See Copyleft.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

11. RELICENSING

“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.

“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

“Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.

An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

Copyright  YEAR YOUR NAME

Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.3 or any later version
published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in
the section entitled “GNU Free Documentation License”.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with… Texts.” line with this:

with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts
being LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

galois-0.7/doc/galois-it.html0000644000175000017500000031255613720471572014005 0ustar ioioManuale di Galois 0.7

Manuale di Galois 0.7

Gerardo Ballabio

Questo manuale descrive la versione 0.7 di Galois.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in AppendiceB, GNU Free Documentation License.

Diario delle Revisioni
Revisione Versione 0.1Novembre 2012
Revisione Versione 0.2Gennaio 2013
Revisione Versione 0.3Marzo 2014
Revisione Versione 0.4Luglio 2015
Revisione Versione 0.5Novembre 2017
Revisione Versione 0.6Giugno 2018
Revisione Versione 0.7Agosto 2020

Introduzione

Galois un videogioco del tipo con i "blocchi che cadono", ma con caratteristiche uniche. Diversamente dalla maggior parte degli altri giochi di questo tipo, non limitato a blocchi fatti da quattro mattoncini quadrati bidimensionali: potete scegliere tra varie diverse forme di mattoncini, blocchi composti da pi o meno mattoncini, e persino tra partite bi e tridimensionali.

Galois software libero, rilasciato sotto le condizioni della GNU General Public License, versione 3 o successiva. Questo significa essenzialmente che potete usarlo, modificarlo e redistribuirlo senza restrizioni, eccetto che vi si richiede di trasmettere la stessa libert a tutti coloro ai quali lo redistribuite.

Galois ospitato su Savannah, il sito di sviluppo software per le persone che tengono al software libero.

Nome del gioco

variste Galois era un matematico francese, uno dei fondatori della "teoria dei gruppi", una struttura che attraversa quasi tutti i campi della matematica moderna. Questo gioco fa uso internamente di gruppi di un tipo specifico, i gruppi di simmetria. Poich il primo gioco con i blocchi che cadono (che sfortunatamente era un programma proprietario) aveva un nome che terminava con "is", ho pensato che chiamare il mio Galois sarebbe stato un bell'omaggio a entrambi. E come bonus aggiuntivo, comincia con G, come Gtk+ e GNOME.

Note legali

Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Gerardo Ballabio

Galois is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Galois is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the license is included in AppendiceA, GNU General Public License version 3 .

Come installare

La versione pi recente di Galois si pu scaricare dal sito web di Galois: http://www.nongnu.org/galois/

Il modo pi semplice installare un binario precompilato, se disponibile per la vostra piattaforma (vedi sezione chiamata Pacchetti binari). Altrimenti, dovrete scaricare il codice sorgente e compilarlo (vedi sezione chiamata Installazione da sorgente).

Se state aggiornando da una versione pi vecchia, vi pu interessare leggere le note per l'aggiornamento (vedi sezione chiamata Note per l'aggiornamento).

Piattaforme supportate

Galois dovrebbe funzionare su qualunque sistema sul quale le librerie software da cui dipende siano disponibili (vedi sezione chiamata Dipendenze). Questo comprende (ma non limitato a) GNU/Linux, BSD, Microsoft Windows, e Mac OS X.

stato effettivamente testato sui seguenti sistemi:

  • Debian GNU/Linux stabile, architetture i386 e amd64 (cio PC a 32 e a 64 bit). Il secondo il mio computer, quindi e rester la piattaforma meglio supportata nel futuro prevedibile.

  • Microsoft Windows XP, 7 e 10.

Se lo provate su un altro sistema, sia che riusciate o che falliate, per favore fatemi sapere.

Requisiti hardware

Essendo un gioco che non richiede un'animazione veloce n grafica sofisticata, Galois ha requisiti molto ridotti. Dovrebbe funzionare bene anche su computer molto vecchi ed economici e senza accelerazione hardware.

Pacchetti binari

In questo momento, binari precompilati di Galois sono disponibili per le seguenti piattaforme:

  • Debian GNU/Linux: a partire da Debian 10 (Buster) Galois fa parte del rilascio stabile ufficiale di Debian. Questo significa che potete installarlo tramite gli strumenti standard di gestione dei pacchetti di Debian, cio apt-get o aptitude sulla riga di comando, o un package manager grafico come synaptic. Il nome del pacchetto galois. Per esempio, se siete autorizzati ad usare sudo, potete eseguire:

      sudo apt-get install galois

    Il pacchetto disponibile per tutte le architetture rilasciate. Ho verificato che funziona su i386 e amd64; si suppone che funzioni anche sulle altre architetture, ma non so se qualcuno abbia effettivamente provato. Se provate, per favore fatemi sapere.

    La versione in Debian 10 Galois 0.6. Se volete una versione pi recente, potete scaricare un pacchetto binario compilato per stabile dal sito web di Galois e installarlo con dpkg. Questo disponibile per le architetture i386 e amd64.

    Il pacchetto Debian potrebbe funzionare anche su distribuzioni derivate da Debian, come Ubuntu e altre. Se provate, per favore fatemi sapere.

  • Microsoft Windows: c' un binario di Galois che potete scaricare ed eseguire, ma non c' un pacchetto di installazione completo che installi anche i file di documentazione e faccia comparire Galois nel men dei programmi. La documentazione comunque disponibile sul sito web di Galois.

    Il binario stato compilato su Debian GNU/Linux usando l'ambiente di cross-compilazione MXE.

Per le altre piattaforme, Galois deve essere compilato da sorgente (vedi sezione chiamata Installazione da sorgente). Sono disponibile a fornire pacchetti binari se qualcuno si offre volontario per compilarli e mantenerli.

Installazione da sorgente

Per installare Galois da sorgente, per prima cosa dovete controllare che tutte le sue dipendenze siano installate sul vostro sistema, e installare tutte quelle mancanti (vedi sezione chiamata Dipendenze). Quando avete fatto questo, estraete il file archivio compresso galois-0.7.tar.gz in una directory a vostra scelta. Poi aprite una shell di comando (console o terminale), spostatevi nella directory base dell'albero dei sorgenti estratto, galois-0.7, e scrivete i seguenti comandi:

  ./configure
  make
  make install

configure ha molte opzioni da riga di comando con cui potete specificare dove installare, dove trovare le dipendenze (questo vi servir se sono installate in posizioni non standard), quali flag di compilazione usare, e cos via. Eseguite ./configure --help per una lista completa.

Per il passo make install, dovete avere il permesso di scrittura sulla directory di installazione. Su GNU/Linux e altri sistemi Unix-compatibili, se state installando nella posizione standard (cio sotto /usr/local), ci vuol dire che dovete eseguire questo comando come root (usate su o sudo).

Dipendenze

Per poter compilare Galois, i seguenti pacchetti devono essere installati sul vostro sistema:

  • Un ambiente Unix di base, compreso il programma make

  • g++ o un altro compilatore C++ che supporti almeno lo standard C++11

  • gtkmm

  • libxml++

Per tutte le principali versioni di GNU/Linux, versioni precompilate di questi pacchetti sono disponibili. Le librerie precompilate sono solitamente suddivise in un pacchetto "base" e uno "di sviluppo" (il secondo ha un nome che termina con -dev o -devel). Per compilare Galois, dovete installare entrambi; mentre per eseguire il programma compilato, sono richiesti solo i pacchetti base. Se volete anche poter ricompilare le versioni HTML e PDF della documentazione, vi serviranno anche questi:

Nomi dei pacchetti per Debian 10 (Buster):

  • pacchetti base: libgtkmm-3.0-1v5, libxml++2.6-2v5.

  • compilatore e pacchetti di sviluppo: make, g++, libgtkmm-3.0-dev, libxml++2.6-dev.

  • strumenti per compilare la documentazione: xmlto, dblatex, texlive-lang-italian (per la versione italiana).

I pacchetti per altre distribuzioni di GNU/Linux dovrebbero avere nomi simili, in particolare per le distribuzioni derivate da Debian.

Se state installando un pacchetto binario precompilato (vedi sezione chiamata Pacchetti binari), normalmente non vi dovete preoccupare di avere le necessarie dipendenze installate perch il sistema di gestione dei pacchetti se ne occupa automaticamente.

Note per l'aggiornamento

In Galois 0.3, i percorsi dove sono conservati i file di dati degli utenti sono stati cambiati per essere pi coerenti con le convenzioni comunemente usate. Se state aggiornando da una release pi vecchia, i file esistenti non verranno spostati automaticamente nei nuovi percorsi: se non volete perdere le vostre impostazioni e i punteggi, dovete spostarli manualmente prima di lanciare la nuova versione.

Il nuovo percorso per il file delle impostazioni config_dir/galois/galois.conf, dove config_dir il percorso restituito dalla funzione di glibmm get_user_config_dir() sul vostro computer (tipicamente $HOME/.config nei sistemi GNU/Linux). Il vecchio percorso era config_dir/galois.conf (senza la sottodirectory galois). Dovete creare la sottodirectory e spostarvi il file.

Il nuovo percorso per il file dei punteggi data_dir/galois/galois.res, dove data_dir il percorso restituito dalla funzione di glibmm get_user_data_dir() sul vostro computer (tipicamente $HOME/.local/share nei sistemi GNU/Linux). Il vecchio percorso era data_dir/galois.res (senza la sottodirectory galois). Dovete creare la sottodirectory e spostarvi il file.

Come giocare

Le partite di Galois si giocano su un tabellone fatto di celle quadrate, esagonali, triangolari o cubiche, dove blocchi fatti di "mattoncini" attaccati insieme, ciascuno dei quali occupa una cella, cadono a passo costante, uno per volta, finch si posano sul fondo del tabellone o sopra altri blocchi.

Mentre cadono, potete muoverli orizzontalmente, ruotarli e (se questa opzione abilitata) rifletterli, in modo che quando si posano, si incastrino con gli altri blocchi, lasciando meno celle vuote possibile. Quando una linea orizzontale (o, nelle partite 3D, un piano) occupata completamente da mattoncini, viene rimossa dal tabellone, e tutti i mattoncini che stavano al di sopra di essa cadono gi di una cella. (Potete anche rimuovere pi linee in una volta sola se le completate con lo stesso blocco.)

L'obiettivo rimuovere le linee (o i piani) abbastanza in fretta da evitare che i mattoncini si impilino fino alla cima del tabellone: quando non c' pi spazio per collocare un nuovo blocco che cade, la partita finita. Questo diventa sempre pi difficile man mano che la partita procede, perch, a seconda della modalit di gioco selezionata, o la velocit con cui i blocchi cadono, o il numero di mattoncini che compongono i blocchi, aumenta man mano che pi linee vengono completate.

Lanciare Galois

Se state utilizzando un ambiente grafico che supporta la specificazione dei men XDG (per esempio GNOME o KDE), vedrete una voce per Galois nei men di sistema (sotto ApplicationsGames in Gnome 2) o nella funzionalit equivalente fornita dal vostro ambiente (panoramica delle applicazioni in Gnome 3), e potete lanciarlo cliccando su di essa. Altrimenti, potete creare un collegamento al file eseguibile galois sul vostro desktop (se il vostro ambiente permette i collegamenti sul desktop), o aprire un file manager e navigare nella directory dove esso stato installato (tipicamente /usr/games o /usr/local/games nei sistemi GNU/Linux), o eseguirlo dalla riga di comando.

Per iniziare una nuova partita, scegliete New Game dal men dell'applicazione (se il vostro ambiente lo supporta), o GameNew dalla barra dei men, o premete Ctrl+N. Questo comando disattivato quando una partita gi attiva (in corso o in pausa).

Per mettere in pausa una partita, o far ripartire una partita in pausa, premete il tasto assegnato all'azione Pause: di regola Esc.

Per fermare definitivamente una partita in corso o in pausa, scegliete Stop Game dal men dell'applicazione, o GameStop dalla barra dei men. Se non c' al momento una partita attiva, questo comando disattivato.

Per aprire la finestra delle preferenze, scegliete Preferences dal men dell'applicazione, o GamePreferences dalla barra dei men. Questo comando disattivato quando c' una partita attiva.

Per aprire la finestra dei punteggi, scegliete Scores dal men dell'applicazione, o GameScores dalla barra dei men. Questo comando disattivato quando c' una partita attiva. La finestra dei punteggi si aprir anche alla fine della partita ogni volta che realizzate un punteggio che si collochi tra i primi 10 per le impostazioni correnti, e vi permetter di inserire il vostro nome in quella riga.

Per avere aiuto su Galois, scegliete Help dal men dell'applicazione, o HelpContents dalla barra dei men, o premete F1. Il Manuale di Galois (cio questo documento) verr visualizzato. Se non state utilizzando GNOME, questo potrebbe non funzionare; in ogni caso una versione HTML del manuale distribuita con l'archivio dei sorgenti, e le versioni HTML e PDF possono essere scaricate dal sito web di Galois.

Per avere informazioni di base su Galois, scegliete About dal men dell'applicazione, o HelpAbout dalla barra dei men.

Per uscire da Galois, scegliete Quit dal men dell'applicazione, o GameQuit dalla barra dei men, o premete Ctrl+Q.

Interfaccia del gioco

La finestra di Galois contiene i seguenti elementi:

Barra dei men (1)

In cima alla finestra. Contiene le voci del men per iniziare una nuova partita; fermare la partita in corso; aprire le finestre delle preferenze e dei punteggi; ottenere aiuto e informazioni su Galois; e uscire dal programma.

Anteprima del prossimo blocco (2)

Nell'angolo in alto a destra della finestra.

Tabellone del gioco (3)

Sulla sinistra della finestra. Questo l'elemento principale dell'interfaccia del gioco: qui dove cadono i blocchi.

Visualizzazione del punteggio (4)

Sulla destra della finestra. Mostra il punteggio attuale, il livello, e il numero di linee completate.

Controlli del gioco

Mentre i blocchi cadono, potete compiere le seguenti azioni su di essi:

  • Muoverli a destra o a sinistra, e nelle partite 3D in alto e in basso.

  • Ruotarli: nelle partite 2D c' un solo modo di rotazione (in senso antiorario), nelle partite 3D ce ne sono tre (intorno agli assi X, Y, e Z).

  • Rifletterli: questa azione pu essere attivata o disattivata nella finestra delle preferenze. Inizialmente disattivata.

  • Farli cadere: il blocco cade gi molto velocemente.

Potete eseguire ciascuna di queste azioni premendo il tasto corrispondente sulla tastiera. La mappatura tra azioni e tasti mostrata nella finestra delle preferenze (scheda Controls) e pu essere cambiata dall'utente. La mappatura di partenza come segue:

  • Per le partite 2D: e per muovere il blocco, per ruotarlo, per rifletterlo (se permesso) e spazio per far cadere il blocco.

  • Per le partite 3D: , , e per muovere nelle quattro direzioni, 1, 2 e 3 per ruotare, 4 per riflettere (se permesso) e spazio per far cadere il blocco.

Ho impostato diversi gruppi di controlli per le partite 2D e 3D perch in 2D, per ruotare la norma nei giochi con i blocchi che cadono e permette di giocare comodamente con una sola mano; ma in 3D naturale usare i quattro tasti freccia per muovere nelle quattro direzioni.

Preferenze

La finestra delle preferenze ha due schede:

Game

Impostazioni sulla geometria e le modalit di gioco:

  • Scegliete la geometria tra: quadrata, esagonale, triangolare (tutte queste 2D), e cubica (3D), con o senza riflessione dei blocchi.

  • Scegliete la larghezza del tabellone e (per le partite in 3D) la profondit.

  • Scegliete cosa fare ai cambi di livello (ogni 10 linee completate): aumentare la velocit del gioco, la dimensione massima dei blocchi, o la dimensione dei superblocchi. Se scegliete la dimensione massima dei blocchi, potete anche scegliere se aumentare, tenere fissa o diminuire la dimensione minima. I superblocchi sono blocchi pi grandi del massimo: sono abilitati solo se scegliete la dimensione dei superblocchi.

  • Scegliete il livello di velocit iniziale e la dimensione massima e minima dei blocchi.

  • Scegliete se rimuovere le linee anche quando non sono completamente piene: si possono permettere fino a 2 mattoncini mancanti.

  • Scegliete se visualizzare il prossimo blocco.

  • Scegliete se visualizzare dove si poser il blocco.

Controls

Impostazioni sui tasti di controllo: per cambiarne uno, fate doppio clic sul nome del tasto corrente (o selezionatelo con la tastiera e premete Invio) e quando viene evidenziato, premete il tasto con cui lo volete sostituire.

Le impostazioni sono salvate nel file config_dir/galois/galois.conf, dove config_dir il percorso restituito dalla funzione di glibmm get_user_config_dir() sul vostro computer (tipicamente $HOME/.config nei sistemi GNU/Linux). Potete ripristinare le impostazioni iniziali cancellando questo file.

Punteggi

Galois registra i punteggi delle migliori partite insieme alle rispettive impostazioni. La finestra dei punteggi mostra i migliori 10 punteggi per le impostazioni correnti.

I punteggi possono essere filtrati secondo vari criteri, per esempio potete scegliere se vedere solo le partite giocate con uno specifico intervallo di dimensioni iniziali, o tutte le partite giocate con mattoncini quadrati, o persino con qualunque forma di mattoncini. I filtri possono essere cambiati usando i pulsanti e i campi in cima alla finestra dei punteggi.

Ho cercato di calibrare i punteggi proporzionalmente alla difficolt del gioco, in modo che partite giocate con impostazioni differenti possano essere confrontate; ma molto arduo dare una valutazione oggettiva di quanto sia difficile una data modalit di gioco.

I punteggi sono salvati nel file data_dir/galois/galois.res, dove data_dir il path restituito dalla funzione di glibmm get_user_data_dir() sul vostro computer (tipicamente $HOME/.local/share nei sistemi GNU/Linux).

Come contribuire

"Gratuitamente avete ricevuto, gratuitamente date." (Matteo 10,8)

Se desiderate aiutare a migliorare Galois, siete invitati a contattarmi (vedi sezione chiamata Informazioni per contatti). Dovete accettare di rilasciare i vostri contributi come software libero sotto la licenza con cui Galois rilasciato (la GNU General Public License, versione 3 o successiva).

Informazioni per contatti

Il sito web di Galois su http://www.nongnu.org/galois/

La pagina del progetto su Savannah https://savannah.nongnu.org/projects/galois

Per qualsiasi richiesta su Galois, mandate una email a

Per iscrivervi alla mailing list, o consultare i suoi archivi, andate su https://lists.nongnu.org/mailman/listinfo/galois-list

A. GNU General Public License version 3

Version 3, 29 June 2007

Copyright 2007 Free Software Foundation, Inc. http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers’ and authors’ protection, the GPL clearly explains that there is no warranty for this free software. For both users’ and authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS

0. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.

The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

  1. The work must carry prominent notices stating that you modified it, and giving a relevant date.

  2. 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”.

  3. 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.

  4. 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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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:

  1. Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or

  2. 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

  3. 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

  4. Limiting the use for publicity purposes of names of licensors or authors of the material; or

  5. Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or

  6. Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.

All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.

A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

one line to give the program’s name and a brief idea of what it does.
Copyright (C) year name of author

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
  

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

program Copyright (C) year name of author
This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘show c’ for details.
  

The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see http://www.gnu.org/licenses/.

The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-lgpl.html.

B.GNU Free Documentation License

Version 1.3, 3 November 2008

Copyright 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.

The “publisher” means any person or entity that distributes copies of the Document to the public.

A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

  1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
  2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
  3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
  4. Preserve all the copyright notices of the Document.
  5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
  6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
  7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice.
  8. Include an unaltered copy of this License.
  9. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
  10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
  11. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
  12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
  13. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.
  14. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.
  15. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.

You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties — for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”.

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

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, receipt of a copy of some or all of the same material does not give you any rights to use it.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See Copyleft.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

11. RELICENSING

“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.

“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

“Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.

An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

Copyright  YEAR YOUR NAME

Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.3 or any later version
published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in
the section entitled “GNU Free Documentation License”.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with… Texts.” line with this:

with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts
being LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

galois-0.7/doc/galois.xml0000644000175000017500000007245113720463727013227 0ustar ioio
Galois Manual 0.7 2012 2013 2014 2015 2016 2017 2018 2020 Gerardo Ballabio Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in . Gerardo Ballabio Version 0.1 November 2012 Version 0.2 January 2013 Version 0.3 March 2014 Version 0.4 July 2015 Version 0.5 November 2017 Version 0.6 June 2018 Version 0.7 August 2020 This manual describes version 0.7 of Galois. GALOIS galois Introduction Galois is a computer game of the "falling blocks" type, but with unique features. Unlike most other games of that type, it is not limited to blocks made of four two-dimensional, square bricks: you can choose among several different brick shapes, blocks composed of more or fewer bricks, and even between two- and three-dimensional games. Galois is free software, released under the terms of the GNU General Public License, version 3 or later. This essentially means that you can use, modify and redistribute it without restrictions, except that you are required to pass along the same freedom to everybody to whom you redistribute it. Galois is hosted at Savannah, the software forge for people committed to free software. Name of the Game Évariste Galois was a French mathematician, one of the founders of "group theory", a framework that encompasses nearly all fields of modern mathematics. This game makes use internally of groups of a specific kind, namely, symmetry groups. Because the first falling blocks game (which unfortunately was a proprietary program) had a name which ended in "is", I thought calling mine Galois would be a nice homage to both. And as an added bonus, it starts with G, like Gtk+ and GNOME. Legal Notice Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Gerardo Ballabio Galois is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Galois is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the license is included in . How to Install The most recent version of Galois can be downloaded from the Galois web site: http://www.nongnu.org/galois/ The easiest way is to install a precompiled binary, if that is available for your platform (see ). Otherwise, you'll have to download the source code and compile it (see ). If you are upgrading from an older release, you may want to read the upgrade notes (see ). Supported Platforms Galois is supposed to run on every system where the software libraries it depends on are available (see ). This includes (but is not limited to) GNU/Linux, BSD, Microsoft Windows, and Mac OS X. It has actually been tested on the following systems: Debian GNU/Linux stable, i386 and amd64 architectures (i.e., 32-bit and 64-bit PC). The latter is my own computer, thus it is and will remain the best supported platform in the foreseeable future. Microsoft Windows XP, 7 and 10. If you try it on another system, whether you succeed of fail, please let me know. Hardware Requirements Being a game that doesn't require fast animation nor sophisticated graphics, Galois has very low requirements. It should run well even on very old and cheap computers and without hardware acceleration. Binary Packages At this moment, precompiled Galois binaries are available for the following platforms: Debian GNU/Linux: since Debian 10 (Buster) Galois is part of the official Debian stable release. That means that you can install it via the standard Debian package management facilities, that is, apt-get or aptitude on the command line, or a graphical package manager like synaptic. The package name is galois. For example, if you are allowed to use sudo, you may run: sudo apt-get install galois The package is available for all release architectures. I have verified that it works on i386 and amd64; it should supposedly run on the other architectures as well, but I don't know whether anyone has actually tried. If you try, please let me know. The version in Debian 10 is Galois 0.6. If you want a more recent version, you can download a binary package built for stable from the Galois web site and install it with dpkg. That is available for the i386 and amd64 architectures. The Debian packages may work also on Debian-based distributions, like Ubuntu and others. If you try, please let me know. Microsoft Windows: there is a Galois binary that you can download and run, but there isn't a full installation package which will also install documentation files and make Galois appear on the programs menu. The documentation is available on the Galois web site anyway. The binary was built on Debian GNU/Linux using the MXE cross-compiling environment. For other platforms, Galois must be compiled from source (see ). I am willing to provide binary packages if someone volunteers to build and maintain them. Source Installation To install Galois from source, first you need to check that all its dependencies are installed on your system, and install any missing ones (see ). When you've done that, unpack the compressed archive file galois-0.7.tar.gz in a directory of your choice. Then open a command-line shell (console or terminal), change to the base directory of the unpacked source tree, galois-0.7, and type the following commands: ./configure make make install configure has many command-line options by which you can specify where to install, where to find dependencies (you'll need this if they are installed in nonstandard places), which compiler flags to use, and so on. Run ./configure --help for a complete list. For the make install step, you need write permission on the installation directory. On GNU/Linux and other Unix-compatible systems, if you are installing in the standard place (i.e., under /usr/local), this means you must run that command as root (use su or sudo). Dependencies In order to compile Galois, the following packages must be installed on your system: A basic Unix environment, including the make utility g++ or another C++ compiler supporting at least the C++11 standard gtkmm libxml++ For all major versions of GNU/Linux, precompiled versions of these packages are available. Precompiled libraries are usually split into a "base" and a "development" package (the latter has a name ending with -dev or -devel). In order to compile Galois, you must install both; while in order to run the compiled program, only the base packages are required. If you also want to be able to rebuild the HTML and PDF versions of the documentation, you'll need these too: xmlto dblatex (for the PDF version) Package names for Debian 10 (Buster): base packages: libgtkmm-3.0-1v5, libxml++2.6-2v5. compiler and development packages: make, g++, libgtkmm-3.0-dev, libxml++2.6-dev. documentation building tools: xmlto, dblatex, texlive-lang-italian (for the Italian version). Packages for other GNU/Linux distributions should have similar names, particularly for Debian-based distributions. If you are installing a precompiled binary package (see ), you normally need not worry about having the necessary dependencies installed because the package management system takes care automatically. Upgrade Notes In Galois 0.3, the paths where user data files are stored were changed to be more consistent with commonly used conventions. If you are upgrading from an older release, existing files will not be moved automatically to the new paths: if you don't want to lose your settings and scores, you must move them manually before running the new version. The new pathname for the settings file is config_dir/galois/galois.conf, where config_dir is the path returned by the glibmm function get_user_config_dir() on your computer (typically $HOME/.config on GNU/Linux systems). The old pathname was config_dir/galois.conf (without the galois subdirectory). You must create the subdirectory and move the file therein. The new pathname for the scores file is data_dir/galois/galois.res, where data_dir is the path returned by the glibmm function get_user_data_dir() on your computer (typically $HOME/.local/share on GNU/Linux systems). The old pathname was data_dir/galois.res (without the galois subdirectory). You must create the subdirectory and move the file therein. How to Play Galois games are played on a board made of square, hexagonal, triangular or cubic cells, where blocks made of "bricks" packed together, each brick filling a cell, fall at a regular pace, one at a time, until they land on the bottom of the board or over other blocks. While they are falling, you can move them horizontally, rotate and (if that option is enabled) reflect them, so that when they land, they fit together with other blocks, leaving as few empty cells as you can. When a horizontal line (or, in 3D games, plane) is filled completely with bricks, it is removed from the board, and all bricks that were above it fall down by one cell. (You can also remove multiple lines at once if you fill them with the same block.) The goal is to remove lines (or planes) fast enough to prevent bricks from piling up to the top of the board: when there is no more space to accommodate a new falling block, the game is over. This becomes more and more difficult as the game proceeds, because, depending on the selected game mode, either the speed at which the blocks fall down, or the number of bricks composing the blocks, increase as more lines are filled. Running Galois If you are running a graphical environment that supports the XDG menu specification (e.g., GNOME or KDE), you'll see an entry for Galois in the system menus (under Applications Games in Gnome 2) or in the equivalent function provided by your environment (Applications overview in Gnome 3), and can start it by clicking on that. Otherwise, you may create a shortcut to the galois executable file on your desktop (if your environment allows desktop shortcuts), or open a file manager and browse to the directory where it was installed (typically /usr/games or /usr/local/games on GNU/Linux systems), or run it from the command line. To start a new game, choose New Game from the application menu (if your environment supports that), or Game New from the menu bar, or press Ctrl N . This command is disabled while a game is already active (running or paused). To pause a running game, or resume a paused game, press the key assigned to the Pause action: by default it's Esc. To stop permanently a running or paused game, choose Stop Game from the application menu, or Game Stop from the menu bar. If no game is currently active, this command is disabled. To open the preferences dialog, choose Preferences from the application menu, or Game Preferences from the menu bar. This command is disabled while a game is active. To open the scores dialog, choose Scores from the application menu, or Game Scores from the menu bar. This command is disabled while a game is active. The scores dialog will also pop up at the end of the game whenever you set a score that ranges within the top 10 for the current settings, and will let you enter your name in that entry. To get help on Galois, choose Help from the application menu, or Help Contents from the menu bar, or press F1. The Galois Manual (i.e., this document) will be displayed. If you aren't running GNOME, this might not work; in any case an HTML version of the manual is shipped with the source tarball, and HTML and PDF versions can be downloaded from the Galois web site. To get basic information on Galois, choose About from the application menu, or Help About from the menu bar. To quit Galois, choose Quit from the application menu, or Game Quit from the menu bar, or press Ctrl Q . Game Interface The Galois window contains the following elements: Menu bar (1) At the top of the window. It contains menu entries to start a new game; stop the current game; open the preferences and scores dialogs; get help and information about Galois; and quit the program. Next block preview (2) At the upper-right corner of the window. Game board (3) At the left of the window. This is the main element of the game interface: that's where blocks fall. Score display (4) At the right of the window. Shows the current score, level, and number of filled lines. Game Controls While blocks fall, you can perform the following actions on them: Move left or right, and in 3D games up or down. Rotate: in 2D games there is a single rotation mode (counterclockwise), in 3D games there are three (along axis X, Y, and Z). Reflect: this action can be turned on or off in the preferences dialog. By default it's off. Drop: the block falls down very fast. You can perform each of those actions by pressing the corresponding key on the keyboard. The mapping between actions and keys is shown in the preferences dialog (Controls tab) and can be changed by the user. The default mapping is as follows: For 2D games: and to move the block, to rotate, to reflect (if allowed) and space to drop the block. For 3D games: , , and to move in the four directions, 1, 2 and 3 to rotate, 4 to reflect (if allowed) and space to drop the block. I set up separate sets of controls for 2D and 3D games because in 2D, for rotate is the norm in falling blocks games and lets you play comfortably with a single hand; but in 3D it is natural to use the four arrow keys to move in the four directions. Preferences The preferences dialog has two tabs: Game Settings about the game geometry and playing modes: Choose the game geometry among: square, hexagonal, triangular (all these 2D), and cubic (3D), with or without block reflection. Choose the board width and (for 3D games) depth. Choose what to do on level changes (every 10 filled lines): increase game speed, maximum block size, or superblock size. If you choose maximum block size, you can also choose whether to increase, keep fixed or decrease the minimum block size. Superblocks are blocks larger than the maximum: they are enabled only if you choose superblock size. Choose the initial speed level and maximum and minimum block size. Choose whether to remove lines also when they aren't completely filled: up to 2 missing bricks can be allowed. Choose whether to preview the next block. Choose whether to display where the block will land. Controls Settings about the keyboard controls: to change any of them, double-click on the current key label (or select it with the keyboard and hit Enter) and when it gets highlighted, press the key that you want to replace it with. Settings are saved into the file config_dir/galois/galois.conf, where config_dir is the path returned by the glibmm function get_user_config_dir() on your computer (typically $HOME/.config on GNU/Linux systems). You may restore the pristine settings by deleting that file. Scores Galois records the scores of the best games together with their respective settings. The scores dialog shows the top 10 scores for the current settings. Scores can be filtered by various criteria, for example you can choose whether to see only games played with a specified initial range of block sizes, or all games played with square bricks, or even with any brick shape. The filters can be changed using the buttons and boxes at the top of the scores dialog. I tried to calibrate the scores proportionally to the difficulty of the game, so that games played with different settings can be compared; but it is very hard to give an objective evaluation of how difficult a given game mode is. Scores are saved into the file data_dir/galois/galois.res, where data_dir is the path returned by the glibmm function get_user_data_dir() on your computer (typically $HOME/.local/share on GNU/Linux systems). How to Contribute
"Freely you have received, freely give." (Matthew 10:8)
If you would like to help making Galois better, you're welcome to contact me (see ). You must agree to license your contributions as free software under the license Galois is released with (the GNU General Public License, version 3 or later).
Contact Information The Galois web site is at http://www.nongnu.org/galois/ The project's page on Savannah is at https://savannah.nongnu.org/projects/galois For any requests about Galois, send email to galois-list@nongnu.org To subscribe to the mailing list, or browse its archives, go to https://lists.nongnu.org/mailman/listinfo/galois-list
galois-0.7/doc/figure1.png0000644000175000017500000016164413312016673013271 0ustar ioioPNG  IHDRK˯bKGD pHYs+tIME/J/iTXtCommentfigure1.png -- image for galois manual. Copyright (C) 2012-2018 Gerardo Ballabio Permission is granted to copy, distribute and/or modify this image under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You should have received a copy of the GNU Free Documentation License along with this image. If not, see .4(r IDATx{|e?LMڦB#7Ų,~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z<l6ygz7a O-* ?0_EYMSo\/~Z}j!AUDQ@Q@`|zHJ/(S^5|`PIҌLAdɒBub6NNm:ɦOz^FU DKäJ9ꃜ55MPvWe˖]Su aTJ^*A8Y'''eWYaÆo6\k1K Mׯ_pքu+@'lN/(8ڻu dň'n7MnݺcG{N/(o6'@K)>uhts~e8&6V^ i. isGOy zϙSPXhK e8=h >羣m :Gڢٗ^X$h2.^\\ q qJv9U|;}i"3Mq:Yz,U(h4/WS% %IT̅7l@Q z(ڙ6m+EakIF 㣶S$iӂ+WEQT~~~  .p\A3>@`* JMQ–CK,A'|u i+Ksorܼw[M( :buX(CQ!"2 a,m-iSR]i 【0nNY_5tQoo}u:F;`YY˲4Jӫ\uǥqx)IHR-3=^OvZJ&xN(&P)NșřN z=Cǹ\CxAYXHBBB(-93!vߐ[f 3D^)-Ԛdm&R9 vghO,3KäsdYպa{a{.@Ghtmmm-kk)8n}=xWWGoO ZH#|?{." 1<ϟic#NtnRHV/.747߼y(A?{Hk*$I 8Z TR+:0|҂RR )ۛr㞳gN2X.d9?iiSNwTyRH>Hۥ- -9?=E-8{Z =[UUSKn\\\̲I͌u#acοK'f*Xի ?thE%h4xF#++ˉDn 5+LJD}x77*͏ѳ7*!o?zFF^[[ǧDihzɵ_)TLޢj//r=!cōY1"+w IR͛///Oh4ΪɁA8N˕rX6U6=zta!J˗GD}$}Gt:\xjMsHccc___6&y$?~|ll,'٣^SԔNvSih4frBH$v1:XwwSAEϟDT@I{>7P6Uv O=C8xstLGwݞV ߯L&WVbIeW6q"$Y?:IDATq^XXxҥ+W( A&19aRR{!=HO6zrd!3sXAD}w]+vW +rW`ˁGsߒL[_[i;$Rj IHҳ[zra FKD2F#r>Ѓk}["=H~A@ Bp;@ #;@ #~N,2RIENDB`galois-0.7/doc/galois.6.in0000644000175000017500000000406113720463311013156 0ustar ioio.\" galois.6 -- man page for galois. -*- nroff -*- .\" Copyright (C) 2012-2020 Gerardo Ballabio .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 3 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program. If not, see . .\" .\" @configure_input@ .TH "GALOIS" "6" "0.7" "Gerardo Ballabio" "Games" .SH NAME galois \- falling blocks game with blocks of various shapes and sizes .SH SYNOPSIS .B galois .SH DESCRIPTION Galois is a computer game of the "falling blocks" type, but with unique features. Unlike most other games of that type, it is not limited to blocks made of four two-dimensional, square bricks: you can choose among several different brick shapes, blocks composed of more or fewer bricks, and even between two- and three-dimensional games. .PP Galois is free software, released under the terms of the GNU General Public License, version 3 or later. .SH CONFIGURATION Select .B Preferences from the application menu (if your environment supports that), or .B Game/Preferences from the menu bar to modify game settings and control keys. .SH FILES .I /galois/galois.conf : configuration file .br .I /galois/galois.res : scores file .PP .I and .I are the paths returned by the glibmm functions .B get_user_config_dir() and .B get_user_data_dir() , respectively. Typical values on GNU/Linux systems are .I $HOME/.config and .I $HOME/.local/share .SH SEE ALSO Detailed information is available in the Galois manual: .br .I @prefix@/share/gnome/help/galois/C/galois.html .SH AUTHOR Gerardo Ballabio galois-0.7/doc/figure3.png0000644000175000017500000013074313312016726013266 0ustar ioioPNG  IHDR;XbKGD pHYs+tIME-kTiTXtCommentfigure3.png -- image for galois manual. Copyright (C) 2012-2018 Gerardo Ballabio Permission is granted to copy, distribute and/or modify this image under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You should have received a copy of the GNU Free Documentation License along with this image. If not, see .y IDATx{|w DE֢ڂVVkՏJVKk5>*Xo5[ZmQZz|PA Af3?&@&M<^2gv{}G9`iHcZ#C{!p:ݸ>SAQ;fd$l-o=H jΦ8'A2fI$JB:N+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J߾O1pLzKء ~'FQTEؼA 񟭩H͛IKoI4 \kpBp &0o OM 0m}  WCPA^/ 0z9:C.eMkeS2q}HU⋇"Iajj>GˋCd0YI5 Io aAY]ǏW4eee$'' 9o5H}x]9?#CdFžy.: H\t)&AwΣZ0Yez-[A_{t֞/\$$Vu.V}a61vXErٺu.nw)&%QUy$'N}^{`DS2fs#ȑ#|J*++Ѡ-$ND׏/BAmVAS̙p]% 60r%K&Jl{R'ʲjJO' ҡCƌ'<3̊i2 o۶#?mni!fRR=: =M%N-[^4|>~sXrIN%۶H8:74*4 5 -Z&V7IqGZvvm*EZ (rArrr9yMnEr\Kɑ5a= #$ 3fpzE3MKFbr!-RD?'Y|Dit9`/XUWukQDQ"$1cgm[(dp¬Zt:]$ACŏ(yoߞ<*+ddZ7y&Mٳrh3~:QNV W,TfΜ1w#]1y)c{=(&1zh*wrL6پ} #JHNu:˗/gժa&oѪgkӧO$9 ~](yL>?LgN0!=]L9`3#G/d'xqJI*V ˙#kכz1bD$"tI:E .dǎa4ڰZߘ?`pyr-Adggsy|-n\.#z@aa- bl0ZffQPPaeD%6YEEPP`fǎ0-ݛ>֙!vY]z&JNŋөo< Zm276=̺ukEPHǍj%;;cÆG2d5.W[\1IKs]wX[[Cbb>(:Laa-991XscU#a qx.Nyٓ^ngery m۶% jjlF\p!Rz$v9E~!B˲ ++Dzi4Ern]=T'0m4JK?ر/c!#X"BnHhbۙ7o>+W*rOlRuÇ4hOә a-sNN;5x<,+YYY;m(cʊGq֒?̪UGEYV,$|&y̟?{(3l0w8-)si4>|8< 7i2A?GU%a 4.g۠Aһ/<''OJJVTLx^eF$UdUVV4*!l[N YƨHNNAPVMMu,l p8LYYVYïL;ksE[K t:tzh|(ztYIENDB`galois-0.7/doc/galois-C.omf.in0000644000175000017500000000135213720463376013765 0ustar ioio (Gerardo Ballabio) (Gerardo Ballabio) Galois Manual August 2020 Galois is a game of the falling blocks type, but with unique features. manual galois-0.7/doc/galois-it.6.in0000644000175000017500000000424013720463441013573 0ustar ioio.\" galois-it.6 -- Italian man page for galois. -*- nroff -*- .\" Copyright (C) 2012-2020 Gerardo Ballabio .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 3 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program. If not, see . .\" .\" @configure_input@ .TH "GALOIS" "6" "0.7" "Gerardo Ballabio" "Giochi" .SH NOME galois \- gioco con blocchi che cadono di diverse forme e dimensioni .SH SINOSSI .B galois .SH DESCRIZIONE Galois è un videogioco del tipo con i "blocchi che cadono", ma con caratteristiche uniche. Diversamente dalla maggior parte degli altri giochi di questo tipo, non è limitato a blocchi fatti da quattro mattoncini quadrati bidimensionali: potete scegliere tra varie diverse forme di mattoncini, blocchi composti da più o meno mattoncini, e persino tra partite bi e tridimensionali. .PP Galois è software libero, rilasciato sotto le condizioni della GNU General Public License, versione 3 o successiva. .SH CONFIGURAZIONE Selezionare .B Preferences dal menù dell'applicazione (se il vostro ambiente lo supporta), o .B Game/Preferences dalla barra dei menù per modificare le impostazioni del gioco e i tasti di controllo. .SH FILE .I /galois/galois.conf : file di configurazione .br .I /galois/galois.res : file dei punteggi .PP .I e .I sono i path restituiti dalle funzioni di glibmm .B get_user_config_dir() e .B get_user_data_dir() , rispettivamente. Valori tipici su GNU/Linux sono .I $HOME/.config e .I $HOME/.local/share .SH VEDI ANCHE Informazioni dettagliate sono disponibili nel manuale di Galois: .br .I @prefix@/share/gnome/help/galois/it/galois.html .SH AUTORE Gerardo Ballabio galois-0.7/doc/fdl-1.3.xml0000644000175000017500000007022411752270010012771 0ustar ioio GNU Free Documentation License Version 1.3, 3 November 2008 Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text. The “publisher” means any person or entity that distributes copies of the Document to the public. A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. State on the Title page the name of the publisher of the Modified Version, as the publisher. Preserve all the copyright notices of the Document. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice. Include an unaltered copy of this License. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles. You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties — for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”. 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. 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, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See Copyleft. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site. “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. “Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright © YEAR YOUR NAME Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with… Texts.” line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. galois-0.7/doc/gpl.dbk0000644000175000017500000012335011752270010012446 0ustar ioio <acronym>GNU</acronym> General Public License version 3 Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers’ and authors’ protection, the GPL clearly explains that there is no warranty for this free software. For both users’ and authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users’ Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: The work must carry prominent notices stating that you modified it, and giving a relevant date. 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”. 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. 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: 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. 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. 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. 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. 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: Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or 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 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 Limiting the use for publicity purposes of names of licensors or authors of the material; or Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”. A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others’ Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. one line to give the program’s name and a brief idea of what it does. Copyright (C) year name of author This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: program Copyright (C) year name of author This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’. This is free software, and you are welcome to redistribute it under certain conditions; type ‘show c’ for details. The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”. You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see http://www.gnu.org/licenses/. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-lgpl.html. galois-0.7/doc/galois-it.omf.in0000644000175000017500000000137513720463467014225 0ustar ioio (Gerardo Ballabio) (Gerardo Ballabio) Manuale di Galois Agosto 2020 Galois è un gioco del tipo con i blocchi che cadono, ma con caratteristiche uniche. manual galois-0.7/ChangeLog0000644000175000017500000003644213720462720012224 0ustar ioio# ChangeLog -- changelog file for galois. # Copyright (C) 2011-2020 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . 25 Nov 2011 * started today, plus or minus one day (writing 29 Nov) * single source file: galois.cc * set up class grid * generate blocks made of a specified number of square bricks 27 Nov 2011 * move functions to methods of group 28 Nov 2011 * add hexagonal group 29 Nov 2011 * move to own directory * start keeping changelog * add GPL3 notice * make rotation group elements 30 Nov 2011 * simplify transform method 1 Dec 2011 * add groups with reflections 3 Dec 2011 * use faster algorithm for building blockset * build sets of equivalent shapes 4 Dec 2011 * compute rotation and reflection groups for blocks * add (blank) gtkmm window * new file: makefile 5 Dec 2011 * draw square blocks on gtkmm window 6 Dec 2011 * draw also hexagonal blocks 8 Dec 2011 * add triangular group with and without mirror 9 Dec 2011 * make class grid a template * split galois.cc into multiple files: board.h board.cc grid.h group.h group.cc hexagon.h hexagon.cc main.h main.cc square.h square.cc triangle.h triangle.cc * make some group methods private * add block motion * drop blocks onto board 10 Dec 2011 * new file blocks.cc: build block sets * draw board contours * remove filled rows 11 Dec 2011 * add timely descent of blocks * add New menu entry and toolbar * new files preferences.h, preferences.cc: preferences dialog * preferences setting: choose game geometry * preferences setting: choose number of bricks per block 12 Dec 2011 * play with blocks of different sizes 13 Dec 2011 * draw better board contours 14 Dec 2011 * add speed levels * add level change modes 15 Dec 2011 * make preferences dialog modal * turn off New and Preferences menu entries while game is running 17 Dec 2011 * adjust minimum bricks range to follow maximum number * minimum bricks number can increase, decrease or stay fixed * add changeable board width 18 Dec 2011 * change sequence of block sizes * set minimum size of board widget * split BoardArea from board: isolate logic from rendering 19 Dec 2011 * new files area.h, area.cc: split off BoardArea * show next block * display level and lines 20 Dec 2011 * add third dimension * new classes: group_2d, group_3d * add new moves: front, back 21 Dec 2011 * new files cube.h, cube.cc: add cubic group with and without mirror 22 Dec 2011 * read and write block sets from/to xml files 23 Dec 2011 * try vectors of coords instead of grids: it's slower, throw it away * read and write all blocksets for a group in a single xml file * fix badly formed xml files 24 Dec 2011 * speed up blockset generation by reducing the input set * generate more blocksets during the game 25 Dec 2011 * set maximum blockset size per group 26 Dec 2011 * reduce size of triangular bricks * add colors 28 Dec 2011 * adjust colors 29 Dec 2011 * check and remove filled lines separately 30 Dec 2011 * draw 3d board with colored layers * split landing blocks out of down method 31 Dec 2011 * animate removal of filled lines 1 Jan 2012 * draw board for cubic bricks 2 Jan 2012 * move block if rotate or reflect hits a wall 5 Jan 2012 * use coords in place of x, y, z in group and board 6 Jan 2012 * use coords in place of x, y, z in grid 7 Jan 2012 * draw board without outer frame * limit linear block size to fit within board * use smaller width range for cubic board 8 Jan 2012 * rescale brick size on board widget dimensions 9 Jan 2012 * rescale brick size, another way 10 Jan 2012 * add score 11 Jan 2012 * draft top view for cubic board 12 Jan 2012 * color by planes in top view 15 Jan 2012 * show where block will land 16 Jan 2012 * add preference option for show land 17 Jan 2012 * forbid blocks to cross filled cells 18 Jan 2012 * increase alpha for cubic board 19 Jan 2012 * use larger vertical offset for cubic board * improve board size and positioning 20 Jan 2012 * draw plane framing block in cubic board 21 Jan 2012 * draw cubic bricks with thickness 22 Jan 2012 * cleanup of board drawing code * color next block by layers in cubic board 23 Jan 2012 * draw cubic board open upwards 24 Jan 2012 * discard side view for cubic board * remove style parameter 25 Jan 2012 * adjust offsets for cubic board 26 Jan 2012 * draw front edge of cubic board above blocks 27 Jan 2012 * adjust offsets for cubic board 28 Jan 2012 * add About dialog 29 Jan 2012 * new files scores.h, scores.cc: (empty) scores dialog 30 Jan 2012 * show something in scores dialog 3 Feb 2012 * set minimum size for scores dialog 4 Feb 2012 * show actual game scores in scores dialog 8 Feb 2012 * adjust score 12 Feb 2012 * add filters to scores dialog 24 Feb 2012 * make player name editable 3 Mar 2012 * add bmax, bmin columns to scores board 4 Mar 2012 * add (non editable) controls tab to preferences window 5 Mar 2012 * make player name editable on a single row 6 Mar 2012 * show scores dialog with player name already selected 9 Mar 2012 * make the right row editable 10 Mar 2012 * make row editable only until dialog is closed or changed 11 Mar 2012 * make edited rows persistent 13 Mar 2012 * make control keys configurable in preferences window 14 Mar 2012 * add pause control 15 Mar 2012 * write pause message on board 16 Mar 2012 * improve pause message, show it conditionally 17 Mar 2012 * save and reload (partially) configuration file 19 Mar 2012 * save configuration file for any preferences changed 20 Mar 2012 * load also control keys from configuration file 21 Mar 2012 * fix loading of configuration file * save configuration file when dialog is closed 23 Mar 2012 * adjust offsets for cubic board 24 Mar 2012 * add three more colors * increase rows of cubic board 25 Mar 2012 * adjust some colors 30 Mar 2012 * merge two identical ColumnsModel classes into one 2 Apr 2012 * delete file blocks.cc * new file manual.xml: documentation file * new files gpl.dbk, fdl-1.3.xml: GPL and GFDL in DocBook format 3 Apr 2012 * add Contents entry to Help menu * add html and pdf targets to makefile 7 Apr 2012 * adjust some colors 14 Apr 2012 * new file figure1.png: shows game geometries and brick shapes 17 Apr 2012 * new file figure2.png: shows how to play * new file figure3.png: annotated screenshot of game window 29 Apr 2012 * new file aclocal.m4: autoconf macros for pkg-config (copy from /usr/share/aclocal/pkg.m4 in Debian's pkg-config package) * new files configure.ac, configure, makefile.in: check requisite libraries and create makefile with autoconf * have "make distclean" remove makefile 1 May 2012 * set help file path at makefile level 2 May 2012 * new file config.h.in: define help file path here 3 May 2012 * add install and uninstall targets to makefile 7 May 2012 * new directory: doc * move manual.xml, figure1.png, figure2.png, figure3.png, gpl.dbk, fdl-1.3.xml to directory doc * new file: doc/makefile.in * don't remove manual.html, manual.pdf on make clean; install them * new directory: src * mv all source files (*.cc, *.h, config.h.in) to directory src * new file: src/makefile.in 8 May 2012 * add Stop entry to menubar 18 May 2012 * add GPL notices to configure.ac, ChangeLog * add autoconf notice to autogenerated files 19 May 2012 * new file: TODO * set minimum brick size always to 2 28 Jun 2012 * set back maximum min brick size equal to max size 1 Sep 2012 * fix animation for 3d geometries * add option to remove lines with one or two empty bricks 2 Sep 2012 * save new preference setting 6 Sep 2012 * save current time in scores file 7 Sep 2012 * refine preferences dialog 8 Sep 2012 * save all preferences in scores file 9 Sep 2012 * add option to (not) preview next block 11 Sep 2012 * show current score even if it isn't in the top 10 13 Sep 2012 * reduce board height from 24 to 20, triangular from 20 to 16 14 Sep 2012 * centralize score calculation 15 Sep 2012 * increase game speed 17 Sep 2012 * add filters to scores dialog 18 Sep 2012 * show/hide extra filters in scores dialog 19 Sep 2012 * resize scores dialog when filters box is hidden 20 Sep 2012 * change scores calculation * add one more filter in scores dialog 23 Sep 2012 * add one more filter in scores dialog 26 Sep 2012 * improve filters layout in scores dialog * change "clear filters" button to "check/uncheck" 5 Oct 2012 * show also initial speed in scores dialog * set filters when scores dialog is first shown 6 Oct 2012 * hide check/uncheck button together with filters box 30 Oct 2012 * add copyright and license to figure1.png, figure2.png, figure3.png 5 Nov 2012 * add home page URL and mailing list address to manual.xml * new file: NEWS * update version number to 0.1 -- ready for initial release! 9 Nov 2012 * release Galois 0.1 29 Nov 2012 * new file doc/galois-C.omf.in: locate help file properly * improve paths of installed doc files * delete file src/config.h.in, no longer needed 1 Dec 2012 * new file doc/galois.6.in: man page 3 Dec 2012 * have "make clean" remove galois executable 4 Dec 2012 * increase alpha of bricks colors 7 Dec 2012 * offset drawing coordinates by half pixel to make sharper edges * rescale triangular cells to integral horizontal size 8 Dec 2012 * turn off pause message when game is stopped * clear board when game is stopped * remember width for 2D and 3D games separately * improve drawing of shadow bricks 9 Dec 2012 * offset drawing coordinates by half pixel in next_area too 25 Dec 2012 * compress man page with gzip -9 28 Dec 2012 * new directory: misc * new file: misc/makefile.in * new file misc/galois.desktop.in: add Galois to applications menu 29 Dec 2012 * new files misc/galois.svg, misc/galois.png: icon for menu item 31 Dec 2012 * install galois to $prefix/games 1 Jan 2013 * remove spurious dependency in makefile.in 3 Jan 2013 * fix all warnings 13 Jan 2013 * support DESTDIR in makefiles * remove file makefile.in: makefile needs not be autogenerated * improve paths of installed doc files 17 Jan 2013 * change license of figure*.png to GFDL, consistent with manual 18 Jan 2013 * update version number to 0.2 -- ready for release! 26 Jan 2013 * release Galois 0.2 27 Oct 2013 * remove manual.pdf from distribution * new game option: enable superblocks * reorganize preferences dialog 12 Nov 2013 * draw game over message 17 Dec 2013 * increase superblock size only on level change 6 Jan 2014 * drop more frequent superblocks when empty > 0 23 Jan 2014 * change superblocks frequency again 24 Jan 2014 * make sure game over message fits within board 25 Jan 2014 * do not save scores that aren't int the top 10 26 Jan 2014 * change score formula: more points for superblocks 2 Feb 2014 * update aclocal.m4: copy new version from /usr/share/aclocal/pkg.m4 19 Feb 2014 * rename manual.xml to galois.xml * change installation directory of Galois manual so that the yelp in Debian 7 finds it * double size of galois.png to look better in Gnome 3 overview 26 Feb 2014 * move preferences and scores files to own directories 3 Mar 2014 * fix regression: add new score even if scores list is empty * remove dead code about inactive toolbar 7 Mar 2014 * use gtk_show_uri to launch help browser * have "make clean" remove *~ files 11 Mar 2014 * fix all warnings * update version number to 0.3 -- ready for release! 25 Mar 2014 * release Galois 0.3 23 Dec 2014 * animate drop block 24 Dec 2014 * don't move block while being dropped 2 Jul 2015 * new files doc/galois-it.omf.in, doc/galois-it.xml: Italian manual * rename doc/galois.xml to doc/galois-C.xml * install/uninstall Italian manual * update aclocal.m4: copy new version from /usr/share/aclocal/pkg.m4 5 Jul 2015 * new file doc/galois-it.6.in: Italian man page * rename back doc/galois-C.xml to doc/galois.xml 8 Jul 2015 * adjust size of scores dialog 12 Jul 2015 * update version number to 0.4 -- ready for release! 14 Jul 2015 * release Galois 0.4 19 Aug 2015 * build with gtkmm 3 22 Aug 2015 * attach dialogs to main window * add more fields to About dialog 23 Aug 2015 * replace Gdk::Color with Gdk::RGBA * replace Gtk::Table with Gtk::Grid 24 Aug 2015 * use Gtk::Application 25 Aug 2015 * add Gnome 3-style application menu, drop menubar 26 Aug 2015 * change rule for superblock frequency 27 Aug 2015 * add back keyboard shortcuts to menu items * restore menubar (at least for now) 28 Aug 2015 * reorganize menubar as in Galois 0.4 13 Sep 2015 * make menu items sensitive/insensitive 25 Sep 2015 * draw logo in About dialog * revert that 26 Sep 2015 * fall back to html manual if ghelp:galois doesn't work 2 Oct 2015 * remove Alignment objects, use Widget::set_margin_start() instead 24 Oct 2015 * add back keyboard shortcuts for opening menus 15 May 2017 * try fix for non standard compliant construct in grid.h (suggested by Marc Espie on galois-list) 16 May 2017 * use simpler fix (older g++ didn't accept it, now does) 30 May 2017 * don't use prefer_app_menu: requires gtkmm 3.14, isn't actually doing anything 31 May 2017 * undo previous change, it is actually needed 4 Jul 2017 * fix about dialog crashing in Debian 9.0 (problem was Gdk::Pixbuf::create) 30 Aug 2017 * fix bug with three-dimensional gslice 8 Nov 2017 * update aclocal.m4: copy new version from /usr/share/aclocal/pkg.m4 14 Nov 2017 * update version number to 0.5 -- ready for release! 16 Nov 2017 * release Galois 0.5 28 Dec 2017 * remove unused widgets from Gnome 2-style menubar 29 Dec 2017 * replace all HBox and VBox with Box and Gtk::Orientation * replace gtk_show_uri with gtk_show_uri_on_window 30 Dec 2017 * simplify widget hierarchy using Gtk::Grid 18 Jun 2018 * fix copyright notices in doc/figure*.png 23 Jun 2018 * added Keywords to desktop file * fix malformed comments in man pages 25 Jun 2018 * fall back to gtk_show_uri for older gtk versions 26 Jun 2018 * update version number to 0.6 -- ready for release! 30 Jun 2018 * release Galois 0.6 7 Jul 2018 * symlink duplicate files in localized help directories 23 Feb 2020 * start refactoring blockset generation 25 Feb 2020 * continue refactoring blockset generation 2 Mar 2020 * continue refactoring blockset generation 3 Mar 2020 * make group::size() unsigned 4 Mar 2020 * make other variables and methods unsigned 5 Mar 2020 * make more variables and methods unsigned 14 Mar 2020 * continue refactoring blockset generation 15 Mar 2020 * offload blockset generation to a separate thread * require at least C++11 (std::thread) * depend on pthreads (Linux only?) 26 Mar 2020 * store a copy of current block instead of reading from vector 27 Mar 2020 * use std::mutex to fix race condition 28 Mar 2020 * adjust blockset_max() values * ensure worker is stopped on exit 31 Mar 2020 * fix case where depth wasn't preserved correctly on restart * improved blockset generation 4 Apr 2020 * further improved blockset generation 23 Aug 2020 * update version number to 0.7 -- ready for release! 29 Aug 2020 * release Galois 0.7 galois-0.7/misc/0000755000175000017500000000000013720471702011374 5ustar ioiogalois-0.7/misc/galois.svg0000644000175000017500000003131512301161775013376 0ustar ioio image/svg+xml galois.svg -- icon for galois. Copyright (C) 2012 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. galois-0.7/misc/makefile.in0000644000175000017500000000232312306420244013473 0ustar ioio# makefile -- makefile for galois miscellanies directory. # Copyright (C) 2012-2014 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @configure_input@ prefix = ${DESTDIR}@prefix@ AC = makefile galois.desktop BAK = *~ MENU = galois.desktop ICON = galois.png default: # other targets clean : - rm -f ${BAK} distclean : clean - rm -f ${AC} install : mkdir -p ${prefix}/share/applications cp ${MENU} ${prefix}/share/applications mkdir -p ${prefix}/share/pixmaps cp ${ICON} ${prefix}/share/pixmaps uninstall : cd ${prefix}/share/applications && rm -f ${MENU} cd ${prefix}/share/pixmaps && rm -f ${ICON} # dependencies galois-0.7/misc/galois.png0000644000175000017500000000520412301161765013360 0ustar ioioPNG  IHDR``w8sBIT|d pHYs^tEXtSoftwarewww.inkscape.org<tEXtDescriptiongalois.svg -- icon for galois. Copyright (C) 2012 Gerardo Ballabio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .^<EIDATx_Unim-`*-mPTjP DIԐBbDXh EE-DŶBECTԀF<ZRJCC{ν{frN{gfgi51 :%S P2 RtI)^f+-@J=L&Nê5#*-a6M MvÇJnX0GxYtwݐ+w*^f` βK ݢ8{+"ў7v:݈/G6j>`MJiz 47!G؅m& 95e*'n,!Ž& 7U22tFMlJ RK;pC~WSq[wlRJXTD|!YX7kRJj[TF|ln% y6G]ZmJLCSJ'i3,g2WϝʈeДx1ho9dAOw>'%"@x?j1CPJiRƤh,)ezWi'*xU#~ x‚mr_·q!8_k<_1:^JxYefBoBٛAޢ'xgD<7^JxD>S!s9]= 7 _#EK!ŸL7шqٮ4H)ݏ,C&] /=1|DquN/\y䲈xYxQ܄Y|fVf-pˋ}7˝_/u;:K)5 r9MC ϗEuWY PS3V-7{b᳸S32N)xb@Rsq{̟7_]iLaɧePڈatѪzxf#ǐž|Ƣץ],am|/e/uM_]D(PY*-D҈Hnu!wbL/#t& y`~t )n+2T"_%`9V= h&S "^E^pP0 |ʈxe-@l ,,Z CƝ( qX# ‹vixvG/m.#ͪ Qbgco)G]E&VY݇3yW9rї'vR8{@JixU?yAO>yyANa(^-;/֔қ*>9֧[6)ˏܽ[*:ލyA呻 lY0RCDyAr3NR^ИFh"bu@{*>܍-} z ?lV|CN'/hy4@ F 8üQ u^PAD. # @configure_input@ [Desktop Entry] Exec=@prefix@/games/galois Terminal=false Type=Application Categories=GNOME;GTK;Game;BlocksGame; Keywords=GNOME;GTK;Game;BlocksGame; StartupNotify=true Name=Galois Name[it]=Galois GenericName=Extended Falling Blocks Game GenericName[it]=Gioco potenziato con i blocchi che cadono Comment=Play with falling blocks of different shapes and sizes Comment[it]=Gioca con blocchi che cadono di diverse forme e dimensioni Icon=galois galois-0.7/makefile0000644000175000017500000000236312306420174012141 0ustar ioio# makefile -- makefile for galois. # Copyright (C) 2011-2014 Gerardo Ballabio # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . AC = config.log config.status autom4te.cache BAK = *~ default: cd src ; make # documentation html : cd doc ; make html pdf : cd doc ; make pdf # other targets clean : - rm -rf ${BAK} - cd src ; make clean - cd doc ; make clean - cd misc ; make clean distclean : clean - rm -rf ${AC} - cd src ; make distclean - cd doc ; make distclean - cd misc ; make distclean install : cd src ; make install cd doc ; make install cd misc ; make install uninstall : - cd src ; make uninstall - cd doc ; make uninstall - cd misc ; make uninstall