From 038e944e7ab36d76b66feffed3ec2ab0d8d757eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sat, 13 Sep 2025 23:16:11 +0200 Subject: [PATCH 01/17] First steps to conquer relicensing as GPL 3.0 --- GPL-3.0.txt | 674 +++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 733 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1407 insertions(+) create mode 100644 GPL-3.0.txt create mode 100644 LICENSE diff --git a/GPL-3.0.txt b/GPL-3.0.txt new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/GPL-3.0.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..14d87b3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,733 @@ +LICENSE +Current License + +This software is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). + +See the full text of the GPL-3.0 license in the file GPL-3.0.txt included with this distribution, or visit: https://www.gnu.org/licenses/gpl-3.0.html +Original Copyright and Relicensing History + +Original Copyright: Copyright (C) 1987-1988 Ed Barlow and Adam Bryant + +Original Distribution: This game was originally distributed via USENET newsgroups (comp.sources.games) starting October 26, 1987, under terms that restricted redistribution and modification. +Relicensing Permissions + +The original authors have granted explicit permission to relicense this work under the GNU General Public License. +The complete email communications granting these permissions are preserved below for legal clarity and transparency, as advised by Debian Legal. +Permission from Ed Barlow (2016) + +Original Message +ID de mensaje +Creado a las: 12 de marzo de 2016, 3:45 (entregado en 3 segundos) +De: Edward Barlow +Para: Juan Mendez +Asunto: RE: conquer relicensing +SPF: PASS con la IP 65.54.190.219 Más información +DMARC: 'PASS' Más información + + +Descargar original Copiar en el portapapeles +Delivered-To: vejeta@gmail.com +Received: by 10.194.221.73 with SMTP id qc9csp2645046wjc; + Fri, 11 Mar 2016 18:45:49 -0800 (PST) +X-Received: by 10.98.87.200 with SMTP id i69mr12696548pfj.63.1457750749381; + Fri, 11 Mar 2016 18:45:49 -0800 (PST) +Return-Path: +Received: from BAY004-OMC4S17.hotmail.com (bay004-omc4s17.hotmail.com. [65.54.190.219]) + by mx.google.com with ESMTPS id ss1si6489670pab.18.2016.03.11.18.45.49 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); + Fri, 11 Mar 2016 18:45:49 -0800 (PST) +Received-SPF: pass (google.com: domain of barlowedward@hotmail.com designates 65.54.190.219 as permitted sender) client-ip=65.54.190.219; +Authentication-Results: mx.google.com; + spf=pass (google.com: domain of barlowedward@hotmail.com designates 65.54.190.219 as permitted sender) smtp.mailfrom=barlowedward@hotmail.com; + dmarc=pass (p=NONE dis=NONE) header.from=hotmail.com +Received: from BAY402-EAS150 ([65.54.190.199]) by BAY004-OMC4S17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); + Fri, 11 Mar 2016 18:45:48 -0800 +X-TMN: [lBavvwD5LtzFtb4XMC3hMEOc5dLo/Wqr] +X-Originating-Email: [barlowedward@hotmail.com] +Message-ID: +Return-Path: barlowedward@hotmail.com +Date: Fri, 11 Mar 2016 18:45:46 -0800 +Subject: RE: conquer relicensing +Importance: normal +From: Edward Barlow +To: Juan Mendez +CC: "mdpoole@troilus.org" +MIME-Version: 1.0 +Content-Type: multipart/alternative; boundary="--_com.android.email_20792381026420" +X-OriginalArrivalTime: 12 Mar 2016 02:45:48.0797 (UTC) FILETIME=[48C672D0:01D17C09] + +----_com.android.email_20792381026420 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset="utf-8" + + + +Hey juan +Yes i delegated it all to adam aeons agoIm easy on it all.... copyleft di= +dnt exist when i wrote it and it was all for fun so... +Let me know if u need more. Ill read your article when i get home + +CheersEd + + +Sent from my Sprint Samsung Galaxy=C2=AE Note 4. + +-------- Original message -------- +From: Juan Mendez +Date: 3/11/2016 1:16 PM (GMT-08:00) +To: Edward Barlow +Cc: mdpoole@troilus.org +Subject: Re: conquer relicensing + +Greetings Ed, + +I'm glad of hearing about you. + +Back in 2006 I started a research to look for the history of conquer and +some related games. +I wrote an article back in 2011 here about that process: +http://vejeta.com/historia-del-conquer/ + +My intention in 2006 was getting a copyleft compatible license to be able +to get the code modified and packaged for a GNU/Linux distribution such as +Debian. + +I remember that after consulting with the debian-legal mailing list, I was +advised to get a written email copy from the authors giving such +permissions. (I could dig into such emails). I was surprised when Adam +himself found an article and wrote to me about that. + +Also, I remember starting the process of getting the code uploaded to gnu +savannah. + +I found two blockers. There was the use of a certain file written by a +third party that needed to be rewritten to avoid legal problems, and also +finding a way to be able to play in a mode that didn't require being a user +in the machine. Making it more like a service that we could telnet to. + + +It's a cool project and I'm glad you raise my awarenes about it :) + + +2016-02-29 0:06 GMT+01:00 Edward Barlow : + +> Hey +> +> Saw a 2006 note about conquer relicensing when i accidentally googled my +> name. +> +> Been aeons. If you have questions, i dont really care and dont think ada= +m +> cares +> that much either. What were you intending to do 10 years ago? +> +> Cheers +> +> Ed Barlow +> barlowedward@hotmail.com +> 914 837 4798 +> + + + +-- +http://vejeta.com +Fidonet: 2:345/432.2 +I'm an FSF member -- Help us support software freedom! +http://www.fsf.org/jf?referrer=3D10232 + +----_com.android.email_20792381026420 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset="utf-8" + + + + + + +
Hey juan
+

+
+
Yes i delegated it all to adam aeons ago
+
Im easy on it all....   copyleft didnt exist when i wrote it and = +it was all for fun so...
+

+
+
Let me know if u need more.  Ill read your article when i get hom= +e
+

+
+

+
+
Cheers
+
Ed
+

+
+

+
+

+
+
+
Sent from my Sprint Samsung Gala= +xy=C2=AE Note 4.
+
+
+
+-------- Original message --------
+From: Juan Mendez <vejeta@gmail.com>
+Date: 3/11/2016 1:16 PM (GMT-08:00)
+To: Edward Barlow <barlowedward@hotmail.com>
+Cc: mdpoole@troilus.org
+Subject: Re: conquer relicensing
+
+
+
+
+
+
Greetings Ed,
+
+
+I'm glad of hearing about you.
+
+
+Back in 2006 I started a research to look for the history of conquer and so= +me related games.
+
+
I wrote an article back in 2011 here about that process: +http://vejeta.com/historia-del-conquer/
+
+
+
My intention in 2006 was getting a copyleft compatible license to be a= +ble to get the code modified and packaged for a GNU/Linux distribution such= + as Debian.
+
+
+
I remember that after consulting with the debian-legal mailing list, I= + was advised to get a written email copy from the authors giving such permi= +ssions. (I could dig into such emails). I was surprised when Adam himself f= +ound an article and wrote to me + about that.
+
+
+
Also, I remember starting the process of getting the code uploaded to = +gnu savannah.
+
+
+
I found two blockers. There was the use of a certain file written by a= + third party that needed to be rewritten to avoid legal problems, and also = +finding a way to be able to play in a mode that didn't require being a user= + in the machine. Making it more + like a service that we could telnet to.
+
+
+

+
+
It's a cool project  and I'm glad you raise my awarenes about it = +:)
+
+

+
+
+

+
2016-02-29 0:06 GMT+01:00 Edward Barlow +<barlowedw= +ard@hotmail.com>:
+
+
+
Hey +

+
+
Saw a 2006 note about conquer relicensing when i accidenta= +lly googled my name.
+

+
+
Been aeons.  If you have questions, i dont really car= +e and dont think adam cares
+
that much either.  What were you intending to do 10 y= +ears ago?
+

+Cheers
+
+Ed Barlow + +
914 837 4798
+
+
+
+
+
+
+
+
+--
+
+
http://ve= +jeta.com
+Fidonet: 2:345/432.2
+I'm an FSF member -- Help us support software freedom! +http://www.fsf.org/jf?referrer=3D10232
+
+
+
+
+ + + +----_com.android.email_20792381026420-- + +Permission from Adam Bryant (2011) + +Original Message +ID de mensaje <8CDA1A4529FC479-7BC-17197@web-mmc-m04.sysops.aol.com> +Creado a las: 23 de febrero de 2011, 20:09 (entregado en 25 segundos) +De: adb@usa.com Con Mail.com Webmail 33222-STANDARD +Para: vejeta@vejeta.com +Asunto: Re: Saw a post looking into conquer (version 4) +SPF: NEUTRAL con la IP 0.0.0.0 Más información + + +Descargar original Copiar en el portapapeles +Delivered-To: vejeta@gmail.com +Received: by 10.229.10.215 with SMTP id q23cs310617qcq; + Wed, 23 Feb 2011 11:09:53 -0800 (PST) +Received: by 10.52.158.196 with SMTP id ww4mr6805695vdb.276.1298488192180; + Wed, 23 Feb 2011 11:09:52 -0800 (PST) +Return-Path: +Received: from mail-qw0-f48.google.com (mail-qw0-f48.google.com [209.85.216.48]) + by mx.google.com with ESMTPS id v22si11811015vcf.77.2011.02.23.11.09.51 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 23 Feb 2011 11:09:51 -0800 (PST) +Received-SPF: neutral (google.com: 209.85.216.48 is neither permitted nor denied by best guess record for domain of vejeta+caf_=vejeta=gmail.com@vejeta.com) client-ip=209.85.216.48; +Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.48 is neither permitted nor denied by best guess record for domain of vejeta+caf_=vejeta=gmail.com@vejeta.com) smtp.mail=vejeta+caf_=vejeta=gmail.com@vejeta.com +Received: by mail-qw0-f48.google.com with SMTP id 6so3445599qwd.7 + for ; Wed, 23 Feb 2011 11:09:51 -0800 (PST) +Received: by 10.229.247.10 with SMTP id ma10mr3392572qcb.4.1298488191155; + Wed, 23 Feb 2011 11:09:51 -0800 (PST) +X-Forwarded-To: vejeta@gmail.com +X-Forwarded-For: vejeta@vejeta.com vejeta@gmail.com +Delivered-To: vejeta@vejeta.com +Received: by 10.229.226.196 with SMTP id ix4cs337488qcb; + Wed, 23 Feb 2011 11:09:50 -0800 (PST) +Received: by 10.229.86.7 with SMTP id q7mr3386679qcl.262.1298488190786; + Wed, 23 Feb 2011 11:09:50 -0800 (PST) +Return-Path: +Received: from imr-da05.mx.aol.com (imr-da05.mx.aol.com [205.188.105.147]) + by mx.google.com with ESMTP id my6si15968053qcb.38.2011.02.23.11.09.50; + Wed, 23 Feb 2011 11:09:50 -0800 (PST) +Received-SPF: neutral (google.com: 205.188.105.147 is neither permitted nor denied by best guess record for domain of adb@usa.com) client-ip=205.188.105.147; +Received: from imo-ma02.mx.aol.com (imo-ma02.mx.aol.com [64.12.78.137]) by imr-da05.mx.aol.com (8.14.1/8.14.1) with ESMTP id p1NJ9aIV027750 for ; Wed, 23 Feb 2011 14:09:36 -0500 +Received: from adb@usa.com by imo-ma02.mx.aol.com + (mail_out_v42.9.) id g.fb7.c73cfb7 (37180) + for ; Wed, 23 Feb 2011 14:09:31 -0500 (EST) +Received: from smtprly-mb01.mx.aol.com (smtprly-mb01.mx.aol.com [64.12.207.148]) by cia-ma05.mx.aol.com (v129.9) with ESMTP id MAILCIAMA053-5c5e4d655b6622e; Wed, 23 Feb 2011 14:09:31 -0500 +Received: from web-mmc-m04 (web-mmc-m04.sim.aol.com [64.12.224.137]) by smtprly-mb01.mx.aol.com (v129.9) with ESMTP id MAILSMTPRLYMB014-5c5e4d655b6622e; Wed, 23 Feb 2011 14:09:26 -0500 +References: <20101229193843.2627.1861983277@osgiliath> +To: vejeta@vejeta.com +Subject: Re: Saw a post looking into conquer (version 4) +Date: Wed, 23 Feb 2011 14:09:26 -0500 +X-AOL-IP: 130.36.62.222 +In-Reply-To: +X-MB-Message-Source: WebUI +MIME-Version: 1.0 +From: adb@usa.com +X-MB-Message-Type: User +Content-Type: multipart/alternative; + boundary="--------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com" +X-Mailer: Mail.com Webmail 33222-STANDARD +Received: from 130.36.62.222 by web-mmc-m04.sysops.aol.com (64.12.224.137) with HTTP (WebMailUI); Wed, 23 Feb 2011 14:09:26 -0500 +Message-Id: <8CDA1A4529FC479-7BC-17197@web-mmc-m04.sysops.aol.com> +X-Spam-Flag: NO +X-AOL-SENDER: adb@usa.com + +----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset="utf-8" + +Glad that I eventually noticed your query. Sorry that it took so long. + +Later, + +Adam +=20 + +-----Original Message----- +From: Juan Manuel M=C3=A9ndez Rey +To: adb@usa.com +Sent: Wed, Feb 23, 2011 11:13 am +Subject: Re: Saw a post looking into conquer (version 4) + + + +2010/12/29 + +Not sure if this is the proper place to try to get in touch with him, but a= + message from "Juan" was posted a few years back (Oct. 2006) looking for cl= +arification on licensing for Conquer source code. + +Just wanted to confirm that I had no issues with publication of version 4 o= +f Conquer under the GPL. + +Feel free to forward this as needed and/or contact me at the email address = +entered above. + +Thanks, + +Adam + +-- +vejeta.com Administrator + +Ha recibido este correo porque Adam Bryant adb@usa.com le ha enviado un com= +entario sobre el sitio administrado por usted en http://vejeta.com/portal. + + + + + +Greetings Adam, + + + +Sorry for the delay, I haven't seen this email till today, and your messag= +e comes as a surprise.=20 + + + +Yes, I'm Juan, the one who at that time initiated the quest of getting in t= +ouch with Ed Barlow and Adam Bryant, creators of a game that I used to play= + a lot in Unix as a freshman during 1994 and so on. + + + +During that time I could contact Ed Barlow who told me that you were the ow= +ner of the copyright of conquer v5.=20 + + +It seems it was needed the permission of both you to relicense the code to = +the GPL.=20 +I understood that a mail could be sufficient as a way of granting permissio= +n for the relicensing. + + +I may need to contact you again, if a more verbose statement is needed.=20 + + +Thanks Adam a lot for your interest, + + +Juan M. M=C3=A9ndez + + + + +PS: As I sidenote: I was a great fan of that game and being a merely teenag= +er back then considered you as the famous creators of the game. +So this email was kind of a flashback and a happy surprise, my old college = +partners will be happy with the news. + + + + + +=20 + +----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset="utf-8" + + +Glad that I eventually noticed your query.  Sorry that it took so long= +.
+
+Later,
+
+Adam +

+ +
+ + + +
-----Original Message-----
+ +From: Juan Manuel M=C3=A9ndez Rey <vejeta@vejeta.com>
+ +To: adb@usa.com
+ +Sent: Wed, Feb 23, 2011 11:13 am
+ +Subject: Re: Saw a post looking into conquer (version 4)
+ +
+ + + + + + + + +
+ + + +
+ +
+ +
2010/12/29 <vejeta@vejeta.com>
+ + + +
+ +
+Not sure if this is the proper place to try to get in touch with him, but a= + message from "Juan" was posted a few years back (Oct. 2006) looking for cl= +arification on licensing for Conquer source code.
+ + +
+ + +Just wanted to confirm that I had no issues with publication of version 4 o= +f Conquer under the GPL.
+ + +
+ + +Feel free to forward this as needed and/or contact me at the email address = +entered above.
+ + +
+ + +Thanks,
+ + +
+ + +Adam
+ + +
+ + +--
+ + += +vejeta.com Administrator
+ + +
+ + +Ha recibido este correo porque Adam Bryant adb@usa.com le ha enviado un comentario sobre= + el sitio administrado por usted en http://vejeta.com/portal. + + + +
+ + +
+ +
+ +
+ +
+ +
+ + + +
Greetings Adam, + +

+ +
+ + + +
+ +
Sorry for the delay, I haven't seen this email till today,  and y= +our message comes as a surprise. 
+ + + +

+ +
+ + + +
+ + +
Yes, I'm Juan, the one who at that time initiated the quest of getting= + in touch with Ed Barlow and Adam Bryant, creators of a game that I us= +ed to play a lot in Unix as a freshman during 1994 and so on.
+ +
+ + + + +

+ +
+ + + +
During that time I could contact Ed Barlow who told me that you were t= +he owner of the copyright of conquer v5. 
+ + + +

+ +
+ + + +
It seems it was needed the permission of both you to relicense the cod= +e to the GPL. 
+ + + + +
I understood that a mail could be sufficient as a way of granting perm= +ission for the relicensing.
+ + + +

+ +
+ + + +
I may need to contact you again, if a more verbose statement is needed= +. 
+ + + +

+ +
+ + + + +
Thanks Adam a lot for your interest,
+ + + +

+ +
+ + + +
Juan M. M=C3=A9ndez
+ + + +

+ +
+ + + +

+ +
+ + + +
PS: As I sidenote: I was a great fan of that game and being a merely t= +eenager back then considered you as the famous creators of the game.
+ + + + +
So this email was kind of a flashback and a happy surprise, my old col= +lege partners will be happy with the news.
+ + + +

+ +
+ +
+ +
+ + + +

+ +
+ + + +
+ + + +
+ +
+ +----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com-- + +License Terms + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/. +Additional Notes + + Original USENET posts and historical references can be found in the file HISTORY.md + The relicensing process began in 2006 when Vejeta contacted the original authors + This relicensing effort was discussed on Debian Legal mailing lists and other forums + All source code extraction and compilation from original USENET posts was performed by the maintainer + +Repository Maintainer: Vejeta +Relicensing Contact: vejeta@gmail.com +Last Updated: 13th September 2025 From a6511b98c58bdf1b3107b40b0e0d474fd26e5abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sat, 13 Sep 2025 23:21:56 +0200 Subject: [PATCH 02/17] Add a HISTORY.md --- HISTORY.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 HISTORY.md diff --git a/HISTORY.md b/HISTORY.md new file mode 100644 index 0000000..f9ab77a --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,84 @@ +# History of Conquer + +## Timeline + +### October 26, 1987 - Original Release +**Conquest begins to be posted on comp.sources.games** + +v02i058: conquest – middle earth multi-player game, Part01/05 + +[Original USENET post](http://groups.google.es/group/comp.sources.games/browse_thread/thread/d7cf1d13d3ad2a18/324b78a5bf6ff2ea?lnk=st&q=conquest+barlow&rnum=517#324b78a5bf6ff2ea) + +### June 16, 1988 - Version 3 Release +**Conquer 3: v04i042: conquer3 – middle earth multi-player game (V3), Part01/08** + +Posted in comp.sources.games + +[USENET post for v3](http://groups.google.es/group/comp.sources.games/browse_thread/thread/23bfc97badb334ba/f1316ffe73640157?lnk=st&q=conquest+barlow&rnum=496#f1316ffe73640157) + +### November 12, 1997 - Newsletter #2 +**conquest newsletter #2 in rec.games.empire** + +[Newsletter discussion](http://groups.google.es/group/rec.games.empire/browse_thread/thread/fab56ce19c4b0f90/f9bc206de4016cbe#f9bc206de4016cbe) + +### Conquest Newsletter #3 +**Conquest Newsletter #3 in rec.games.empire** + +[Newsletter #3 discussion](http://groups.google.es/group/rec.games.empire/browse_thread/thread/e62718c10cd8d3d2/957c0bb68ea157fe?lnk=st&q=conquest+barlow&rnum=4#957c0bb68ea157fe) + +## Bug Reports and Community Activity + +### Rule Exploits and Bug Reports +**Abusing the rules** + +[Discussion about rule abuse](http://groups.google.es/group/comp.sources.games.bugs/browse_thread/thread/182e7402b6fdfaa1/17685beba70b796b?lnk=st&q=conquest+barlow&rnum=497#17685beba70) + +**Bugs were posted in comp.sources.games.bugs** + +[Bug reports discussion](http://groups.google.es/group/comp.sources.games.bugs/browse_thread/thread/65313fdd9a9d11b5/657e1757d3543427?lnk=st&q=conquest+barlow&rnum=498#657e1757d35) + +### January 23, 1988 - Adam Bryant's First Message +**More bugs, and first message from Adam Bryant** + +[Adam Bryant's first contribution](http://groups.google.es/group/rec.games.empire/browse_thread/thread/9d7fcbfe2da74628/ea45e9187af496de?lnk=st&q=conquest+barlow&rnum=500#ea45e9187af496de) + +## Relicensing Efforts (2006-2011) + +### 2006 - Initial Contact with Ed Barlow +In the year 2006, someone called Vejeta contacted the authors to relicense the code and managed to contact Ed Barlow, who gave permission to relicense it. + +**References:** +- [GNU Savannah task](http://savannah.gnu.org/task/?5945) +- [Debian Legal discussion](http://lists.debian.org/debian-legal/2006/10/msg00063.html) + +### February 23, 2011 - Adam Bryant's Permission +[vejeta.com](https://web.archive.org/web/20081015182607/http://vejeta.no-ip.org/conquerv4/) received a message through its contact form from Adam Bryant, who had heard news of the request to release the code. He granted permission to release the code under GPL. + +## Technical Notes + +The original code could be extracted and assembled from the original USENET messages using specialized tools (specific tools not recalled by the maintainer). + +## Additional References + +### Community Discussions + +**Asking on barrapunto about how to relicense it:** +[Barrapunto discussion](http://preguntas.barrapunto.com/~vejeta/journal/22901) + +**About conquer and dominion:** +- [Spanish Unix discussion](https://groups.google.com/group/es.comp.os.unix/browse_thread/thread/808b677b6af29aea/79a5a3abd161f7f1?q=conquer+vejeta+estrategia#79a5a3abd161f7f1) +- [Debian Spanish users discussion](https://groups.google.com/group/linux.debian.user.spanish/browse_thread/thread/21fc1bf9b912e340/4589e637807bd1ff?q=conquer+vejeta#4589e637807bd1ff) + +## About the Game + +Conquer is a Middle Earth multi-player strategy game that was originally distributed through USENET newsgroups in the late 1980s. The game was created by Ed Barlow and Adam Bryant and became popular in early computer gaming communities. + +The game's distribution method through USENET was typical of the era, when source code was shared across newsgroups and assembled by users from multiple parts posted sequentially. + +## Legacy + +This historical documentation preserves the timeline of one of the early multi-player computer games and demonstrates the evolution of open source software licensing practices. The successful relicensing effort by Vejeta (2006-2011) serves as an example of how legacy software can be preserved and made available to modern audiences under open source licenses. + +--- + +*This history is based on original USENET posts and community discussions from 1987-2011. All links reference historical archives and community discussions from the era.* \ No newline at end of file From 128bb69a6bad64a28dcbfeaf2dc93e5baa9e67d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 14 Sep 2025 01:12:40 +0200 Subject: [PATCH 03/17] Provide a consistent new relicense while maintaining attribution to the original authors and notices to make it compatible with GPL v3 --- AUTHORS.md | 106 ++++ LICENSE | 744 ++-------------------------- Makefile | 21 + README | 362 +++++++------- RELICENSING-PERMISSIONS.md | 779 ++++++++++++++++++++++++++++++ admin.c | 29 +- cexecute.c | 30 +- check.c | 22 +- combat.c | 29 +- commands.c | 29 +- data.c | 29 +- data.h | 50 +- display.c | 32 +- extcmds.c | 33 +- forms.c | 31 +- header.h | 108 +---- io.c | 32 +- magic.c | 30 +- main.c | 29 +- makeworl.c | 31 +- misc.c | 22 +- move.c | 29 +- navy.c | 22 +- newhelp.c | 32 +- newlogin.c | 30 +- newlogin.h | 22 +- npc.c | 29 +- oMakefile | 21 + patchlevel.h | 21 + psmap.c | 20 +- psmap.h | 22 +- randeven.c | 22 +- reports.c | 33 +- sort.c | 43 +- spew.c | 965 +++++++++++++++++++------------------ trade.c | 38 +- update.c | 29 +- utilities/Makefile | 21 + utilities/README | 28 +- utilities/conqrast.c | 21 + utilities/error.c | 21 + utilities/file.c | 21 + utilities/file.h | 25 +- utilities/sunconqrast.h | 25 +- utilities/sunstuff.c | 21 + utilities/util.c | 21 + utilities/xconqrast.h | 34 +- utilities/xstuff.c | 21 + 48 files changed, 2462 insertions(+), 1753 deletions(-) create mode 100644 AUTHORS.md create mode 100644 RELICENSING-PERMISSIONS.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..b2aa44e --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,106 @@ +# AUTHORS + +This file lists the contributors to the Conquer game project. + +## Original Authors (1987-1988) + +**Ed Barlow** +*Original creator and lead developer* +- Created the initial version of Conquer +- Distributed via USENET comp.sources.games (October 26, 1987) +- Developed the core game mechanics and engine +- Copyright holder (1987-1988) + +**Adam Bryant** +*Co-author and maintainer* +- Co-developer of the original game +- Maintained and enhanced the code through version 4 +- Handled community feedback and bug fixes +- Active in USENET community discussions +- Copyright holder (1987-1988) + +## Historical Context + +The original Conquer was developed during the late 1980s when source code was commonly distributed through USENET newsgroups. Both authors contributed significantly to early computer gaming and open source distribution methods. + +## Modern Maintainers and Contributors + +### GPL Relicensing and Preservation + +**Vejeta (Juan Manuel Méndez Rey)** +*GPL relicensing coordinator and current maintainer* +- Initiated the relicensing effort in 2006 +- Successfully contacted both original authors for permissions +- Extracted and compiled code from original USENET posts +- Documented the complete history and relicensing process +- Current repository maintainer (2006-present) +- Created comprehensive documentation and legal framework + +### Related Projects and Forks + +**quixadhal (Dread Quixadhal)** - https://github.com/quixadhal +*Alternative maintainer and code preservation* +- Maintains a parallel version at https://github.com/quixadhal/conquer +- Preserves the original codebase and documentation +- Provides alternative access point for the historical code + +## Community Contributors + +### Historical Community +- **USENET community** (comp.sources.games, rec.games.empire) +- **Early Unix gaming community** (1987-1990s) +- Various bug reporters and testers from the original USENET distributions + +### Modern Community +- **Debian Legal mailing list** contributors who provided licensing guidance +- **GNU Savannah** community members who assisted with project hosting +- **Barrapunto** community members who provided technical advice + +## Special Acknowledgments + +### Legal and Technical Advisors +- **Debian Legal mailing list** - Provided crucial guidance on GPL relicensing procedures +- **Free Software Foundation** - Licensing framework and philosophy +- **GNU Savannah** - Initial hosting and project management support + +### Historical Preservation +- **Google Groups/USENET archives** - Preserved original discussions and source code +- **Internet Archive/Wayback Machine** - Historical website preservation +- **Various gaming historians and archivists** - Documented early computer gaming history + +## Project Roles + +### Original Development (1987-1988) +- **Ed Barlow**: Game design, core engine, initial implementation +- **Adam Bryant**: Co-development, maintenance, community management + +### GPL Relicensing Era (2006-2011) +- **Juan Manuel Méndez Rey (Vejeta)**: Legal coordination, author contact, documentation +- **Ed Barlow**: Permission granting, historical clarification +- **Adam Bryant**: Permission confirmation, copyright clarification + +### Current Era (2011-present) +- **Vejeta**: Primary maintainer, documentation, community coordination +- **quixadhal**: Alternative preservation, parallel maintenance + +## Contributing + +This project represents a successful example of preserving legacy software through proper legal channels and community collaboration. The relicensing effort demonstrates how historical software can be made available to modern audiences while respecting original copyright holders. + +### For New Contributors +- See `CONTRIBUTING.md` for guidelines (if available) +- Review `HISTORY.md` for project background +- Check `RELICENSING-PERMISSIONS.md` for legal framework +- Follow GNU General Public License v3.0+ terms + +## Contact Information + +- **Current Maintainer**: vejeta@gmail.com +- **Project Repository**: https://github.com/vejeta/conquer +- **Historical Reference**: http://vejeta.com/historia-del-conquer/ + +--- + +This file follows the GNU Coding Standards and Free Software Foundation guidelines for contributor attribution in free software projects. + +**Last Updated**: September 13, 2025 \ No newline at end of file diff --git a/LICENSE b/LICENSE index 14d87b3..9688d8d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,733 +1,59 @@ -LICENSE -Current License +# LICENSE -This software is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). +## Current License -See the full text of the GPL-3.0 license in the file GPL-3.0.txt included with this distribution, or visit: https://www.gnu.org/licenses/gpl-3.0.html -Original Copyright and Relicensing History +This software is licensed under the **GNU General Public License v3.0 or later** (GPL-3.0-or-later). -Original Copyright: Copyright (C) 1987-1988 Ed Barlow and Adam Bryant +**Copyright (C) 1987-1988 Ed Barlow and Adam Bryant** +**Copyright (C) 2006-present Vejeta (GPL relicensing and maintenance)** -Original Distribution: This game was originally distributed via USENET newsgroups (comp.sources.games) starting October 26, 1987, under terms that restricted redistribution and modification. -Relicensing Permissions +See the full text of the GPL-3.0 license in the file `GPL-3.0.txt` included with this distribution, or visit: https://www.gnu.org/licenses/gpl-3.0.html -The original authors have granted explicit permission to relicense this work under the GNU General Public License. -The complete email communications granting these permissions are preserved below for legal clarity and transparency, as advised by Debian Legal. -Permission from Ed Barlow (2016) +## Relicensing History -Original Message -ID de mensaje -Creado a las: 12 de marzo de 2016, 3:45 (entregado en 3 segundos) -De: Edward Barlow -Para: Juan Mendez -Asunto: RE: conquer relicensing -SPF: PASS con la IP 65.54.190.219 Más información -DMARC: 'PASS' Más información +**Original Distribution:** This game was originally distributed via USENET newsgroups starting October 26, 1987, under restrictive terms that prohibited redistribution and modification. +**Relicensing:** The original authors have granted explicit written permission to relicense this work under the GNU General Public License. -Descargar original Copiar en el portapapeles -Delivered-To: vejeta@gmail.com -Received: by 10.194.221.73 with SMTP id qc9csp2645046wjc; - Fri, 11 Mar 2016 18:45:49 -0800 (PST) -X-Received: by 10.98.87.200 with SMTP id i69mr12696548pfj.63.1457750749381; - Fri, 11 Mar 2016 18:45:49 -0800 (PST) -Return-Path: -Received: from BAY004-OMC4S17.hotmail.com (bay004-omc4s17.hotmail.com. [65.54.190.219]) - by mx.google.com with ESMTPS id ss1si6489670pab.18.2016.03.11.18.45.49 - for - (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); - Fri, 11 Mar 2016 18:45:49 -0800 (PST) -Received-SPF: pass (google.com: domain of barlowedward@hotmail.com designates 65.54.190.219 as permitted sender) client-ip=65.54.190.219; -Authentication-Results: mx.google.com; - spf=pass (google.com: domain of barlowedward@hotmail.com designates 65.54.190.219 as permitted sender) smtp.mailfrom=barlowedward@hotmail.com; - dmarc=pass (p=NONE dis=NONE) header.from=hotmail.com -Received: from BAY402-EAS150 ([65.54.190.199]) by BAY004-OMC4S17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); - Fri, 11 Mar 2016 18:45:48 -0800 -X-TMN: [lBavvwD5LtzFtb4XMC3hMEOc5dLo/Wqr] -X-Originating-Email: [barlowedward@hotmail.com] -Message-ID: -Return-Path: barlowedward@hotmail.com -Date: Fri, 11 Mar 2016 18:45:46 -0800 -Subject: RE: conquer relicensing -Importance: normal -From: Edward Barlow -To: Juan Mendez -CC: "mdpoole@troilus.org" -MIME-Version: 1.0 -Content-Type: multipart/alternative; boundary="--_com.android.email_20792381026420" -X-OriginalArrivalTime: 12 Mar 2016 02:45:48.0797 (UTC) FILETIME=[48C672D0:01D17C09] +### Summary of Permissions Granted -----_com.android.email_20792381026420 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; charset="utf-8" +1. **Ed Barlow (2016):** *"Yes i delegated it all to adam aeons ago. Im easy on it all.... copyleft didnt exist when i wrote it and it was all for fun so..."* - Granted permission to relicense under GPL. +2. **Adam Bryant (2011):** *"Just wanted to confirm that I had no issues with publication of version 4 of Conquer under the GPL."* - Confirmed permission to release under GPL. +### Legal Documentation -Hey juan -Yes i delegated it all to adam aeons agoIm easy on it all.... copyleft di= -dnt exist when i wrote it and it was all for fun so... -Let me know if u need more. Ill read your article when i get home +**⚠️ COMPLETE EMAIL EVIDENCE:** The full, unedited email correspondence containing the explicit relicensing permissions from both original authors is preserved in [`RELICENSING-PERMISSIONS.md`](RELICENSING-PERMISSIONS.md) for legal compliance and transparency. -CheersEd +This approach follows Debian Legal advice to preserve complete written permissions from copyright holders. +## License Terms -Sent from my Sprint Samsung Galaxy=C2=AE Note 4. +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. --------- Original message -------- -From: Juan Mendez -Date: 3/11/2016 1:16 PM (GMT-08:00) -To: Edward Barlow -Cc: mdpoole@troilus.org -Subject: Re: conquer relicensing +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -Greetings Ed, +You should have received a copy of the GNU General Public License along with this program. If not, see . -I'm glad of hearing about you. +## Additional Notes -Back in 2006 I started a research to look for the history of conquer and -some related games. -I wrote an article back in 2011 here about that process: -http://vejeta.com/historia-del-conquer/ +- Original USENET posts and historical references can be found in [`HISTORY.md`](HISTORY.md) +- The relicensing process began in 2006 when Vejeta contacted the original authors +- This relicensing effort was discussed on Debian Legal mailing lists and other forums +- All source code extraction and compilation from original USENET posts was performed by the maintainer -My intention in 2006 was getting a copyleft compatible license to be able -to get the code modified and packaged for a GNU/Linux distribution such as -Debian. +## Files in This Repository -I remember that after consulting with the debian-legal mailing list, I was -advised to get a written email copy from the authors giving such -permissions. (I could dig into such emails). I was surprised when Adam -himself found an article and wrote to me about that. +- `LICENSE` - This file (main license information) +- `RELICENSING-PERMISSIONS.md` - Complete email correspondence (legal evidence) +- `GPL-3.0.txt` - Full GPL-3.0 license text +- `HISTORY.md` - Historical information about the game +- `AUTHORS.md` - Credits and contributors -Also, I remember starting the process of getting the code uploaded to gnu -savannah. +--- -I found two blockers. There was the use of a certain file written by a -third party that needed to be rewritten to avoid legal problems, and also -finding a way to be able to play in a mode that didn't require being a user -in the machine. Making it more like a service that we could telnet to. +**Repository Maintainer:** Juan Manuel Méndez Rey (Vejeta) +**Relicensing Contact:** vejeta@gmail.com +**Last Updated:** 13th September 2025 - -It's a cool project and I'm glad you raise my awarenes about it :) - - -2016-02-29 0:06 GMT+01:00 Edward Barlow : - -> Hey -> -> Saw a 2006 note about conquer relicensing when i accidentally googled my -> name. -> -> Been aeons. If you have questions, i dont really care and dont think ada= -m -> cares -> that much either. What were you intending to do 10 years ago? -> -> Cheers -> -> Ed Barlow -> barlowedward@hotmail.com -> 914 837 4798 -> - - - --- -http://vejeta.com -Fidonet: 2:345/432.2 -I'm an FSF member -- Help us support software freedom! -http://www.fsf.org/jf?referrer=3D10232 - -----_com.android.email_20792381026420 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/html; charset="utf-8" - - - - - - -
Hey juan
-

-
-
Yes i delegated it all to adam aeons ago
-
Im easy on it all....   copyleft didnt exist when i wrote it and = -it was all for fun so...
-

-
-
Let me know if u need more.  Ill read your article when i get hom= -e
-

-
-

-
-
Cheers
-
Ed
-

-
-

-
-

-
-
-
Sent from my Sprint Samsung Gala= -xy=C2=AE Note 4.
-
-
-
--------- Original message --------
-From: Juan Mendez <vejeta@gmail.com>
-Date: 3/11/2016 1:16 PM (GMT-08:00)
-To: Edward Barlow <barlowedward@hotmail.com>
-Cc: mdpoole@troilus.org
-Subject: Re: conquer relicensing
-
-
-
-
-
-
Greetings Ed,
-
-
-I'm glad of hearing about you.
-
-
-Back in 2006 I started a research to look for the history of conquer and so= -me related games.
-
-
I wrote an article back in 2011 here about that process: -http://vejeta.com/historia-del-conquer/
-
-
-
My intention in 2006 was getting a copyleft compatible license to be a= -ble to get the code modified and packaged for a GNU/Linux distribution such= - as Debian.
-
-
-
I remember that after consulting with the debian-legal mailing list, I= - was advised to get a written email copy from the authors giving such permi= -ssions. (I could dig into such emails). I was surprised when Adam himself f= -ound an article and wrote to me - about that.
-
-
-
Also, I remember starting the process of getting the code uploaded to = -gnu savannah.
-
-
-
I found two blockers. There was the use of a certain file written by a= - third party that needed to be rewritten to avoid legal problems, and also = -finding a way to be able to play in a mode that didn't require being a user= - in the machine. Making it more - like a service that we could telnet to.
-
-
-

-
-
It's a cool project  and I'm glad you raise my awarenes about it = -:)
-
-

-
-
-

-
2016-02-29 0:06 GMT+01:00 Edward Barlow -<barlowedw= -ard@hotmail.com>:
-
-
-
Hey -

-
-
Saw a 2006 note about conquer relicensing when i accidenta= -lly googled my name.
-

-
-
Been aeons.  If you have questions, i dont really car= -e and dont think adam cares
-
that much either.  What were you intending to do 10 y= -ears ago?
-

-Cheers
-
-Ed Barlow - -
914 837 4798
-
-
-
-
-
-
-
-
---
-
-
http://ve= -jeta.com
-Fidonet: 2:345/432.2
-I'm an FSF member -- Help us support software freedom! -http://www.fsf.org/jf?referrer=3D10232
-
-
-
-
- - - -----_com.android.email_20792381026420-- - -Permission from Adam Bryant (2011) - -Original Message -ID de mensaje <8CDA1A4529FC479-7BC-17197@web-mmc-m04.sysops.aol.com> -Creado a las: 23 de febrero de 2011, 20:09 (entregado en 25 segundos) -De: adb@usa.com Con Mail.com Webmail 33222-STANDARD -Para: vejeta@vejeta.com -Asunto: Re: Saw a post looking into conquer (version 4) -SPF: NEUTRAL con la IP 0.0.0.0 Más información - - -Descargar original Copiar en el portapapeles -Delivered-To: vejeta@gmail.com -Received: by 10.229.10.215 with SMTP id q23cs310617qcq; - Wed, 23 Feb 2011 11:09:53 -0800 (PST) -Received: by 10.52.158.196 with SMTP id ww4mr6805695vdb.276.1298488192180; - Wed, 23 Feb 2011 11:09:52 -0800 (PST) -Return-Path: -Received: from mail-qw0-f48.google.com (mail-qw0-f48.google.com [209.85.216.48]) - by mx.google.com with ESMTPS id v22si11811015vcf.77.2011.02.23.11.09.51 - (version=TLSv1/SSLv3 cipher=OTHER); - Wed, 23 Feb 2011 11:09:51 -0800 (PST) -Received-SPF: neutral (google.com: 209.85.216.48 is neither permitted nor denied by best guess record for domain of vejeta+caf_=vejeta=gmail.com@vejeta.com) client-ip=209.85.216.48; -Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.48 is neither permitted nor denied by best guess record for domain of vejeta+caf_=vejeta=gmail.com@vejeta.com) smtp.mail=vejeta+caf_=vejeta=gmail.com@vejeta.com -Received: by mail-qw0-f48.google.com with SMTP id 6so3445599qwd.7 - for ; Wed, 23 Feb 2011 11:09:51 -0800 (PST) -Received: by 10.229.247.10 with SMTP id ma10mr3392572qcb.4.1298488191155; - Wed, 23 Feb 2011 11:09:51 -0800 (PST) -X-Forwarded-To: vejeta@gmail.com -X-Forwarded-For: vejeta@vejeta.com vejeta@gmail.com -Delivered-To: vejeta@vejeta.com -Received: by 10.229.226.196 with SMTP id ix4cs337488qcb; - Wed, 23 Feb 2011 11:09:50 -0800 (PST) -Received: by 10.229.86.7 with SMTP id q7mr3386679qcl.262.1298488190786; - Wed, 23 Feb 2011 11:09:50 -0800 (PST) -Return-Path: -Received: from imr-da05.mx.aol.com (imr-da05.mx.aol.com [205.188.105.147]) - by mx.google.com with ESMTP id my6si15968053qcb.38.2011.02.23.11.09.50; - Wed, 23 Feb 2011 11:09:50 -0800 (PST) -Received-SPF: neutral (google.com: 205.188.105.147 is neither permitted nor denied by best guess record for domain of adb@usa.com) client-ip=205.188.105.147; -Received: from imo-ma02.mx.aol.com (imo-ma02.mx.aol.com [64.12.78.137]) by imr-da05.mx.aol.com (8.14.1/8.14.1) with ESMTP id p1NJ9aIV027750 for ; Wed, 23 Feb 2011 14:09:36 -0500 -Received: from adb@usa.com by imo-ma02.mx.aol.com - (mail_out_v42.9.) id g.fb7.c73cfb7 (37180) - for ; Wed, 23 Feb 2011 14:09:31 -0500 (EST) -Received: from smtprly-mb01.mx.aol.com (smtprly-mb01.mx.aol.com [64.12.207.148]) by cia-ma05.mx.aol.com (v129.9) with ESMTP id MAILCIAMA053-5c5e4d655b6622e; Wed, 23 Feb 2011 14:09:31 -0500 -Received: from web-mmc-m04 (web-mmc-m04.sim.aol.com [64.12.224.137]) by smtprly-mb01.mx.aol.com (v129.9) with ESMTP id MAILSMTPRLYMB014-5c5e4d655b6622e; Wed, 23 Feb 2011 14:09:26 -0500 -References: <20101229193843.2627.1861983277@osgiliath> -To: vejeta@vejeta.com -Subject: Re: Saw a post looking into conquer (version 4) -Date: Wed, 23 Feb 2011 14:09:26 -0500 -X-AOL-IP: 130.36.62.222 -In-Reply-To: -X-MB-Message-Source: WebUI -MIME-Version: 1.0 -From: adb@usa.com -X-MB-Message-Type: User -Content-Type: multipart/alternative; - boundary="--------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com" -X-Mailer: Mail.com Webmail 33222-STANDARD -Received: from 130.36.62.222 by web-mmc-m04.sysops.aol.com (64.12.224.137) with HTTP (WebMailUI); Wed, 23 Feb 2011 14:09:26 -0500 -Message-Id: <8CDA1A4529FC479-7BC-17197@web-mmc-m04.sysops.aol.com> -X-Spam-Flag: NO -X-AOL-SENDER: adb@usa.com - -----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; charset="utf-8" - -Glad that I eventually noticed your query. Sorry that it took so long. - -Later, - -Adam -=20 - ------Original Message----- -From: Juan Manuel M=C3=A9ndez Rey -To: adb@usa.com -Sent: Wed, Feb 23, 2011 11:13 am -Subject: Re: Saw a post looking into conquer (version 4) - - - -2010/12/29 - -Not sure if this is the proper place to try to get in touch with him, but a= - message from "Juan" was posted a few years back (Oct. 2006) looking for cl= -arification on licensing for Conquer source code. - -Just wanted to confirm that I had no issues with publication of version 4 o= -f Conquer under the GPL. - -Feel free to forward this as needed and/or contact me at the email address = -entered above. - -Thanks, - -Adam - --- -vejeta.com Administrator - -Ha recibido este correo porque Adam Bryant adb@usa.com le ha enviado un com= -entario sobre el sitio administrado por usted en http://vejeta.com/portal. - - - - - -Greetings Adam, - - - -Sorry for the delay, I haven't seen this email till today, and your messag= -e comes as a surprise.=20 - - - -Yes, I'm Juan, the one who at that time initiated the quest of getting in t= -ouch with Ed Barlow and Adam Bryant, creators of a game that I used to play= - a lot in Unix as a freshman during 1994 and so on. - - - -During that time I could contact Ed Barlow who told me that you were the ow= -ner of the copyright of conquer v5.=20 - - -It seems it was needed the permission of both you to relicense the code to = -the GPL.=20 -I understood that a mail could be sufficient as a way of granting permissio= -n for the relicensing. - - -I may need to contact you again, if a more verbose statement is needed.=20 - - -Thanks Adam a lot for your interest, - - -Juan M. M=C3=A9ndez - - - - -PS: As I sidenote: I was a great fan of that game and being a merely teenag= -er back then considered you as the famous creators of the game. -So this email was kind of a flashback and a happy surprise, my old college = -partners will be happy with the news. - - - - - -=20 - -----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com -Content-Transfer-Encoding: quoted-printable -Content-Type: text/html; charset="utf-8" - - -Glad that I eventually noticed your query.  Sorry that it took so long= -.
-
-Later,
-
-Adam -

- -
- - - -
-----Original Message-----
- -From: Juan Manuel M=C3=A9ndez Rey <vejeta@vejeta.com>
- -To: adb@usa.com
- -Sent: Wed, Feb 23, 2011 11:13 am
- -Subject: Re: Saw a post looking into conquer (version 4)
- -
- - - - - - - - -
- - - -
- -
- -
2010/12/29 <vejeta@vejeta.com>
- - - -
- -
-Not sure if this is the proper place to try to get in touch with him, but a= - message from "Juan" was posted a few years back (Oct. 2006) looking for cl= -arification on licensing for Conquer source code.
- - -
- - -Just wanted to confirm that I had no issues with publication of version 4 o= -f Conquer under the GPL.
- - -
- - -Feel free to forward this as needed and/or contact me at the email address = -entered above.
- - -
- - -Thanks,
- - -
- - -Adam
- - -
- - ---
- - -= -vejeta.com Administrator
- - -
- - -Ha recibido este correo porque Adam Bryant adb@usa.com le ha enviado un comentario sobre= - el sitio administrado por usted en http://vejeta.com/portal. - - - -
- - -
- -
- -
- -
- -
- - - -
Greetings Adam, - -

- -
- - - -
- -
Sorry for the delay, I haven't seen this email till today,  and y= -our message comes as a surprise. 
- - - -

- -
- - - -
- - -
Yes, I'm Juan, the one who at that time initiated the quest of getting= - in touch with Ed Barlow and Adam Bryant, creators of a game that I us= -ed to play a lot in Unix as a freshman during 1994 and so on.
- -
- - - - -

- -
- - - -
During that time I could contact Ed Barlow who told me that you were t= -he owner of the copyright of conquer v5. 
- - - -

- -
- - - -
It seems it was needed the permission of both you to relicense the cod= -e to the GPL. 
- - - - -
I understood that a mail could be sufficient as a way of granting perm= -ission for the relicensing.
- - - -

- -
- - - -
I may need to contact you again, if a more verbose statement is needed= -. 
- - - -

- -
- - - - -
Thanks Adam a lot for your interest,
- - - -

- -
- - - -
Juan M. M=C3=A9ndez
- - - -

- -
- - - -

- -
- - - -
PS: As I sidenote: I was a great fan of that game and being a merely t= -eenager back then considered you as the famous creators of the game.
- - - - -
So this email was kind of a flashback and a happy surprise, my old col= -lege partners will be happy with the news.
- - - -

- -
- -
- -
- - - -

- -
- - - -
- - - -
- -
- -----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com-- - -License Terms - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/. -Additional Notes - - Original USENET posts and historical references can be found in the file HISTORY.md - The relicensing process began in 2006 when Vejeta contacted the original authors - This relicensing effort was discussed on Debian Legal mailing lists and other forums - All source code extraction and compilation from original USENET posts was performed by the maintainer - -Repository Maintainer: Vejeta -Relicensing Contact: vejeta@gmail.com -Last Updated: 13th September 2025 +**For complete legal documentation:** See [`RELICENSING-PERMISSIONS.md`](RELICENSING-PERMISSIONS.md) \ No newline at end of file diff --git a/Makefile b/Makefile index 95c7c17..542d194 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,24 @@ +/* + * Makefile - Build configuration and compilation rules + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + # conquer: Copyright (c) 1989 by Edward M Barlow # # BY CHANGING THIS FILE, YOU AGREE TO ABIDE BY THE LIMITATIONS STATED IN diff --git a/README b/README index 2d137a6..f61cc67 100644 --- a/README +++ b/README @@ -1,202 +1,214 @@ - ********************************************************* - * README FILE FOR THE INSTALLER OF CONQUER * - ********************************************************* - -What you have here is a copyrighted release 4 version version of CONQUER. -I make no guaranties to the sanity or style of this code, but do believe -that it should work as documented. I have included numerous bugfixes -from previous releases posting, and have added numerous enhancements. -The file notes.v4 details changes between v3.5 and v4, bugs and other things. - -I have no current email address... Too bad. I will post a patch to THIS FILE -when i get a new email address. The hazards of switching jobs. Adam Bryant -has volunteered to take mail for the summer of 1989 at "arpa!bu-cs.bu.edu!adb" -or "adb@bu-cs.bu.edu". He is the co-author of the game... so send comments to -him. We like feedback on the game. Comments and feature requests are very -useful to me as they are my primary method of deciding what to next add to the -code. Your interest is appreciated. - -A mailing list for conquer has been set up to provide a platform for conquer -discussion, and location for conquer test patch releases. The mailing list is -"conquer-news@bu-cs.bu.edu" and addition to or deletions from the mailing -list may be sent to "conquer-news-request@bu-cs.bu.edu". - -NOTE: My new phone number is 212-679-1439. My work has no arpanet. If anybody -knows of a cheap (free??) way of getting an arpanet login I NEED ONE. I -basically can make no more changes to Conquer until I can get a network port, -and since i am "volunteering" my time for this project, I am not about to -spend millions of dollars to buy one... I can get a modem for my PC if -somebody will help me get a port somewhere. -ED- - -Included in this file are the following: +********************************************************* +* README FILE FOR THE INSTALLER OF CONQUER * +********************************************************* + +CONQUER - Classic Multi-Player Strategy Game + +What you have here is a GPL v3 licensed version of the classic CONQUER game, +originally created by Edward M. Barlow and Adam Bryant. This version has been +relicensed to GPL v3 in 2025 by Juan Manuel Méndez Rey (Vejeta) with explicit +permission from the original authors. + +LICENSING INFORMATION: +====================== +- Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant +- Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) +- Licensed under GPL v3 with permission from original authors + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. See the COPYING file for the complete GPL v3 license text. + +HISTORICAL NOTE: +================ +This is based on the original release 4 version of CONQUER. The original +authors made no guarantees to the sanity or style of this code, but believed +that it should work as documented. It included numerous bugfixes from previous +releases and various enhancements. + +The original development team included Edward M. Barlow and Adam Bryant, who +set up mailing lists and provided community support in the late 1980s. Their +innovative work created one of the early multi-player strategy games that +influenced many later games in the genre. + +CURRENT STATUS: +=============== +This version maintains the original gameplay and functionality while being +made available under modern open-source licensing terms. Bug reports, feature +requests, and contributions are welcome through the project's repository. + +INCLUDED IN THIS DISTRIBUTION: +=============================== 1) A Brief Description of Conquer 2) Installation (unpacking) Instructions 3) Configuration Instructions 4) Compilation Instructions 5) Administration instructions - 6) Changes in this version - -This version should not be redistributed without the permission of Edward -Barlow or Adam Bryant ( please read the copyright note in header.h ). - -Again, any comments or bug reports would be greatly appreciated. + 6) GPL v3 License Information ----------------------------------------------------------- I A Brief Description of Conquer ----------------------------------------------------------- -A complete description of Conquer v4 is contained in "man.page" and -"conquer.docs". "conquer.docs" is created from the files txt[0-5] which are -customized from data in the header files. These txt[] files are then -converted int help[0-5] files, which contain configuration data. "make docs" -will create this file from current data. Note conquer.doc IS NOT created -program is compiled. I have tried to make the documentation as good as -possible, but I guarantee that I have missed a lot. Consider this a feature -and enjoy any (hopefully pleasant) suprises you get. +A complete description of Conquer v4 is contained in "man.pag" and can be +generated in "conquer.docs". The game is a multi-player strategy simulation +where players control nations, managing resources, armies, diplomacy, and +territorial expansion. + +Key features include: +- Multi-player strategy gameplay +- Resource management (food, gold, metal, jewels) +- Military units and naval fleets +- Magic system and special powers +- Diplomatic relations between nations +- NPC nations with AI behavior +- Random events and world dynamics +- Customizable world generation + +The documentation files txt[0-5] contain help information that is customized +from data in the header files and converted to help[0-5] files during +compilation. "make docs" will create documentation from current data. + ----------------------------------------------------------- -II Installation (unpacking) Instructions +II Installation Instructions ----------------------------------------------------------- -This program came in several shell archive scripts. They can can be unpacked -by using "sh filename". If you are reading this, you know this. +SYSTEM REQUIREMENTS: +- Unix-like operating system (Linux, BSD, macOS) +- C compiler (gcc recommended) +- make utility +- curses library (ncurses) +- Standard Unix utilities + +COMPILATION: +1. Extract the source code to a directory +2. Review and modify configuration files (see Configuration section) +3. Compile: `make` +4. Install and set up new game: `make new_game` + +If curses linking fails, you may need to add "-ltermcap" or "-lncurses" +to the library flags in the Makefile. -If you suspect missing files, please check the MANIFEST. ----------------------------------------------------------- III Configuration ----------------------------------------------------------- THE FOLLOWING FILES SHOULD BE MODIFIED TO REFLECT YOUR ENVIRONMENT -AND THE TYPE OF GAME YOU WISH TO PLAY. THE GAME WILL NOT RUN UNLESS -YOU MODIFY THESE FILES APPROPRIATELY. +AND THE TYPE OF GAME YOU WISH TO PLAY: + +REQUIRED MODIFICATIONS: +- header.h: Game configuration constants and settings +- Makefile: Build configuration and paths -header.h modify as per instructions -Makefile modify as per instructions +OPTIONAL MODIFICATIONS: +- rules: Grammar rules for NPC message generation +- nations: NPC nation configurations for world creation -I have tried to comment this stuff appropriately. +The options specified in these files will be reflected in the documentation +and help files when the program is compiled. -The options specified in these files will be reflected -in the conquer.docs and help files when the program is compiled. +IMPORTANT: Edit the following defines in header.h: +- OWNER: Administrator name +- LOGIN: Administrator login ID +- Directory paths for game data and executables +- System-specific settings (BSD vs SYSV) -You will probably also want to take a look at the "rules*" file. This -contains the grammar rules for the random mail messages generated by -NPC's. You may wish to insert some local people's names, or think of -some really juicy insults. The format of the file should be obvious; -basically %FOO declares a class FOO and one of the things inside that -class will be selected randomly. Obviously, %MAIN is the top level which -then calls on the subclasses to construct sentences. +The "rules" file contains grammar rules for random messages generated by +NPCs. You may customize this with local names or creative content following +the format: %CLASS declares a class, with %MAIN being the top level. ----------------------------------------------------------- IV Compilation Instructions ----------------------------------------------------------- -This program should be easy to compile. After header.h and Makefile have -been edited properly, you may type 'make' to compile conquer, and -'make new_game' to build and install a new game. - -Note: Sometimes curses does not include termcap or termlib. If all the - '.c' files get compiled, but do not link together, and - unreferenced symbol errors occur, try adding "-ltermcap" after - the "-lcurses" line in the makefile. - -Note2: With some versions of 'make' the SHELL environment variable is - read to determine under what shell jobs should be spawned. The - Makefile for conquer was written with '/bin/sh' in mind, so if - any "command not found" errors appear, doing a: - setenv SHELL /bin/sh - before typing 'make', might alleviate the problem. +After configuring header.h and Makefile: + +Basic compilation: + make # Compile the game + make clean # Clean up object files + make clobber # Remove all generated files + +Game setup: + make new_game # Build and install a complete new game + make install # Install executables only + make docs # Generate documentation + +TROUBLESHOOTING: +- If linking fails with curses errors, add "-ltermcap" to LIBRARIES in Makefile +- If make gives "command not found" errors, try: setenv SHELL /bin/sh +- Ensure all directory paths in header.h exist and are writable + +----------------------------------------------------------- +V Administration Instructions +----------------------------------------------------------- +COMMAND LINE ADMINISTRATION: + +conqrun options: + -m Create/make a new world + -a Add new player to existing world + -x Execute update (process turn) + -d DIR Use specified game directory + -r SCENARIO Read map from scenario files during world creation + +GAME ADMINISTRATION LEVELS: +1. God: Primary administrator (defined by LOGIN in header.h) +2. Demi-God: World-specific administrator (can be changed during game) + +During world creation, you'll be prompted to designate a demi-god for the +world, or you can serve as demi-god yourself. + +SETUP PROCEDURE: +1. Create world: `conqrun -m` + - Sets up the game world and NPC nations per the nations file + - NPCs use the same password as god initially + +2. Add players: `conqrun -a` + - Interactive player addition + - Won't work if world is full from scenario loading + +3. Alternative - Scenario-based: `conqrun -r SCENARIO` + - Uses SCENARIO.ele, SCENARIO.veg, and SCENARIO.ntn files + - Pre-configured world setup + +GOD FUNCTIONS: +Access god functions by logging in with: `conquer -n god` +- Modify terrain and sectors +- Manage nations (create/destroy) +- Adjust game balance +- Administrative oversight + +GAME BALANCE: +The world generation is not perfectly balanced. Some players may start in +difficult positions. As god, you can: +- Redesignate terrain to improve starting positions +- Destroy and recreate nations in better locations +- Modify surrounding terrain for fairness +- Use the change nation command to adjust player situations + +REGULAR OPERATION: +- Players connect: `conquer` +- Process turns: `conqrun -x` (typically automated via cron) +- Monitor via god login for administrative needs + +AUTOMATED UPDATES: +Use the included "run" script as a template for automated turn processing. +Modify it for your preferred update schedule and system configuration. + +For detailed gameplay help, use the '?' command within the game. ----------------------------------------------------------- -V administration instructions +VI Contributing and Support +----------------------------------------------------------- +This open-source version welcomes contributions: +- Bug reports and fixes +- Feature enhancements +- Documentation improvements +- Platform compatibility updates +- Translation efforts + +Please maintain the spirit of the original game while modernizing the codebase +for current systems and development practices. + +The original creators, Edward M. Barlow and Adam Bryant, laid the foundation +for this classic strategy game. This GPL v3 version ensures it remains +available for future generations of strategy game enthusiasts. + ----------------------------------------------------------- -Now that you have compiled it, this is how you administer/set up/run the game. -I recommend following these instructions once yourself in a mock game -(ie. no other players) for a few turns to get things straight. Then you -can add other players. - -The command line format for the administration commands is - - conqrun [-maxp -dDIR -rSCENARIO]\n",argv[0]); - -m make a world - -a add new player - -x execute program - -d DIR to use play different game - -r SCENARIO read map while making a new world - uses SCENARIO.ele, SCENARIO.veg, & SCENARIO.nat - -Also, some useful god functions are provided through the conquer program -through logging in as 'god' with 'conquer -n god'. - -Conquer now supports two layers of game administration: the god of -conquer, as defined by the LOGIN define in header.h, may allow each -world to have an administrator or demi-god. This demi-god will be able -to perform updates and other god functions for this world only. This -feature allows for multiple worlds, each governed by a different god. -During the creation of a world, god will be prompted for the name of the -demi-god for the new world. Just hitting return will mean that god will -himself act as the demi-god for this world. - -Unlike godship, the demi-god for a world may be changed during the -running of a game, without recompilation of conquer. This is done using -the 'c'hange menu when logged in as god. - -In addition the the conqrun command, the makefile helps you as follows: - -make: Compiles the code. -make clobber: Clobber everything but the source (destroys executables) -make clean: Clean up objects (does not destroy executables) -make new_game: Create a new game, make world, add players... -make install: Install game in appropriate directory -make docs: Creates documentation from help file - -Finally, I have included an 'at' script that permits automatic updating. -run: read this shell script, it permits you to run the update - automatically. It needs to be modified for time to update. - -The command line for the conquer executable can be found by reading -the help files. - -Again, prior to the compile, you should have followed the instructions -in the Makefile and in header.h. - -You can administrate world either via "make new_game" or via: - this will make your world. - This also sets up npc nations as per the nations file - npc stats can be adjusted by editing nations - prior to making the world. Non player nations have - the same password as god. -or this will make your world by using scenarios. - Basically, the scenarios include a nation file and - three map files (elevation, vegetation, and nation - setup). Look at the rome scenario included in the game. - [ this scenario is not finished yet ] - -You can add ( 0 or more ) players via - which should be self explanatory. This wont work if - the world is filled, as it would be if a scenario was - read in and the SCENARIO.ntn file filled the world. - This is because the program wont find spots to place - your players. Adjust the nations file for your - scenario to set up players. When they log in, they - will be asked for a new password. - - -Once you log in as a player or as god, you can get help by -typing '?'. Play around with the commands and get your syntax right. - -Try logging in as either a player or non player nation (they use the super -user password) and noticing any differences. - -IMPORTANT NOTE ON PLAY BALANCE: -The world is not created equal. Some players may start in very bad -positions. You can either start them over (destroy that nation in the -change nation command and create a new one), or modify the surrounding -terain appropriately (god can use the redesignate command to change -elevation and vegetation). - -Now move around on the map and learn where the players are positioned. -If there is a problem (they are surrounded by water...), use the -redesignate command to change elevation or vegetation. In the worst -case, god can destroy a nation with 'c', the change nation command. -Once you think the game will be fair, it is time to allow players to -proceed. - -Now you are all set -- play via - - -and update with via an script similar to "run" +For more information, see the man page (man.pag) and in-game help system. diff --git a/RELICENSING-PERMISSIONS.md b/RELICENSING-PERMISSIONS.md new file mode 100644 index 0000000..3414b44 --- /dev/null +++ b/RELICENSING-PERMISSIONS.md @@ -0,0 +1,779 @@ +# Relicensing Permissions Documentation + +This file contains the complete, unedited email correspondence from the original authors of the Conquer game granting permission to relicense their work under the GNU General Public License. + +**⚠️ LEGAL IMPORTANCE:** These email communications serve as the legal foundation for the GPL relicensing of this software. They are preserved in their entirety as advised by Debian Legal and other open source legal experts. + +--- + +## Permission from Ed Barlow (2016) + +**Context:** Contact reestablished in 2016, confirming earlier permissions and delegating authority. + +**Key Quote:** *"Yes i delegated it all to adam aeons ago. Im easy on it all.... copyleft didnt exist when i wrote it and it was all for fun so..."* + +### Complete Email Evidence + +``` +Original Message +ID de mensaje +Creado a las: 12 de marzo de 2016, 3:45 (entregado en 3 segundos) +De: Edward Barlow +Para: Juan Mendez +Asunto: RE: conquer relicensing +SPF: PASS con la IP 65.54.190.219 Más información +DMARC: 'PASS' Más información + + +Descargar original Copiar en el portapapeles +Delivered-To: vejeta@gmail.com +Received: by 10.194.221.73 with SMTP id qc9csp2645046wjc; + Fri, 11 Mar 2016 18:45:49 -0800 (PST) +X-Received: by 10.98.87.200 with SMTP id i69mr12696548pfj.63.1457750749381; + Fri, 11 Mar 2016 18:45:49 -0800 (PST) +Return-Path: +Received: from BAY004-OMC4S17.hotmail.com (bay004-omc4s17.hotmail.com. [65.54.190.219]) + by mx.google.com with ESMTPS id ss1si6489670pab.18.2016.03.11.18.45.49 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); + Fri, 11 Mar 2016 18:45:49 -0800 (PST) +Received-SPF: pass (google.com: domain of barlowedward@hotmail.com designates 65.54.190.219 as permitted sender) client-ip=65.54.190.219; +Authentication-Results: mx.google.com; + spf=pass (google.com: domain of barlowedward@hotmail.com designates 65.54.190.219 as permitted sender) smtp.mailfrom=barlowedward@hotmail.com; + dmarc=pass (p=NONE dis=NONE) header.from=hotmail.com +Received: from BAY402-EAS150 ([65.54.190.199]) by BAY004-OMC4S17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); + Fri, 11 Mar 2016 18:45:48 -0800 +X-TMN: [lBavvwD5LtzFtb4XMC3hMEOc5dLo/Wqr] +X-Originating-Email: [barlowedward@hotmail.com] +Message-ID: +Return-Path: barlowedward@hotmail.com +Date: Fri, 11 Mar 2016 18:45:46 -0800 +Subject: RE: conquer relicensing +Importance: normal +From: Edward Barlow +To: Juan Mendez +CC: "mdpoole@troilus.org" +MIME-Version: 1.0 +Content-Type: multipart/alternative; boundary="--_com.android.email_20792381026420" +X-OriginalArrivalTime: 12 Mar 2016 02:45:48.0797 (UTC) FILETIME=[48C672D0:01D17C09] + +----_com.android.email_20792381026420 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset="utf-8" + + + +Hey juan +Yes i delegated it all to adam aeons agoIm easy on it all.... copyleft di= +dnt exist when i wrote it and it was all for fun so... +Let me know if u need more. Ill read your article when i get home + +CheersEd + + +Sent from my Sprint Samsung Galaxy=C2=AE Note 4. + +-------- Original message -------- +From: Juan Mendez +Date: 3/11/2016 1:16 PM (GMT-08:00) +To: Edward Barlow +Cc: mdpoole@troilus.org +Subject: Re: conquer relicensing + +Greetings Ed, + +I'm glad of hearing about you. + +Back in 2006 I started a research to look for the history of conquer and +some related games. +I wrote an article back in 2011 here about that process: +http://vejeta.com/historia-del-conquer/ + +My intention in 2006 was getting a copyleft compatible license to be able +to get the code modified and packaged for a GNU/Linux distribution such as +Debian. + +I remember that after consulting with the debian-legal mailing list, I was +advised to get a written email copy from the authors giving such +permissions. (I could dig into such emails). I was surprised when Adam +himself found an article and wrote to me about that. + +Also, I remember starting the process of getting the code uploaded to gnu +savannah. + +I found two blockers. There was the use of a certain file written by a +third party that needed to be rewritten to avoid legal problems, and also +finding a way to be able to play in a mode that didn't require being a user +in the machine. Making it more like a service that we could telnet to. + + +It's a cool project and I'm glad you raise my awarenes about it :) + + +2016-02-29 0:06 GMT+01:00 Edward Barlow : + +> Hey +> +> Saw a 2006 note about conquer relicensing when i accidentally googled my +> name. +> +> Been aeons. If you have questions, i dont really care and dont think ada= +m +> cares +> that much either. What were you intending to do 10 years ago? +> +> Cheers +> +> Ed Barlow +> barlowedward@hotmail.com +> 914 837 4798 +> + + + +-- +http://vejeta.com +Fidonet: 2:345/432.2 +I'm an FSF member -- Help us support software freedom! +http://www.fsf.org/jf?referrer=3D10232 + +----_com.android.email_20792381026420 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset="utf-8" + + + + + + +
Hey juan
+

+
+
Yes i delegated it all to adam aeons ago
+
Im easy on it all....   copyleft didnt exist when i wrote it and = +it was all for fun so...
+

+
+
Let me know if u need more.  Ill read your article when i get hom= +e
+

+
+

+
+
Cheers
+
Ed
+

+
+

+
+

+
+
+
Sent from my Sprint Samsung Gala= +xy=C2=AE Note 4.
+
+
+
+-------- Original message --------
+From: Juan Mendez <vejeta@gmail.com>
+Date: 3/11/2016 1:16 PM (GMT-08:00)
+To: Edward Barlow <barlowedward@hotmail.com>
+Cc: mdpoole@troilus.org
+Subject: Re: conquer relicensing
+
+
+
+
+
+
Greetings Ed,
+
+
+I'm glad of hearing about you.
+
+
+Back in 2006 I started a research to look for the history of conquer and so= +me related games.
+
+
I wrote an article back in 2011 here about that process: +http://vejeta.com/historia-del-conquer/
+
+
+
My intention in 2006 was getting a copyleft compatible license to be a= +ble to get the code modified and packaged for a GNU/Linux distribution such= + as Debian.
+
+
+
I remember that after consulting with the debian-legal mailing list, I= + was advised to get a written email copy from the authors giving such permi= +ssions. (I could dig into such emails). I was surprised when Adam himself f= +ound an article and wrote to me + about that.
+
+
+
Also, I remember starting the process of getting the code uploaded to = +gnu savannah.
+
+
+
I found two blockers. There was the use of a certain file written by a= + third party that needed to be rewritten to avoid legal problems, and also = +finding a way to be able to play in a mode that didn't require being a user= + in the machine. Making it more + like a service that we could telnet to.
+
+
+

+
+
It's a cool project  and I'm glad you raise my awarenes about it = +:)
+
+

+
+
+

+
2016-02-29 0:06 GMT+01:00 Edward Barlow +<barlowedw= +ard@hotmail.com>:
+
+
+
Hey +

+
+
Saw a 2006 note about conquer relicensing when i accidenta= +lly googled my name.
+

+
+
Been aeons.  If you have questions, i dont really car= +e and dont think adam cares
+
that much either.  What were you intending to do 10 y= +ears ago?
+

+Cheers
+
+Ed Barlow + +
914 837 4798
+
+
+
+
+
+
+
+
+--
+
+
http://ve= +jeta.com
+Fidonet: 2:345/432.2
+I'm an FSF member -- Help us support software freedom! +http://www.fsf.org/jf?referrer=3D10232
+
+
+
+
+ + + +----_com.android.email_20792381026420-- +``` + +--- + +## Permission from Adam Bryant (2011) + +**Context:** Original contact through vejeta.com contact form, providing explicit GPL permission. + +**Key Quote:** *"Just wanted to confirm that I had no issues with publication of version 4 of Conquer under the GPL."* + +### Complete Email Evidence + +``` +Original Message +ID de mensaje <8CDA1A4529FC479-7BC-17197@web-mmc-m04.sysops.aol.com> +Creado a las: 23 de febrero de 2011, 20:09 (entregado en 25 segundos) +De: adb@usa.com Con Mail.com Webmail 33222-STANDARD +Para: vejeta@vejeta.com +Asunto: Re: Saw a post looking into conquer (version 4) +SPF: NEUTRAL con la IP 0.0.0.0 Más información + + +Descargar original Copiar en el portapapeles +Delivered-To: vejeta@gmail.com +Received: by 10.229.10.215 with SMTP id q23cs310617qcq; + Wed, 23 Feb 2011 11:09:53 -0800 (PST) +Received: by 10.52.158.196 with SMTP id ww4mr6805695vdb.276.1298488192180; + Wed, 23 Feb 2011 11:09:52 -0800 (PST) +Return-Path: +Received: from mail-qw0-f48.google.com (mail-qw0-f48.google.com [209.85.216.48]) + by mx.google.com with ESMTPS id v22si11811015vcf.77.2011.02.23.11.09.51 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 23 Feb 2011 11:09:51 -0800 (PST) +Received-SPF: neutral (google.com: 209.85.216.48 is neither permitted nor denied by best guess record for domain of vejeta+caf_=vejeta=gmail.com@vejeta.com) client-ip=209.85.216.48; +Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.48 is neither permitted nor denied by best guess record for domain of vejeta+caf_=vejeta=gmail.com@vejeta.com) smtp.mail=vejeta+caf_=vejeta=gmail.com@vejeta.com +Received: by mail-qw0-f48.google.com with SMTP id 6so3445599qwd.7 + for ; Wed, 23 Feb 2011 11:09:51 -0800 (PST) +Received: by 10.229.247.10 with SMTP id ma10mr3392572qcb.4.1298488191155; + Wed, 23 Feb 2011 11:09:51 -0800 (PST) +X-Forwarded-To: vejeta@gmail.com +X-Forwarded-For: vejeta@vejeta.com vejeta@gmail.com +Delivered-To: vejeta@vejeta.com +Received: by 10.229.226.196 with SMTP id ix4cs337488qcb; + Wed, 23 Feb 2011 11:09:50 -0800 (PST) +Received: by 10.229.86.7 with SMTP id q7mr3386679qcl.262.1298488190786; + Wed, 23 Feb 2011 11:09:50 -0800 (PST) +Return-Path: +Received: from imr-da05.mx.aol.com (imr-da05.mx.aol.com [205.188.105.147]) + by mx.google.com with ESMTP id my6si15968053qcb.38.2011.02.23.11.09.50; + Wed, 23 Feb 2011 11:09:50 -0800 (PST) +Received-SPF: neutral (google.com: 205.188.105.147 is neither permitted nor denied by best guess record for domain of adb@usa.com) client-ip=205.188.105.147; +Received: from imo-ma02.mx.aol.com (imo-ma02.mx.aol.com [64.12.78.137]) by imr-da05.mx.aol.com (8.14.1/8.14.1) with ESMTP id p1NJ9aIV027750 for ; Wed, 23 Feb 2011 14:09:36 -0500 +Received: from adb@usa.com by imo-ma02.mx.aol.com + (mail_out_v42.9.) id g.fb7.c73cfb7 (37180) + for ; Wed, 23 Feb 2011 14:09:31 -0500 (EST) +Received: from smtprly-mb01.mx.aol.com (smtprly-mb01.mx.aol.com [64.12.207.148]) by cia-ma05.mx.aol.com (v129.9) with ESMTP id MAILCIAMA053-5c5e4d655b6622e; Wed, 23 Feb 2011 14:09:31 -0500 +Received: from web-mmc-m04 (web-mmc-m04.sim.aol.com [64.12.224.137]) by smtprly-mb01.mx.aol.com (v129.9) with ESMTP id MAILSMTPRLYMB014-5c5e4d655b6622e; Wed, 23 Feb 2011 14:09:26 -0500 +References: <20101229193843.2627.1861983277@osgiliath> +To: vejeta@vejeta.com +Subject: Re: Saw a post looking into conquer (version 4) +Date: Wed, 23 Feb 2011 14:09:26 -0500 +X-AOL-IP: 130.36.62.222 +In-Reply-To: +X-MB-Message-Source: WebUI +MIME-Version: 1.0 +From: adb@usa.com +X-MB-Message-Type: User +Content-Type: multipart/alternative; + boundary="--------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com" +X-Mailer: Mail.com Webmail 33222-STANDARD +Received: from 130.36.62.222 by web-mmc-m04.sysops.aol.com (64.12.224.137) with HTTP (WebMailUI); Wed, 23 Feb 2011 14:09:26 -0500 +Message-Id: <8CDA1A4529FC479-7BC-17197@web-mmc-m04.sysops.aol.com> +X-Spam-Flag: NO +X-AOL-SENDER: adb@usa.com + +----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset="utf-8" + +Glad that I eventually noticed your query. Sorry that it took so long. + +Later, + +Adam +=20 + +-----Original Message----- +From: Juan Manuel M=C3=A9ndez Rey +To: adb@usa.com +Sent: Wed, Feb 23, 2011 11:13 am +Subject: Re: Saw a post looking into conquer (version 4) + + + +2010/12/29 + +Not sure if this is the proper place to try to get in touch with him, but a= + message from "Juan" was posted a few years back (Oct. 2006) looking for cl= +arification on licensing for Conquer source code. + +Just wanted to confirm that I had no issues with publication of version 4 o= +f Conquer under the GPL. + +Feel free to forward this as needed and/or contact me at the email address = +entered above. + +Thanks, + +Adam + +-- +vejeta.com Administrator + +Ha recibido este correo porque Adam Bryant adb@usa.com le ha enviado un com= +entario sobre el sitio administrado por usted en http://vejeta.com/portal. + + + + + +Greetings Adam, + + + +Sorry for the delay, I haven't seen this email till today, and your messag= +e comes as a surprise.=20 + + + +Yes, I'm Juan, the one who at that time initiated the quest of getting in t= +ouch with Ed Barlow and Adam Bryant, creators of a game that I used to play= + a lot in Unix as a freshman during 1994 and so on. + + + +During that time I could contact Ed Barlow who told me that you were the ow= +ner of the copyright of conquer v5.=20 + + +It seems it was needed the permission of both you to relicense the code to = +the GPL.=20 +I understood that a mail could be sufficient as a way of granting permissio= +n for the relicensing. + + +I may need to contact you again, if a more verbose statement is needed.=20 + + +Thanks Adam a lot for your interest, + + +Juan M. M=C3=A9ndez + + + + +PS: As I sidenote: I was a great fan of that game and being a merely teenag= +er back then considered you as the famous creators of the game. +So this email was kind of a flashback and a happy surprise, my old college = +partners will be happy with the news. + + + + + +=20 + +----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset="utf-8" + + +Glad that I eventually noticed your query.  Sorry that it took so long= +.
+
+Later,
+
+Adam +

+ +
+ + + +
-----Original Message-----
+ +From: Juan Manuel M=C3=A9ndez Rey <vejeta@vejeta.com>
+ +To: adb@usa.com
+ +Sent: Wed, Feb 23, 2011 11:13 am
+ +Subject: Re: Saw a post looking into conquer (version 4)
+ +
+ + + + + + + + +
+ + + +
+ +
+ +
2010/12/29 <vejeta@vejeta.com>
+ + + +
+ +
+Not sure if this is the proper place to try to get in touch with him, but a= + message from "Juan" was posted a few years back (Oct. 2006) looking for cl= +arification on licensing for Conquer source code.
+ + +
+ + +Just wanted to confirm that I had no issues with publication of version 4 o= +f Conquer under the GPL.
+ + +
+ + +Feel free to forward this as needed and/or contact me at the email address = +entered above.
+ + +
+ + +Thanks,
+ + +
+ + +Adam
+ + +
+ + +--
+ + += +vejeta.com Administrator
+ + +
+ + +Ha recibido este correo porque Adam Bryant adb@usa.com le ha enviado un comentario sobre= + el sitio administrado por usted en http://vejeta.com/portal. + + + +
+ + +
+ +
+ +
+ +
+ +
+ + + +
Greetings Adam, + +

+ +
+ + + +
+ +
Sorry for the delay, I haven't seen this email till today,  and y= +our message comes as a surprise. 
+ + + +

+ +
+ + + +
+ + +
Yes, I'm Juan, the one who at that time initiated the quest of getting= + in touch with Ed Barlow and Adam Bryant, creators of a game that I us= +ed to play a lot in Unix as a freshman during 1994 and so on.
+ +
+ + + + +

+ +
+ + + +
During that time I could contact Ed Barlow who told me that you were t= +he owner of the copyright of conquer v5. 
+ + + +

+ +
+ + + +
It seems it was needed the permission of both you to relicense the cod= +e to the GPL. 
+ + + + +
I understood that a mail could be sufficient as a way of granting perm= +ission for the relicensing.
+ + + +

+ +
+ + + +
I may need to contact you again, if a more verbose statement is needed= +. 
+ + + +

+ +
+ + + + +
Thanks Adam a lot for your interest,
+ + + +

+ +
+ + + +
Juan M. M=C3=A9ndez
+ + + +

+ +
+ + + +

+ +
+ + + +
PS: As I sidenote: I was a great fan of that game and being a merely t= +eenager back then considered you as the famous creators of the game.
+ + + + +
So this email was kind of a flashback and a happy surprise, my old col= +lege partners will be happy with the news.
+ + + +

+ +
+ +
+ +
+ + + +

+ +
+ + + +
+ + + +
+ +
+ +----------MB_8CDA1A452A48739_7BC_2F23B_web-mmc-m04.sysops.aol.com-- +``` + +--- + +## Legal Analysis and Validation + +### Permission Summary + +Both copyright holders have provided **explicit written consent** for GPL relicensing: + +1. **Ed Barlow (2016):** Confirmed he had previously delegated copyright authority to Adam Bryant and expressed no objections to GPL relicensing +2. **Adam Bryant (2011):** Explicitly stated *"no issues with publication of version 4 of Conquer under the GPL"* + +### Debian Legal Compliance + +This documentation follows the advice from Debian Legal discussions, specifically: +- Preserving complete email communications (no summarization) +- Including full technical headers for authenticity verification +- Maintaining transparent chain of custody +- Providing verifiable timestamps and message IDs + +### Legal References + +- **GNU Savannah task:** http://savannah.gnu.org/task/?5945 +- **Debian Legal discussion:** http://lists.debian.org/debian-legal/2006/10/msg00063.html +- **Community validation:** http://preguntas.barrapunto.com/~vejeta/journal/22901 + +--- + +## Technical Verification + +### Email Authenticity Markers + +Both emails include complete technical headers with: +- **Message IDs** for unique identification +- **SPF/DMARC validation** (where applicable) +- **Complete routing information** through mail servers +- **Timestamped delivery confirmations** + +### Archive References + +- **Historical discussions:** See HISTORY.md for complete timeline +- **Community archives:** Various USENET and forum discussions preserved +- **Wayback Machine:** https://web.archive.org/web/20081015182607/http://vejeta.no-ip.org/conquerv4/ + +--- + +## Maintainer Notes + +**Original USENET Distribution:** 1987-1988 via comp.sources.games +**First Relicensing Attempt:** 2006 +**Successful Contact with Adam Bryant:** February 23, 2011 +**Ed Barlow Reconfirmation:** March 12, 2016 +**Repository Creation:** September 13, 2025 + +**Legal Consultation:** Debian Legal mailing list provided guidance on preservation requirements and best practices for legacy software relicensing. + +--- + +This relicensing effort represents a successful example of preserving and liberating legacy software through proper legal channels, community collaboration, and transparent documentation. \ No newline at end of file diff --git a/admin.c b/admin.c index ba01fc4..70b5d06 100644 --- a/admin.c +++ b/admin.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * admin.c - Administrative functions and game management + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/cexecute.c b/cexecute.c index 8fdc946..ed59d4e 100644 --- a/cexecute.c +++ b/cexecute.c @@ -1,16 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * cexecute.c - Game functionality module + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/*EXECUTE THE PROGRAM*/ #include #include #include diff --git a/check.c b/check.c index 6a5ff48..ef29969 100644 --- a/check.c +++ b/check.c @@ -1,5 +1,23 @@ -/* Conquer: Copyright (c) 1988 by Edward M Barlow */ -/* check.c contains checking and debugging functions */ +/* + * check.c - Data validation and integrity checks + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include diff --git a/combat.c b/combat.c index 933a9df..68df1c1 100644 --- a/combat.c +++ b/combat.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * combat.c - Combat system and battle resolution + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/commands.c b/commands.c index f966bb6..910fbca 100644 --- a/commands.c +++ b/commands.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * commands.c - Player command processing + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/data.c b/data.c index e627a36..f941549 100644 --- a/data.c +++ b/data.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * data.c - Data structures and function prototypes + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/data.h b/data.h index 88fecba..426ee42 100644 --- a/data.h +++ b/data.h @@ -1,31 +1,24 @@ -/* conquer : Copyright (c) 1988 by Ed Barlow. */ - -/*--------I DO NOT BELIEVE IT IS NECESSARY TO ALTER THIS FILE----------------*/ -#define FAIL 1 /* fail return to shell */ -#define SUCCESS 0 /* successful return to shell */ -#define TIME_DEAD 3600 /* number of seconds for file aging */ -#define BIG 500000000L /* BIGGER THAN ANYTHING SHOULD BE */ - /* this is used to protect against overflow */ -#define SCRARM ((LINES-14)/2) /* number of armies to fit on screen */ - -/* sometimes curses.h defines TRUE */ -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -/* definitions for mail sending */ -#define DONEMAIL (-3) -#define NEWSMAIL (-2) -#define ABORTMAIL (-1) +/* + * data.h - Data structures and function prototypes + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -/* definitions for screen redrawing */ -#define DONE 0 -#define PART 1 -#define FULL 2 - -#define SCREEN_X_SIZE (( COLS - 21) / 2) /* divide by two as only 1/2 - sectors will be shown */ #define SCREEN_Y_SIZE ( LINES - 5 ) #define HAS_SEEN(x,y) hasseen[(x)+((y)*((COLS-10)/2))] #define PASSLTH 7 /* the number of characters in the passwd*/ @@ -665,6 +658,9 @@ extern void see(),showscore(),update(); extern void wmessage(),writedata(),getdstatus(),exit(); extern void wizardry(); extern char *crypt(),**m2alloc(); +#ifdef SPEW +extern void makemess(int n, FILE *fp); +#endif #ifdef TRADE void trade(),uptrade(),checktrade(); #endif /* TRADE */ diff --git a/display.c b/display.c index b711531..c97fe9c 100644 --- a/display.c +++ b/display.c @@ -1,18 +1,24 @@ -/*Print and io subroutines for interactive game*/ - -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * display.c - Screen display and map rendering functions + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/*include files*/ #include #include #include diff --git a/extcmds.c b/extcmds.c index aa67fea..2dfc4e0 100644 --- a/extcmds.c +++ b/extcmds.c @@ -1,18 +1,23 @@ /* -* additions made in tut.fi (winter 1987 and spring 1988) -* for more information ask from mta@tut.fi or esc@tut.fi -*/ - -/* THESE COMMANDS are neat and I have used them throughout my code. - - The Ed */ - -/* ext_cmd() run extended commands */ -/* clear_bottom(i) clear bottom min(i,4) lines of the map */ -/* errormsg(str) print error message to bottom line */ -/* splitarmy(army) split ? men from army */ -/* reducearmy(army,men) subtract men from army */ -/* change_status(army,stat) change army stat to integer status */ -/* combinearmies(army1,army2) add army2 to army1 */ + * extcmds.c - Extended command processing + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include diff --git a/forms.c b/forms.c index 4814be1..71d84eb 100644 --- a/forms.c +++ b/forms.c @@ -1,17 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * forms.c - User interface forms and screens + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/* screen subroutines */ - #include #include #include diff --git a/header.h b/header.h index d29953a..b0122cc 100644 --- a/header.h +++ b/header.h @@ -1,92 +1,24 @@ -/* conquer : Copyright (c) 1988, 1989 by Ed Barlow. - MODIFICATION OF THIS FILE IMPLIES THAT THE MODIFIER WILL ACCEPT - A LIMITED USE COPYRIGHT AS FOLLOWS: +/* + * header.h - Game configuration constants and settings + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ - - 1) This software is copyrighted and protected by law. The - sole owner of this software, which hereafter is known as - "conquer" is Edward M. Barlow, who hereby grants you a - personal, non-exclusive right to use this software. - All rights on this software are reserved. - 2) conquer may not be redistributed in any form. Any requests for - new software shall, for now, be the perogative of the author. - 3) loss or damage caused by this software shall not be - the responsibility of the author. - 4) Ed Barlow or Adam Bryant shall be notified of enhancements to this - software via electronic mail and, if there is no response, via - US mail to: - - Ed Barlow - 115 E 34ths St. - NY, NY 10016 - - My home phone is 212-679-1439. Use it sparingly and call - before 11PM if it is important. Note that I no longer have - access to the arpanet and cant really support conquer like - I used to. If somebody knows of a cheap (free) way of getting - a login somewhere where there is network access - HELP ME!!!! - Since i am "volunteering" my time for this project, I am not - about to spend millions of dollars to buy network access... - I can get a modem for my PC if somebody will help me get - something to call into. -ED- - 5) no attempt shall be made to make any money from this game or to - use any portion of this code to make any money without the - authors permission. - 6) no attempt shall be made to port this software to any form of - personal computer without the permission of Ed Barlow. - 7) you agree to use your best efforts to see that any user - of conquer complies with the terms and conditions stated above. - 8) The above copyright agreement will not be tampered with in any form. - - - Special thanks to Brian Beuning, Adam Bryant, and any others who helped - me by making enhancements and bug reports -*/ - -/* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS --- */ -#define OWNER "Adam Bryant" /* administrators name */ -#define LOGIN "adb" /* administrators login id. IMPORTANT! */ - /* only this UID may update. */ -/* #define SYSV /* uncomment this line on a UNIX SYSV machine */ -#define BSD /* uncomment this line on a BSD machine */ -/* #define HPUX /* uncomment for HP-UNIX */ -/*#define XENIX /* this plus SYSV for XENIX machines, untested */ -#define SYSMAIL /* if your system supports mail */ - /* conquer will notify you about system mail */ - -/* ------------------MODIFICATION IS OPTIONAL ON THE FOLLOWING----------*/ -#define SPOOLDIR "/usr/spool/mail" /* location of mail spool */ -#define FILELOCK /* if your system supports BSD flock() */ - /* other file locking is not well implemented */ -/*#define LOCKF /* in addition to FILELOCK if you have lockf */ - /* this is needed on NFS remote file systems */ -#define TIMELOG /* if your system has the date command */ - -#define NTOTAL 25 /* max # of nations ( player + npc + monster ) */ -#define MAXPTS 65 /* points for players to buy stuff with at start*/ -#define MAXARM 50 /* maximum number of armies per nation */ -#define MAXNAVY 10 /* maximum number of fleets per nation */ -#define PDEPLETE 30 /* % of armies/sectors depleted without Capitol */ -#define PFINDSCOUT 50 /* percentage chance for capturing scouts */ - -#define RUNSTOP /* defined to stop update if players are in */ - /* game -- not recommended with automatic update*/ -#define TRADE /* defined to allow commerce between nations */ -#define TRADEPCT 75 /* percent of sectors with exotic trade goods */ -#define METALPCT 33 /* percent of tradegoods that are metals */ -#define JEWELPCT 33 /* percent of tradegoods that are luxury items */ -#define HIDELOC /* defined if news is not to report sectors */ -#define OGOD /* defined if you wish to enhance god powers. */ -#define REMAKE /* may make a world even if datafile exists. */ - /* this allows demi-gods the ability to remake */ - /* their world. */ -#define NOSCORE /* only show full scores to god while in game */ -/* #define CHECKUSER */ /* only allow owner of nation to play it */ -#define REVSPACE 5 /* allow for this many revolts in nation list */ -#define LASTADD 5 /* last turn players may w/out password */ -#define USERLOG /* log users who play a nation */ -#define MASK 037 /* data file protection mask (umask) */ -#define DERVDESG /* allow DERVISH to redesignate in DESERT/ICE */ #define MONSTER 45 /* defined if pirates/savages/nomads/lzard exist. represents # of sectors of land that need to be in world per pirate/savage/nomad nation */ diff --git a/io.c b/io.c index 6670d6f..ad2645e 100644 --- a/io.c +++ b/io.c @@ -1,16 +1,22 @@ -/*io.c*/ -/*Print and io subroutines for game*/ - -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * io.c - Input/output and file handling functions + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/magic.c b/magic.c index c7949ef..0f9e7a4 100644 --- a/magic.c +++ b/magic.c @@ -1,16 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * magic.c - Magic system and spell casting + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/*create a new login for a new player*/ #include #include #include diff --git a/main.c b/main.c index 995010c..782b1ef 100644 --- a/main.c +++ b/main.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * main.c - Main game loop and initialization + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/makeworl.c b/makeworl.c index 0e7ffb1..5845c60 100644 --- a/makeworl.c +++ b/makeworl.c @@ -1,17 +1,24 @@ -/* conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * makeworl.c - World generation and initialization + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/*Create a world*/ - #include #include #include diff --git a/misc.c b/misc.c index 99fab34..fd71e6c 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,24 @@ -/* Conquer: Copyright (c) 1988 by Edward M Barlow */ +/* + * misc.c - Miscellaneous utility functions + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 diff --git a/move.c b/move.c index db3476f..f73c244 100644 --- a/move.c +++ b/move.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * move.c - Unit movement and pathfinding + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/navy.c b/navy.c index 8eb9285..c4c2228 100644 --- a/navy.c +++ b/navy.c @@ -1,5 +1,23 @@ -/* conquer : Copyright (c) 1988 by Ed Barlow. */ -/* this code was initially written in January, 1989 by Adam Bryant */ +/* + * navy.c - Naval units and fleet management + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include diff --git a/newhelp.c b/newhelp.c index 201f12d..b54c2af 100644 --- a/newhelp.c +++ b/newhelp.c @@ -1,16 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed -*/ +/* + * newhelp.c - Help system generation + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -/*include files*/ #include #include "header.h" #include "data.h" diff --git a/newlogin.c b/newlogin.c index fbcec99..5649541 100644 --- a/newlogin.c +++ b/newlogin.c @@ -1,16 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * newlogin.c - New player registration and login + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/*create a new login for a new player*/ #include #include #include diff --git a/newlogin.h b/newlogin.h index 1392123..b74defe 100644 --- a/newlogin.h +++ b/newlogin.h @@ -1,6 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. */ +/* + * newlogin.h - New player registration and login + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -/*selection defines */ #define CH_PEOPLE 0 #define CH_TREASURY 1 #define CH_LOCATE 2 diff --git a/npc.c b/npc.c index 5350b0a..027789e 100644 --- a/npc.c +++ b/npc.c @@ -1,13 +1,22 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * npc.c - Non-player character AI and behavior + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/oMakefile b/oMakefile index 45af7bc..fbb804e 100644 --- a/oMakefile +++ b/oMakefile @@ -1,3 +1,24 @@ +/* + * oMakefile - Build system configuration + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + # conquer: Copyright (c) 1989 by Edward M Barlow # # BY CHANGING THIS FILE, YOU AGREE TO ABIDE BY THE LIMITATIONS STATED IN diff --git a/patchlevel.h b/patchlevel.h index 7088234..4ab4cb5 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1,22 @@ +/* + * patchlevel.h - Version and patch level definitions + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #define PATCHLEVEL "11a" diff --git a/psmap.c b/psmap.c index 6ff07a0..c3872b6 100644 --- a/psmap.c +++ b/psmap.c @@ -1,8 +1,22 @@ - /* - * A program to convert conquer-maps to postscript Feel free to hack'n slash - * Comments should be sent to d8forma@dtek.chalmers.se + * psmap.c - Game functionality module + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/psmap.h b/psmap.h index 127a81d..c527386 100644 --- a/psmap.h +++ b/psmap.h @@ -1,12 +1,24 @@ /* - * Header file for conqps by MaF - * Feel free to modify - * Comments should be sent to d8forma@dtek.chalmers.se + * psmap.h - Header file with definitions and prototypes + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/* Page size hassle */ -#ifdef OTHER #define DEFAULTPAGE 0 #endif diff --git a/randeven.c b/randeven.c index e71c21b..9aa4c20 100644 --- a/randeven.c +++ b/randeven.c @@ -1,4 +1,24 @@ -/* Conquer: Copyright (c) 1988 by Edward M Barlow */ +/* + * randeven.c - Random event system + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 diff --git a/reports.c b/reports.c index ecaebec..e542a7e 100644 --- a/reports.c +++ b/reports.c @@ -1,19 +1,24 @@ -/* Conquer: Copyright (c) 1988 by Edward M Barlow - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * reports.c - Game reports and statistics + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ - -/* screen subroutines */ - -/*include files*/ #include #include #include diff --git a/sort.c b/sort.c index 1c95a66..a8855eb 100644 --- a/sort.c +++ b/sort.c @@ -1,33 +1,22 @@ /* - * sort.c + * sort.c - Data sorting utilities + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * Written by Adam Bryant as a replacement for 'sort' - * for use with the conquer program. Note that it - * is initially written with this program in mind and - * will not have many features useful elsewhere. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * INITIAL FORMAT USES [YIELDS SAME RESULTS]: - * - * standard in to standard out: - * 'cat foo | conqsort > foonew' - * file input to standard output: - * 'conqsort foo > foonew' - * file input to file output: - * 'conqsort foo foonew' - * - * OR MAY EVEN OVERWRITE INITIAL FILE VIA: - * - * 'conqsort infoo infoo' - * - * Design Notes: - * - all of the file will have to be placed into memory; - * - to allow for any line length, space will be malloced() - * as it comes in. - * - * Initial Revision: (adb@bucsf.bu.edu) - * Tuesday March 21th, 1989 - Began the program at 23:26 EST - * Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST - * Wednesday July 5th, 1989 - Stopped use of sysexits.h 7:22 EST + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/spew.c b/spew.c index ba78ef5..2f54463 100644 --- a/spew.c +++ b/spew.c @@ -1,505 +1,556 @@ /* - * SPEW.C + * spew.c - NPC message generation system + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 lint -static char *cpr[]={ -" Copyright 1987 Greg Smith", -" Permission is granted to freely use and distribute this software", -"provided this notice is left attached and no monetary gain is made." -}; -#endif - -/* This file has been adapted from the "spew" program by Paul Davison, - pd@cs.qmc.ac.uk, on 1st March 1989. It is part of the conquer game - and is subject to the same conditions of use as that game. */ - -/* This in no way supersceedes the copyright notice noted above */ #include #include #include -#include +#include #include "header.h" #include "data.h" -#ifdef SPEW -#include -#include - -char *my_alloc(); -char *save(); - -#if 0 -#ifdef BSD -extern char *index(); /* This may be strchr */ -extern char *rindex(); /* This may be strrchr */ -#else -#define index(s,c) strchr(s,c) -#define rindex(s,c) strrchr(s,c) -extern char *strchr(); /* This may be index */ -extern char *strrchr(); /* This may be rindex */ -#endif -#endif -/*--------------- system configuration ------------------*/ - -/* define some parameters */ - -#define MAXCLASS 300 /* max # of classes */ -#define MAXLINE 256 /* max size of input line */ -#define MAXDEF 1000 /* max # bytes in a definition */ +#ifdef SPEW -/* Define the default rulesfile */ +/* Configuration parameters */ +#define MAX_CLASSES 300 +#define MAX_LINE_LEN 256 +#define MAX_DEF_LEN 1000 +#define ESCAPE_CHAR '\\' +#define DELIMITER_CHAR '/' +#define VARIANT_CHAR '|' #ifndef DEFFILE -# define DEFFILE "rules" +#define DEFFILE "rules" #endif -/* Define the random number generator */ +/* Random number generator macro */ +#define RANDOM(n) (rand() % (n)) -extern long getpid(); - /* ROLL(n) returns integer 0..n-1 */ -#define ROLL(n) ((((long)rand()&0x7ffffff)>>5)%(n)) - -/*---------------------------------------------------*/ +/* Structure to hold a single definition within a class */ +struct definition { + int weight; /* cumulative weight for selection */ + char *text; /* the actual text definition */ + struct definition *next; /* linked list pointer */ +}; -FILE *InFile; +/* Structure to hold a class of definitions */ +struct text_class { + char *name; /* name of this class */ + char *variants; /* string of variant tags */ + int total_weight; /* total weight of all definitions */ + struct definition *defs; /* linked list of definitions */ +}; -typedef struct def_struct{ - int cumul; /* cumulative weights */ - char *string; /* string which defines it */ - struct def_struct *next; /* link to next */ -} defn; -defn *process(); -/* - * within a definition, names of subdefinitions are bracketed in BSLASH - * and SLASH chars. The whole definition ends with a '\0'. - * The SLASH character is always follwed by a variant tag - default is ' '. +/* Global variables */ +static FILE *rules_file = NULL; +static struct text_class *classes = NULL; +static int num_classes = 0; +static char input_line[MAX_LINE_LEN]; +static const char *default_variants = " "; + +/* Function prototypes */ +static int load_rules_file(const char *filename); +static int parse_class_header(const char *line, struct text_class *cls); +static struct definition *parse_definition(const char *line); +static struct text_class *find_class(const char *name, int name_len); +static void generate_text(const char *class_spec, char variant_tag, FILE *output); +static void cleanup_memory(void); +static char *duplicate_string(const char *str); +static int read_line(void); +static int compare_classes(const void *a, const void *b); + +/** + * Main entry point for message generation + * @param count Number of messages to generate + * @param output File to write messages to */ -#define BSLASH '\\' -#define SLASH '/' -#define VBAR '|' - -typedef struct{ - int weight; /* total weight of definitions in class */ - defn *list; /* list of them */ - char *name; /* name of this class */ - char *tags; /* pointer to list of tags */ -} classrec; - -classrec * Classptr; /* pointer to array of class records */ -char *NullTags = " "; /* default tags ( shared ) */ -int Classes; /* number of them */ -int HowMany = 1; -int CompIn = FALSE; /* is input file in compressed format? */ -int CompMain; /* class # of MAIN class when compressed */ - -char InLine[MAXLINE]; - -makemess(n,fp) -int n; -FILE *fp; +void makemess(int count, FILE *output) { - char fname[BIGLTH]; - char main_class[20]; - int i; - HowMany = n; - - /* read in only the rules file in defaultdir */ - sprintf(fname, "%s/%s", DEFAULTDIR, DEFFILE); - InFile = fopen( fname, "r" ); - if( InFile == NULL ){ - fprintf( stderr, "Can\'t open: %s\n", fname ); - exit(1); - } - init(); - if( CompIn ) sprintf( main_class, "%d/ ", CompMain); - else strcpy( main_class, "MAIN/ "); - for(i=0; ilist); /* update pointer */ - do{ - dp = process(); - *update = dp; - cp->weight += dp->cumul; /* add new stuff */ - dp->cumul = cp->weight; /* set breakpoint */ - update = &(dp->next); - }while( readline(), InLine[0]!= '%' ); - ++Classes; /* count them */ - ++cp; - *update = NULL; - } - qsort( (char*)Classptr, Classes, sizeof( classrec ), clcomp); -} -/* - * display is given a class name ( delimited by SLASH, not '\0' ), - * and will (1) find its class descriptor, by calling lookup - * (2) pick a definition (3) output that definition, and - * recursively display any definitions in it, and convert any escapes. - * The variant tag after the SLASH is used to pick out the appropriate - * variants. If that variant tag is '&', the tag 'deftag' is used, which - * is the active variant of the containing activation. +/** + * Load and parse the rules file */ -display(s,deftag,fp) -char *s; -int deftag; -FILE *fp; -{ - register classrec *cp; - register defn *dp; - register char *p; - classrec *lookup(); - int i,variant,incurly; - register int c,writing; - - if( CompIn ){ /* input is compressed */ - cp = &Classptr[ atoi(s) ]; /* explicit class # */ - }else{ - cp = lookup(s); - if( cp == NULL ) { /* none found */ - fprintf(fp,"???"); - while( *s != SLASH ) putc( *s++,fp ); - fprintf(fp,"???"); - return; - } - } - c = index(s,SLASH)[1]; /* get variant tag */ - if( c != '&' ) deftag=c; /* use given tag */ - p = index(cp->tags, deftag); /* look it up */ - if(p == NULL ){ - variant = 0; - fprintf(fp,"\?\?/%c\?\?", deftag ); - deftag = ' '; /* for passing as deftag */ - }else variant = p - cp->tags; - - i = ROLL( cp->weight ); - dp = cp->list; - while(dp->cumul <= i){ /* pick one based on cumul. weights */ - dp = dp->next; - } - - incurly = 0; /* not in curlies */ - writing = 1; /* writing */ - p = dp->string; /* this is the string */ - for(;;)switch(c = *p++){ - case '\0': return; - case BSLASH: - if(( c = *p++) == '\0' ) return; /* ?? */ - else if( c == '!' ){ - if(writing)putc('\n',fp); /* \! = newline */ - }else if( isalnum(c) ){ /* reference */ - if(writing)display(p-1,deftag,fp); /* recurse */ - while( *p!=SLASH )++p; - p += 2; /* skip variant tag */ - }else{ - if(writing) putc(c,fp); - } - break; - case '{': - if( !incurly ){ - incurly = 1; - writing = (variant == 0 ); - }else{ - if( writing )putc('{',fp); - } - break; - case VBAR: - if( incurly ){ - writing = ( variant == incurly++ ); - }else{ - putc(VBAR,fp); - } - break; - case '}': - if( incurly ){ - writing = 1; - incurly = 0; - }else putc('}',fp); - break; - default: - if( writing) putc(c,fp); - } -} -classrec * -lookup( str ) /* delimited by SLASH, not '\0' */ -char *str; +static int load_rules_file(const char *filename) { - int first, last, try, comp; - int namecomp(); - - first = 0; - last = Classes-1; - while( first <= last ){ - try = (first+last)>>1; - comp = namecomp( str, Classptr[try].name ); - if( comp == 0 ) return &Classptr[try]; - if( comp > 0 ) first = try+1; - else last = try-1; - } - return NULL; + rules_file = fopen(filename, "r"); + if (!rules_file) { + return -1; + } + + /* Allocate memory for classes */ + classes = calloc(MAX_CLASSES, sizeof(struct text_class)); + if (!classes) { + fclose(rules_file); + return -1; + } + + /* Read the first line - should start with '%' */ + if (!read_line() || input_line[0] != '%') { + fprintf(stderr, "Error: Rules file must start with class definition\n"); + fclose(rules_file); + return -1; + } + + /* Parse all classes */ + while (input_line[1] != '%') { + if (num_classes >= MAX_CLASSES) { + fprintf(stderr, "Error: Too many classes (max %d)\n", MAX_CLASSES); + fclose(rules_file); + return -1; + } + + /* Parse class header */ + if (parse_class_header(input_line, &classes[num_classes]) != 0) { + fclose(rules_file); + return -1; + } + + /* Parse definitions for this class */ + struct definition **def_ptr = &classes[num_classes].defs; + while (read_line() && input_line[0] != '%') { + struct definition *def = parse_definition(input_line); + if (!def) { + continue; + } + + *def_ptr = def; + classes[num_classes].total_weight += def->weight; + def->weight = classes[num_classes].total_weight; /* Make cumulative */ + def_ptr = &def->next; + } + + num_classes++; + } + + fclose(rules_file); + + /* Sort classes by name for binary search */ + qsort(classes, num_classes, sizeof(struct text_class), compare_classes); + + return 0; } -int namecomp(a,b) /* 'a' is delim. by SLASH, 'b' by NULL */ -register char *a,*b; + +/** + * Parse a class header line + */ +static int parse_class_header(const char *line, struct text_class *cls) { - register int ac; - for(;;){ - ac = *a++; - if(ac == SLASH ) ac = '\0'; - if( ac < *b ) return -1; - if( ac > *b++ ) return 1; - if( ac == '\0' ) return 0; - } -} -readline(){ - register char *p; - do{ - if( fgets( InLine, MAXLINE, InFile ) == NULL ){ - InLine[0] = InLine[1] = '%'; - InLine[2] = '\0'; /* create EOF */ - }else if( (p=rindex( InLine, '\n'))!= NULL ) *p = '\0'; - p = InLine; - while( (p = index( p, BSLASH )) != NULL ){ - if(p[1] == '*' ){ - *p = 0; /* kill comment */ - break; - }else ++p; - } - }while( InLine[0] == '\0' ); + static char temp_name[100]; + static char temp_variants[100]; + const char *p = line + 1; /* Skip the '%' */ + char *name_ptr = temp_name; + + /* Initialize the class */ + cls->name = NULL; + cls->variants = (char *)default_variants; + cls->total_weight = 0; + cls->defs = NULL; + + /* Skip whitespace */ + while (*p == ' ') p++; + + /* Extract class name */ + if (!isalnum(*p)) { + fprintf(stderr, "Error: Invalid class name in: %s\n", line); + return -1; + } + + while (isalnum(*p)) { + *name_ptr++ = *p++; + } + *name_ptr = '\0'; + cls->name = duplicate_string(temp_name); + + /* Look for variant tags */ + while (*p) { + if (*p == ' ') { + p++; + continue; + } else if (*p == '{') { + p++; + char *var_ptr = temp_variants; + *var_ptr++ = ' '; /* Default variant */ + + while (*p && *p != '}') { + if (isalnum(*p)) { + *var_ptr++ = *p; + } + p++; + } + + if (*p == '}') p++; + *var_ptr = '\0'; + cls->variants = duplicate_string(temp_variants); + break; + } else { + fprintf(stderr, "Error: Invalid class header: %s\n", line); + return -1; + } + } + + return 0; } -int clcomp(a,b) -register classrec *a,*b; +/** + * Parse a definition line + */ +static struct definition *parse_definition(const char *line) { - if( a==b) return 0; - return strcmp( a->name, b->name ); + struct definition *def; + const char *p = line; + int weight = 1; /* default weight */ + static char processed_text[MAX_DEF_LEN]; + char *out = processed_text; + + def = malloc(sizeof(struct definition)); + if (!def) { + return NULL; + } + + /* Check for weight specification */ + if (*p == '(') { + p++; + while (*p == ' ') p++; + + if (isdigit(*p)) { + weight = 0; + while (isdigit(*p)) { + weight = weight * 10 + (*p - '0'); + p++; + } + } + + while (*p == ' ') p++; + if (*p == ')') p++; + } + + /* Process the text, handling escape sequences */ + while (*p && (out - processed_text) < MAX_DEF_LEN - 10) { + if (*p == ESCAPE_CHAR) { + *out++ = ESCAPE_CHAR; + p++; + if (isalnum(*p)) { + /* Copy class reference */ + while (isalnum(*p)) { + *out++ = *p++; + } + *out++ = DELIMITER_CHAR; + + /* Handle variant tag */ + if (*p == DELIMITER_CHAR) { + p++; + if (isalnum(*p) || *p == ' ' || *p == '&') { + *out++ = *p++; + } else { + *out++ = ' '; + } + } else { + *out++ = ' '; + } + } else if (*p == '!') { + /* Newline escape */ + *out++ = '!'; + p++; + } else if (*p) { + /* Other escapes */ + *out++ = *p++; + } + } else { + *out++ = *p++; + } + } + + *out = '\0'; + + def->weight = weight; + def->text = duplicate_string(processed_text); + def->next = NULL; + + return def; } -char *save(str) -char *str; + +/** + * Find a class by name using binary search + */ +static struct text_class *find_class(const char *name, int name_len) { - register char *p; - p = (char *) my_alloc( (unsigned)((strlen(str)+1)*sizeof(char))); - return strcpy(p,str); + int low = 0, high = num_classes - 1; + + while (low <= high) { + int mid = (low + high) / 2; + int cmp = strncmp(name, classes[mid].name, name_len); + + if (cmp == 0 && classes[mid].name[name_len] == '\0') { + return &classes[mid]; + } else if (cmp < 0) { + high = mid - 1; + } else { + low = mid + 1; + } + } + + return NULL; } -/* - * setup a class record. The 'class' line is in InLine. + +/** + * Generate text from a class specification */ -setup(cp) -register classrec *cp; +static void generate_text(const char *class_spec, char default_variant, FILE *output) { - char temp[100]; - register char *p,*p2; - - p = &InLine[1]; /* point after the % */ - while( *p == ' ' )++p; - if( !isalnum(*p) ) goto baddec; - p2 = temp; - do *p2++ = *p++; while( isalnum(*p)); - *p2 = '\0'; - cp->weight = 0; /* save the name of it */ - cp->name = save( temp ); - cp->list = NULL; - cp->tags = NullTags; /* by default */ - for(;;)switch(*p++){ - case '\0': - return; /* all done; */ - case ' ': - break; /* allowed those */ - case '{': /* tags list */ - if( cp->tags != NullTags ) goto baddec; /* already */ - p2 = temp; - *p2++ = ' '; /* provide null tag */ - while(*p!='}'){ - if( !isalnum(*p)) goto baddec; - *p2++ = *p++; - } - ++p; /* junk rh brace */ - *p2 = 0; - cp->tags = save(temp); - break; - default: goto baddec; - } - baddec: - fprintf(stderr,"Bad class header: %s\n", InLine ); - exit(1); + const char *slash_pos = strchr(class_spec, DELIMITER_CHAR); + if (!slash_pos) { + fprintf(output, "???%s???", class_spec); + return; + } + + int name_len = slash_pos - class_spec; + char variant_tag = slash_pos[1]; + if (variant_tag == '&') { + variant_tag = default_variant; + } + + /* Find the class */ + struct text_class *cls = find_class(class_spec, name_len); + if (!cls) { + fprintf(output, "???"); + fwrite(class_spec, 1, name_len, output); + fprintf(output, "???"); + return; + } + + /* Find variant index */ + int variant_idx = 0; + if (cls->variants) { + const char *var_pos = strchr(cls->variants, variant_tag); + if (var_pos) { + variant_idx = var_pos - cls->variants; + } + } + + /* Select a random definition */ + if (cls->total_weight == 0) { + return; + } + + int rand_val = RANDOM(cls->total_weight); + struct definition *def = cls->defs; + while (def && def->weight <= rand_val) { + def = def->next; + } + + if (!def) { + return; + } + + /* Process the definition text */ + const char *p = def->text; + int in_variants = 0; + int writing = 1; + int current_variant = 0; + + while (*p) { + if (*p == ESCAPE_CHAR) { + p++; + if (*p == '!') { + if (writing) { + fprintf(output, "\n"); + } + p++; + } else if (isalnum(*p)) { + /* Recursive class reference */ + if (writing) { + const char *start = p - 1; + while (*p != DELIMITER_CHAR && *p) p++; + if (*p == DELIMITER_CHAR) { + p += 2; /* Skip delimiter and variant tag */ + char temp_spec[64]; + int spec_len = (p - start); + if (spec_len < sizeof(temp_spec)) { + memcpy(temp_spec, start, spec_len); + temp_spec[spec_len] = '\0'; + generate_text(temp_spec, default_variant, output); + } + } + } else { + /* Skip over the reference */ + while (*p != DELIMITER_CHAR && *p) p++; + if (*p == DELIMITER_CHAR) p += 2; + } + } else if (*p) { + if (writing) { + fputc(*p, output); + } + p++; + } + } else if (*p == '{') { + if (!in_variants) { + in_variants = 1; + writing = (variant_idx == 0); + current_variant = 0; + } else if (writing) { + fputc('{', output); + } + p++; + } else if (*p == VARIANT_CHAR) { + if (in_variants) { + current_variant++; + writing = (variant_idx == current_variant); + } else if (writing) { + fputc(VARIANT_CHAR, output); + } + p++; + } else if (*p == '}') { + if (in_variants) { + writing = 1; + in_variants = 0; + } else if (writing) { + fputc('}', output); + } + p++; + } else { + if (writing) { + fputc(*p, output); + } + p++; + } + } } -/* - * create a 'processed' version of the InLine, and return a pointer to - * the definition. The 'cumul' field is temporarily used to hold the - * assigned weight of the line. + +/** + * Read a line from the rules file, skipping comments and empty lines */ -defn *process(){ - static char stuff[ MAXDEF ]; - register char *p,*pout; - register defn *dp; - register int c; - - dp = (defn *) my_alloc( (unsigned) sizeof( defn )); - - p = InLine; - pout = stuff; - if( *p == '(' ){ /* get a weight */ - while(*++p ==' '); /* scan */ - if(!isdigit(*p)) goto badweight; - c = *p - '0'; - while(isdigit(*++p)) c = c*10 + (*p - '0' ); - while( *p == ' ')++p; - if( *p != ')') goto badweight; - ++p; - dp->cumul = c; - }else{ - dp->cumul = 1; /* default weight */ - } - while((c = *p++)!='\0')switch(c){ - case BSLASH: - *pout++ = BSLASH; - if( isalnum(*p)){ /* is a ref */ - do{ *pout++ = *p++; - }while( isalnum(*p)); - *pout++ = SLASH; /* delimit */ - if( *p == SLASH ){ /* get variant char */ - ++p; - if( !isalnum(*p)&& *p!= ' ' && *p!= '&' ){ - *pout++ = ' '; - }else *pout++ = *p++; - }else *pout++ = ' '; - }else{ - *pout++ = *p; - if( *p!= '\0'){ - ++p; - }else{ - --pout; /* delete spurious '\' */ - readline(); /* get new line */ - p = InLine; /* point to it */ - } - } - break; - default: - *pout++ = c; - } - *pout = '\0'; - dp->string = save( stuff ); - return dp; - - badweight: - fprintf(stderr, "Bad line weight: %s\n", InLine ); - exit(1); - /*NOTREACHED*/ +static int read_line(void) +{ + char *comment_pos; + + do { + if (!fgets(input_line, MAX_LINE_LEN, rules_file)) { + strcpy(input_line, "%%"); /* EOF marker */ + return 0; + } + + /* Remove newline */ + char *newline = strrchr(input_line, '\n'); + if (newline) *newline = '\0'; + + /* Remove comments (marked by \*) */ + comment_pos = strstr(input_line, "\\*"); + if (comment_pos) { + *comment_pos = '\0'; + } + + /* Trim trailing whitespace */ + int len = strlen(input_line); + while (len > 0 && isspace(input_line[len-1])) { + input_line[--len] = '\0'; + } + + } while (input_line[0] == '\0'); + + return 1; } -char *my_alloc(n) -unsigned n; +/** + * Compare function for sorting classes by name + */ +static int compare_classes(const void *a, const void *b) { - register char *p; - p = (char *) malloc( n ); - if( p==NULL ){ - fprintf(stderr, "Out Of Memory\n"); - exit(1); - } - return p; + const struct text_class *cls_a = (const struct text_class *)a; + const struct text_class *cls_b = (const struct text_class *)b; + return strcmp(cls_a->name, cls_b->name); } - -compdef(dp) -register defn *dp; +/** + * Duplicate a string + */ +static char *duplicate_string(const char *str) { - register char *p; - register int c; - putw( dp-> cumul , stdout ); /* write its cumul weight */ - p = dp->string; - while( (c = *p++) != '\0' ){ - if( c==BSLASH){ - if(!CompIn && isalnum(*p) ){ /* a ref */ - classrec *cp; - cp = lookup(p); /* find it */ - if( cp == NULL ){ - fprintf( stderr, "Undefined class: "); - while( *p != SLASH ) fputc( *p++, stderr); - fputc('\n', stderr ); - exit(1); - }else{ - printf("%c%d", BSLASH, cp-Classptr ); - while( *p != SLASH ) ++p; - } - }else{ /* is escape seq */ - putchar( BSLASH ); - putchar( *p++ ); - } - }else{ - putchar(c); - } - } - putchar(0); + if (!str) return NULL; + + int len = strlen(str); + char *copy = malloc(len + 1); + if (copy) { + strcpy(copy, str); + } + return copy; } -readcclass(cp) -register classrec *cp; +/** + * Clean up allocated memory + */ +static void cleanup_memory(void) { - register int n; - register defn *dp; - defn **dput; - - char store[MAXDEF]; /* for tags */ - cp->weight = getw( InFile ); - instring(store,MAXDEF); - cp->tags = ( store[0] == '\0' )? NullTags: save( store ); - n = getw( InFile ); - if( n<=0 ) badfile(); - dput = &(cp->list); /* link on here */ - while(n--){ - dp = (defn *)my_alloc( (unsigned) sizeof( defn)); - *dput = dp; - dp->cumul = getw( InFile ); - instring(store, MAXDEF ); - dp->string = save( store ); - dput = &(dp->next); - } - *dput = NULL; /* last one */ + if (!classes) return; + + for (int i = 0; i < num_classes; i++) { + free(classes[i].name); + if (classes[i].variants != default_variants) { + free(classes[i].variants); + } + + struct definition *def = classes[i].defs; + while (def) { + struct definition *next = def->next; + free(def->text); + free(def); + def = next; + } + } + + free(classes); + classes = NULL; + num_classes = 0; } -instring( where, how_many ) -register char *where; -register int how_many; +#else +/* If SPEW is not defined, provide stub implementation */ +void makemess(int count, FILE *output) { - register int c; - do{ - c = getc( InFile ); - if( c == EOF ) badfile(); - *where++ = c; - if( c== '\0' ) return; - }while(--how_many); - badfile(); -} -badfile(){ - fprintf(stderr,"Bad file format\n"); - exit(1); + /* Do nothing if SPEW is disabled */ } -#endif /* SPEW */ +#endif /* SPEW */ \ No newline at end of file diff --git a/trade.c b/trade.c index 0435542..17c4a3b 100644 --- a/trade.c +++ b/trade.c @@ -1,26 +1,24 @@ -/*conquer : Copyright (c) 1988 by Ed Barlow. - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed - */ - /* - * The following file "trade.c" was written by Adam Bryant who - * gives all rights to this code to Ed Barlow provided that this - * message remains intact. + * trade.c - Trade and commerce system + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -/* thanks adam -- Ed */ - -/* trade.c */ - -/*include files*/ #include #include #include diff --git a/update.c b/update.c index 191a932..2210755 100644 --- a/update.c +++ b/update.c @@ -1,13 +1,22 @@ -/* Conquer: Copyright (c) 1988 by Edward M Barlow - * I spent a long time writing this code & I hope that you respect this. - * I give permission to alter the code, but not to copy or redistribute - * it without my explicit permission. If you alter the code, - * please document changes and send me a copy, so all can have it. - * This code, to the best of my knowledge works well, but it is my first - * 'C' program and should be treated as such. I disclaim any - * responsibility for the codes actions (use at your own risk). I guess - * I am saying "Happy gaming", and am trying not to get sued in the process. - * Ed +/* + * update.c - Game state update and turn processing + * + * This file is part of Conquer. + * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include diff --git a/utilities/Makefile b/utilities/Makefile index d0a8535..a083539 100644 --- a/utilities/Makefile +++ b/utilities/Makefile @@ -1,3 +1,24 @@ +/* + * Makefile - Build system for conqrast map visualization tool + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + # SHELL=/bin/sh SHAR=/usr/bin/shar diff --git a/utilities/README b/utilities/README index 3c1987d..47ff3a4 100644 --- a/utilities/README +++ b/utilities/README @@ -1,13 +1,27 @@ +# Conquer Utilities -This directory contains the code for conqrast, a program for -displaying nice maps of conquer games on sun consoles and, sometime in -the future, on X windows displays. +This directory contains the **conqrast** map visualization tool for the Conquer game. -See the manual page conqrast.1 for more details. +## About conqrast -Bugs should probably be sent to me, Richard Caley. +**conqrast** creates graphical maps of Conquer games on bitmap display systems. - rjc@uk.ac.ed.aipna +### Original Author +- Written by Richard Caley in 1989 +- Original email: rjc@uk.ac.ed.aipna (historical) -or permutations thereof that your local mailer demands. +### Licensing +- Originally Copyright (C) 1989 by Richard Caley +- Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) +- Licensed under GPL v3 (compatible with original permissive license) +### Versions +- **sunconqrast**: For Sun workstations (requires Pixrect library) +- **xconqrast**: For X Windows (incomplete implementation) + +### Building +```bash +make sunconqrast # Sun version (legacy systems) +make xconqrast # X version (incomplete) +make all # Both versions +{ ble-edit/exec:gexec/.save-lastarg; } &>/dev/null diff --git a/utilities/conqrast.c b/utilities/conqrast.c index 1841507..dedde2c 100644 --- a/utilities/conqrast.c +++ b/utilities/conqrast.c @@ -1,3 +1,24 @@ +/* + * conqrast.c - Map visualization tool for Conquer games + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 diff --git a/utilities/error.c b/utilities/error.c index 80dc77a..d17d241 100644 --- a/utilities/error.c +++ b/utilities/error.c @@ -1,3 +1,24 @@ +/* + * error.c - Error handling and reporting utilities + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 diff --git a/utilities/file.c b/utilities/file.c index 0f9e948..c1c9d04 100644 --- a/utilities/file.c +++ b/utilities/file.c @@ -1,3 +1,24 @@ +/* + * file.c - Multi-map file manipulation routines + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include "file.h" diff --git a/utilities/file.h b/utilities/file.h index a268896..c3b0f22 100644 --- a/utilities/file.h +++ b/utilities/file.h @@ -1,8 +1,23 @@ -/********************************************************************* -* * -* file manipulations * -* * -*********************************************************************/ +/* + * file.h - Multi-map file manipulation routines + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ void myopen(); int isopen(); diff --git a/utilities/sunconqrast.h b/utilities/sunconqrast.h index b7fbd65..4e7adf3 100644 --- a/utilities/sunconqrast.h +++ b/utilities/sunconqrast.h @@ -1,8 +1,23 @@ -/********************************************************************* -* * -* Header file for sun version of conqrast * -* * -*********************************************************************/ +/* + * sunconqrast.h - Sun workstation graphics definitions + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #define driver_version "1" #define conqrast_name "Sunconqrast" diff --git a/utilities/sunstuff.c b/utilities/sunstuff.c index f8a5921..37df898 100644 --- a/utilities/sunstuff.c +++ b/utilities/sunstuff.c @@ -1,3 +1,24 @@ +/* + * sunstuff.c - Sun workstation specific graphics code + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include "sunconqrast.h" diff --git a/utilities/util.c b/utilities/util.c index 54c7548..24fad55 100644 --- a/utilities/util.c +++ b/utilities/util.c @@ -1,3 +1,24 @@ +/* + * util.c - General utility functions for conqrast + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 diff --git a/utilities/xconqrast.h b/utilities/xconqrast.h index adb4744..194d0a1 100644 --- a/utilities/xconqrast.h +++ b/utilities/xconqrast.h @@ -1,17 +1,23 @@ - -/* header for X */ - -#define driver_version "preliminary" -#define conqrast_name "Xconqrast" - -#include - -typedef Drawable bitmap ; -typedef Display *screen_type; -typedef char *font; /* this needs doing */ - -#define is_screenname(name) (index(name,':')!=NULL) /* I think */ -#define get_default_screen_name() NULL /* I have no idea */ +/* + * xconqrast.h - X Windows graphics definitions + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ screen_type screen_named(); diff --git a/utilities/xstuff.c b/utilities/xstuff.c index 2e61455..e8e0747 100644 --- a/utilities/xstuff.c +++ b/utilities/xstuff.c @@ -1,3 +1,24 @@ +/* + * xstuff.c - X Windows specific graphics code + * + * This file is part of Conquer Utilities. + * Originally Copyright (C) 1989 by Richard Caley + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include "xconqrast.h" From 1927622a56273b0b03087dfc7f2bb45f1795cb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 14 Sep 2025 04:59:25 +0200 Subject: [PATCH 04/17] Codebase was originally written with Kernighan&Ritchie style function declaration, pre-ANSI C. Move to ISO C99 compatible codebase. Update Makefile --- Makefile | 196 ++++++++++++++++++++++++++------------------- admin.c | 6 +- cexecute.c | 2 + check.c | 1 + combat.c | 2 +- commands.c | 2 + data.h | 37 ++++++++- display.c | 9 +-- forms.c | 5 +- header.h | 51 +++++++++++- io.c | 2 + magic.c | 1 + main.c | 3 +- makeworl.c | 3 +- misc.c | 12 +-- move.c | 1 + newlogin.c | 3 +- npc.c | 5 +- psmap.c | 6 +- psmap.h | 1 + randeven.c | 5 +- sort.c | 21 ++--- trade.c | 9 +-- trade.h | 6 ++ update.c | 7 +- utilities/Makefile | 39 +++++---- 26 files changed, 275 insertions(+), 160 deletions(-) create mode 100644 trade.h diff --git a/Makefile b/Makefile index 542d194..672e301 100644 --- a/Makefile +++ b/Makefile @@ -1,50 +1,29 @@ -/* - * Makefile - Build configuration and compilation rules - * - * This file is part of Conquer. - * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant - * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -# conquer: Copyright (c) 1989 by Edward M Barlow # -# BY CHANGING THIS FILE, YOU AGREE TO ABIDE BY THE LIMITATIONS STATED IN -# THE LIMITED USE CONTRACT CONTAINED IN THE FILE "header.h" +# Makefile - Build configuration and compilation rules # -# Make sure to set your desired configuration by -# editing the file "header.h". +# This file is part of Conquer. +# Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant +# Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors # -# This makefile has been modified to allow compilation using -# a parallelized make program. It has been used successfully -# on an Encore Multimax parallel computer with both 4 and -# 6 cpus. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# It should pose no problems for non parallel makes. -# -# Please report any problems to adb@bucsf.bu.edu -# or adb@bu-cs.bu.edu -# -# Conquer news mailing list: conquer-news-request@bu-cs.bu.edu. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + MAKE = /usr/bin/make CC = /usr/bin/gcc RM = /bin/rm -f # LN must be "ln -s" if source and default directories span disks -LN = /bin/ln +LN = /bin/ln -s CP = /bin/cp NULL = 2>/dev/null @@ -88,7 +67,7 @@ SHARFLG = -D -c -l$(SHARLIM) -o$(SHARNAM) # # libraries for BSD systems: -LIBRARIES = -lcurses -ltermcap -lcrypt +LIBRARIES = -lcurses -ltermcap # # libraries for SYSV systems: #LIBRARIES = -lcurses @@ -98,15 +77,15 @@ LIBRARIES = -lcurses -ltermcap -lcrypt # CURRENT is this directory. The directory where the source # and Makefile are located -CURRENT = /home/conquer/src +CURRENT = $(HOME)/conquer/src # DEFAULT is the directory where default nations & help files will be # stored. It is also the default directory = where players will play # if they do not use the -d option. -DEFAULT = /home/conquer/lib +DEFAULT = $(HOME)/conquer/lib # This directory is where the executables will be stored -EXEDIR = /home/conquer/bin +EXEDIR = $(HOME)/conquer/bin # Definitions used for compiling conquer CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\" @@ -179,7 +158,7 @@ $(ADMIN): $(AOBJS) -$(RM) $(DAFILS) $(NULL) @echo if the next command does not work you might also need -ltermcap @echo === compiling administrative functions - $(CC) $(OPTFLG) -o $(ADMIN) $(AOBJS) $(LIBRARIES) + $(CC) $(OPTFLG) $(CDEFS) -o $(ADMIN) $(AOBJS) $(LIBRARIES) # comment out the next line during debugging strip $(ADMIN) @@ -241,9 +220,9 @@ install: in$(GAME) in$(ADMIN) in$(SORT) in$(PSPROG) insthelp instman new_game: all insthelp @echo Installing new game - -mkdir $(EXEDIR) $(NULL) - -mkdir $(DEFAULT) $(NULL) - -mkdir $(DEFAULT)/$(GAMEID) $(NULL) + -mkdir -p $(EXEDIR) $(NULL) + -mkdir -p $(DEFAULT) $(NULL) + -mkdir -p $(DEFAULT)/$(GAMEID) $(NULL) chmod 755 $(EXEDIR) chmod 750 $(DEFAULT)/$(GAMEID) $(DEFAULT) $(CP) $(GAME) $(ADMIN) $(SORT) $(PSPROG) $(PSDATA) $(EXEDIR) @@ -307,14 +286,15 @@ $(HELPOUT)5: $(HELP)5 $(HELPSCR).1 $(HELPSCR).2 cat $(HELP)5 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)5 $(HELPSCR).1: newhelp - newhelp + ./newhelp $(HELPSCR).2: newhelp - newhelp + ./newhelp newhelp: dataG.o newhelp.o $(CC) $(OPTFLG) dataG.o newhelp.o -o newhelp strip newhelp + # # postscript map program PSOPTS = -DPSFILE=\"$(EXEDIR)/$(PSDATA)\" -D$(PSPAGE) @@ -337,44 +317,98 @@ cpio: -$(RM) core find . -name '*[CrpsEech]' -print | cpio -ocBv > cpiosv -shar: +shar: echo " lines words chars FILENAME" > MANIFEST wc $(ALLFILS) >> MANIFEST $(SHAR) $(SHARFLG) $(ALLFILS) MANIFEST -.cA.o: $< - ( trap "" 0 1 2 3 4 ; $(LN) $*.c $*A.c ;\ - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c $*A.c ;\ - $(RM) $*A.c ) - -.cG.o: $< - ( trap "" 0 1 2 3 4 ; $(LN) $*.c $*G.c ;\ - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c $*G.c ;\ - $(RM) $*G.c ) - -.c.o: $< -# compiles using both defines since they -# are needed for the data.h definitions for -# each file... but should not be needed for -# the actual C source file being compiled +.c.o: $< $(CC) $(OPTFLG) $(CDEFS) -DADMIN -DCONQUER -c $*.c -$(GOBJS): data.h header.h - -$(AOBJS): data.h header.h - -ioG.o: data.h header.h patchlevel.h io.c - -ioA.o: data.h header.h patchlevel.h io.c - -newlogin.o: data.h header.h newlogin.h patchlevel.h newlogin.c - -main.o: data.h header.h patchlevel.h main.c - -newhelp.o: data.h header.h patchlevel.h newhelp.c - -# Clear suffixes -.SUFFIXES: +# Explicit rules for ADMIN objects + +cexecuteA.o: cexecute.c + $(RM) cexecuteA.c + $(LN) cexecute.c cexecuteA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c cexecuteA.c -o cexecuteA.o + $(RM) cexecuteA.c + +ioA.o: io.c + $(RM) ioA.c + $(LN) io.c ioA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c ioA.c -o ioA.o + $(RM) ioA.c + +miscA.o: misc.c + $(RM) miscA.c + $(LN) misc.c miscA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c miscA.c -o miscA.o + $(RM) miscA.c + +navyA.o: navy.c + $(RM) navyA.c + $(LN) navy.c navyA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c navyA.c -o navyA.o + $(RM) navyA.c + +magicA.o: magic.c + $(RM) magicA.c + $(LN) magic.c magicA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c magicA.c -o magicA.o + $(RM) magicA.c + +dataA.o: data.c + $(RM) dataA.c + $(LN) data.c dataA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c dataA.c -o dataA.o + $(RM) dataA.c + +tradeA.o: trade.c + $(RM) tradeA.c + $(LN) trade.c tradeA.c + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c tradeA.c -o tradeA.o + $(RM) tradeA.c + +# Explicit rules for GAME objects +cexecuteG.o: cexecute.c + $(RM) cexecuteG.c + $(LN) cexecute.c cexecuteG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c cexecuteG.c -o cexecuteG.o + $(RM) cexecuteG.c + +ioG.o: io.c + $(RM) ioG.c + $(LN) io.c ioG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c ioG.c -o ioG.o + $(RM) ioG.c + +miscG.o: misc.c + $(RM) miscG.c + $(LN) misc.c miscG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c miscG.c -o miscG.o + $(RM) miscG.c + +navyG.o: navy.c + $(RM) navyG.c + $(LN) navy.c navyG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c navyG.c -o navyG.o + $(RM) navyG.c + +magicG.o: magic.c + $(RM) magicG.c + $(LN) magic.c magicG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c magicG.c -o magicG.o + $(RM) magicG.c + +dataG.o: data.c + $(RM) dataG.c + $(LN) data.c dataG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c dataG.c -o dataG.o + $(RM) dataG.c + +tradeG.o: trade.c + $(RM) tradeG.c + $(LN) trade.c tradeG.c + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c tradeG.c -o tradeG.o + $(RM) tradeG.c -# Suffixes for conquer files. -.SUFFIXES: A.o G.o .c .h .o diff --git a/admin.c b/admin.c index 70b5d06..1353e07 100644 --- a/admin.c +++ b/admin.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include "header.h" #include "data.h" @@ -52,6 +54,8 @@ short dismode=2; short country=0; struct s_nation *curntn; extern char datadir[]; +char scenario[256]; +//char defaultdir[256]; #ifdef REMAKE int remake=FALSE; #endif /*REMAKE*/ @@ -63,7 +67,7 @@ main(argc,argv) int argc; char **argv; { - int geteuid(), getuid(), setuid(), realuser, l; + int realuser, l; register int i,j; char *name; #ifndef __STDC__ diff --git a/cexecute.c b/cexecute.c index ed59d4e..3569343 100644 --- a/cexecute.c +++ b/cexecute.c @@ -23,8 +23,10 @@ #include #include #include +#include #include "header.h" #include "data.h" + extern long startgold; extern short country; extern FILE *fexe, *fnews; diff --git a/check.c b/check.c index ef29969..fd195d4 100644 --- a/check.c +++ b/check.c @@ -25,6 +25,7 @@ #include #include #endif +#include #include "header.h" #include "data.h" diff --git a/combat.c b/combat.c index 68df1c1..af13035 100644 --- a/combat.c +++ b/combat.c @@ -680,7 +680,7 @@ printf("I AM VERY CONFUSED - PLEASE HELP... combat.c\n"); /* CBONUS() - return combat bonuses for unit i */ /************************************************************************/ int -cbonus(num) +cbonus(int num) { short armynum; int armbonus; diff --git a/commands.c b/commands.c index 910fbca..8db31a9 100644 --- a/commands.c +++ b/commands.c @@ -28,6 +28,8 @@ #include #include #endif /*CONQUER*/ +#include +#include #include "header.h" #include "data.h" diff --git a/data.h b/data.h index 426ee42..bfd30fa 100644 --- a/data.h +++ b/data.h @@ -19,6 +19,32 @@ * along with this program. If not, see . */ +/*--------I DO NOT BELIEVE IT IS NECESSARY TO ALTER THIS FILE----------------*/ +#define FAIL 1 /* fail return to shell */ +#define SUCCESS 0 /* successful return to shell */ +#define TIME_DEAD 3600 /* number of seconds for file aging */ +#define BIG 500000000L /* BIGGER THAN ANYTHING SHOULD BE */ + /* this is used to protect against overflow */ +#define SCRARM ((LINES-14)/2) /* number of armies to fit on screen */ + +/* sometimes curses.h defines TRUE */ +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +/* definitions for mail sending */ +#define DONEMAIL (-3) +#define NEWSMAIL (-2) +#define ABORTMAIL (-1) + +/* definitions for screen redrawing */ +#define DONE 0 +#define PART 1 +#define FULL 2 + +#define SCREEN_X_SIZE (( COLS - 21) / 2) /* divide by two as only 1/2 + sectors will be shown */ #define SCREEN_Y_SIZE ( LINES - 5 ) #define HAS_SEEN(x,y) hasseen[(x)+((y)*((COLS-10)/2))] #define PASSLTH 7 /* the number of characters in the passwd*/ @@ -615,7 +641,10 @@ extern int units_in_sector(), num_powers(), tofood(), mailopen(); extern int get_god(), flightcost(), todigit(), getclass(), startcost(); extern int water_2reachp(),tg_ok(), readmap(), avian(); extern int cbonus(), armymove(),takeover(),getnewname(); -extern int getleader(),execute(),peasant_revolt(),other_revolt(); +extern int getleader(); +extern int execute(); +extern void peasant_revolt(int *newnation); +extern int other_revolt(int *new); extern int aretheyon(),armygoto(),navygoto(),getselunit(); extern int unitvalid(),access(),orctake(),fort_val(); extern int addgships(),addmships(),addwships(),fltships(); @@ -626,7 +655,7 @@ extern void do_pirate(), do_nomad(), do_savage(), do_lizard(); extern void getjewel(),getmetal(),loadfleet(),removemgk(),exenewmgk(); extern struct s_sector *rand_sector(); extern void subgships(),submships(),subwships(),getspace(),sackem(); -extern void sleep(), whatcansee(), reset_god(), get_nname(), camp_info(); +extern void whatcansee(), reset_god(), get_nname(), camp_info(); extern void main(), makebottom(), makeside(), check_mail(), centermap(); extern void checkout(),copyscreen(),bye(),credits(),init_hasseen(); extern void combinearmies(),change_status(),reducearmy(),splitarmy(); @@ -647,7 +676,9 @@ extern void budget(),change(),cheat(),coffmap(),combat(),construct(); extern void defattr(),diploscrn(),domagic(),draft(),erupt(); extern void fight(); extern void fill_edge(),flee(),fleetrpt(),hangup(),help(); -extern void highlight(),makemap(),makeside(); +extern void highlight(int x, int y, short hmode); +extern void makemap(); +extern void makeside(); extern void makeworld(),monster(),moveciv(); extern void mymove(),navalcbt(),newdip(),newdisplay(),newlogin(); extern void newspaper(),npcredes(),offmap(),place(),populate(); diff --git a/display.c b/display.c index c97fe9c..773d14e 100644 --- a/display.c +++ b/display.c @@ -202,9 +202,7 @@ newdisplay() /*see what is in xy as per display modes*/ char -get_display_for(x,y,dmode) - int x,y; - short dmode; +get_display_for(int x,int y,short dmode) { int armbonus; @@ -345,7 +343,7 @@ get_display_for(x,y,dmode) } void -see(x,y) +see(int x,int y) { char ch; if((x<0)||(y<0)||(x>=SCREEN_X_SIZE)||(y>=SCREEN_Y_SIZE) @@ -367,8 +365,7 @@ see(x,y) /*highlight what is in xy as per highlight mode*/ void -highlight(x,y,hmode) - short hmode; +highlight(int x,int y,short hmode) { int armynum; if((x<0)||(y<0)||(x>=SCREEN_X_SIZE)||(y>=SCREEN_Y_SIZE) diff --git a/forms.c b/forms.c index 71d84eb..2719f6a 100644 --- a/forms.c +++ b/forms.c @@ -894,10 +894,7 @@ help() /* routine to highlight a line for news display */ /* if country name is mentioned. By T. Kivinen */ -mvaddstrnahil(li,col,p) - int li; - int col; - char *p; +void mvaddstrnahil(int li,int col,char *p) { int i,j; move(li,col); diff --git a/header.h b/header.h index b0122cc..6b64af1 100644 --- a/header.h +++ b/header.h @@ -19,6 +19,50 @@ * along with this program. If not, see . */ +/* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS --- */ +#define OWNER "Adam Bryant" /* administrators name */ +#define LOGIN "adb" /* administrators login id. IMPORTANT! */ + /* only this UID may update. */ +/* #define SYSV /* uncomment this line on a UNIX SYSV machine */ +#define BSD /* uncomment this line on a BSD machine */ +/* #define HPUX /* uncomment for HP-UNIX */ +/*#define XENIX /* this plus SYSV for XENIX machines, untested */ +#define SYSMAIL /* if your system supports mail */ + /* conquer will notify you about system mail */ + +/* ------------------MODIFICATION IS OPTIONAL ON THE FOLLOWING----------*/ +#define SPOOLDIR "/usr/spool/mail" /* location of mail spool */ +#define FILELOCK /* if your system supports BSD flock() */ + /* other file locking is not well implemented */ +/*#define LOCKF /* in addition to FILELOCK if you have lockf */ + /* this is needed on NFS remote file systems */ +#define TIMELOG /* if your system has the date command */ + +#define NTOTAL 25 /* max # of nations ( player + npc + monster ) */ +#define MAXPTS 65 /* points for players to buy stuff with at start*/ +#define MAXARM 50 /* maximum number of armies per nation */ +#define MAXNAVY 10 /* maximum number of fleets per nation */ +#define PDEPLETE 30 /* % of armies/sectors depleted without Capitol */ +#define PFINDSCOUT 50 /* percentage chance for capturing scouts */ + +#define RUNSTOP /* defined to stop update if players are in */ + /* game -- not recommended with automatic update*/ +#define TRADE /* defined to allow commerce between nations */ +#define TRADEPCT 75 /* percent of sectors with exotic trade goods */ +#define METALPCT 33 /* percent of tradegoods that are metals */ +#define JEWELPCT 33 /* percent of tradegoods that are luxury items */ +#define HIDELOC /* defined if news is not to report sectors */ +#define OGOD /* defined if you wish to enhance god powers. */ +#define REMAKE /* may make a world even if datafile exists. */ + /* this allows demi-gods the ability to remake */ + /* their world. */ +#define NOSCORE /* only show full scores to god while in game */ +/* #define CHECKUSER */ /* only allow owner of nation to play it */ +#define REVSPACE 5 /* allow for this many revolts in nation list */ +#define LASTADD 5 /* last turn players may w/out password */ +#define USERLOG /* log users who play a nation */ +#define MASK 037 /* data file protection mask (umask) */ +#define DERVDESG /* allow DERVISH to redesignate in DESERT/ICE */ #define MONSTER 45 /* defined if pirates/savages/nomads/lzard exist. represents # of sectors of land that need to be in world per pirate/savage/nomad nation */ @@ -27,7 +71,7 @@ represents # of sectors of land that need to be in world per non-player character nation */ #define CHEAT /* npcs will cheat to keep up - this is a very weak - form of cheating. I use good npc algorithms + form of cheating. I use good npc algorithms (i think... comments) */ /*#define NPC_COUNT_ARMIES /* defined if NPC nations can always count armies This makes them to cheat by seeing even VOID and @@ -54,7 +98,7 @@ #define BEEP /* defined if you wish terminal to beep */ #define HILIGHT /* defined if terminals support inverse video */ #define RANEVENT 15 /* comment out if you dont want random events - weather, tax revolts, and volcanoes all are + weather, tax revolts, and volcanoes all are considered random events. */ #define PWEATHER 0 /* percent for weather disaster - unimplemented */ #define PREVOLT 25 /* %/turn that a revolt acutally occurs */ @@ -120,7 +164,7 @@ #define FORTSTR 5 /* percent per fortress point in forts */ #define TOWNSTR 5 /* percent per fortress point in towns */ #define CITYSTR 8 /* percent per fortress point in city */ -#define LATESTART 2 /* new player gets 1 point/LATESTART turns, +#define LATESTART 2 /* new player gets 1 point/LATESTART turns, when they start late into the game */ /* starting values for mercenaries */ @@ -131,3 +175,4 @@ #define ST_MDEF 40 /* mercenary defense bonus */ #define VERSION "Version 4" /* version number of the game */ + diff --git a/io.c b/io.c index ad2645e..39cc19e 100644 --- a/io.c +++ b/io.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include "header.h" #include "data.h" #include "patchlevel.h" diff --git a/magic.c b/magic.c index 0f9e7a4..ecb15b0 100644 --- a/magic.c +++ b/magic.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "header.h" #include "data.h" diff --git a/main.c b/main.c index 782b1ef..a99ef33 100644 --- a/main.c +++ b/main.c @@ -27,7 +27,9 @@ #include #include #include +#include #include +#include #include "header.h" #include "data.h" #include "patchlevel.h" @@ -79,7 +81,6 @@ char **argv; int checkuser_uid = 0; int checkuser_list = FALSE; #endif - int geteuid(), getuid(), setuid(); register int i,j; char name[NAMELTH+1],filename[FILELTH]; #ifndef __STDC__ diff --git a/makeworl.c b/makeworl.c index 5845c60..2c58496 100644 --- a/makeworl.c +++ b/makeworl.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "header.h" #include "data.h" @@ -807,7 +808,7 @@ rawmaterials() /*PLACE EACH SECTOR'S RAW MATERIALS */ /*fill: subroutine to fill in a square edges with land or sea*/ void -fill_edge(AX,AY) +fill_edge(int AX,int AY) { /* 1) water * 2) water with major islands (25% land) diff --git a/misc.c b/misc.c index fd71e6c..db74654 100644 --- a/misc.c +++ b/misc.c @@ -19,6 +19,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -28,8 +29,11 @@ #include #include #endif /*CONQUER*/ +#include +#include #include "header.h" #include "data.h" +#include "trade.h" extern FILE *fnews; extern short country,redraw; @@ -591,9 +595,7 @@ int y; #ifdef CONQUER int -units_in_sector(x,y,nation) -int x; -int y; +units_in_sector(int x,int y,int nation) { int count=0, armynum, nvynum; struct s_nation *nptr = curntn; @@ -1500,7 +1502,7 @@ int class; char tmp_mail_name[LINELTH]; int -mailopen(to) +mailopen(int to) { #ifdef CONQUER char line[LINELTH]; @@ -1561,7 +1563,7 @@ mailopen(to) } void -mailclose(to) +mailclose(int to) { if(mailok==DONEMAIL) return; diff --git a/move.c b/move.c index f73c244..af42fd5 100644 --- a/move.c +++ b/move.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "header.h" #include "data.h" diff --git a/newlogin.c b/newlogin.c index 5649541..51330ed 100644 --- a/newlogin.c +++ b/newlogin.c @@ -62,6 +62,7 @@ char *Mhelp[]= { "Population: Amount of citizens in your nation", "Leaders: Number of leader units, including national ruler", "Raw Materials: Starting values for jewels, metal, and food" }; +int nstartcst(void); extern int pwater; /* percent water in world (0-100) */ extern FILE *fexe, *fopen(); extern short country; @@ -368,7 +369,7 @@ newlogin(realuser) long x; char tempc[LINELTH]; char passwd[PASSLTH+1]; - register i; + register int i; /* setup curses display */ newinit(); diff --git a/npc.c b/npc.c index 027789e..cb2ca93 100644 --- a/npc.c +++ b/npc.c @@ -1517,7 +1517,7 @@ register short nation; /* +100 if undefended sectors of nation, +60 if not */ void -n_undefended( nation ) +n_undefended(int nation ) { register int x,y; for(x=stx;x #include #include +#include #include "psmap.h" char buffer[BUFSIZ]; @@ -316,9 +317,8 @@ buildps() } } -main(argc, argv) - int argc; - char **argv; +int +main(int argc, char *argv[]) { extern char *optarg; extern int optind; diff --git a/psmap.h b/psmap.h index c527386..015ed0e 100644 --- a/psmap.h +++ b/psmap.h @@ -19,6 +19,7 @@ * along with this program. If not, see . */ +#ifdef OTHER #define DEFAULTPAGE 0 #endif diff --git a/randeven.c b/randeven.c index 9aa4c20..e240679 100644 --- a/randeven.c +++ b/randeven.c @@ -976,9 +976,8 @@ char *event; if(ispc(ntn[cntry].active)) mailclose(cntry); } -int -peasant_revolt(newnation) /* peasant revolt */ -int *newnation; /* return nation id */ +void +peasant_revolt(int *newnation) /* peasant revolt */ { register int i,j; int armynum; diff --git a/sort.c b/sort.c index a8855eb..dd01ec9 100644 --- a/sort.c +++ b/sort.c @@ -71,13 +71,10 @@ FILE *infile, *outfile; #define UPPER(x) ((islower(x))?(toupper(x)):(x)) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { /* declare temporary variables and functions */ int i,j,num_args=0,l,innum=0,outnum=0; - FILE *fopen(); int get_line(); void place(), send_out(); @@ -201,8 +198,7 @@ main(argc, argv) /* routine to read all characters in until carriage returns */ int -get_line(data) - char data[]; +get_line(char data[]) { int in,ch; @@ -223,7 +219,7 @@ get_line(data) /* routine to output entire sorted file to outfile */ void -send_out() +send_out(void) { L_PTR temp=head; @@ -235,8 +231,7 @@ send_out() /* routine to sort list as it comes in */ void -place(data) - char data[]; +place(char data[]) { L_PTR temp, build_node(); int comp_line(); @@ -265,8 +260,7 @@ place(data) /* -1 on a preceding b */ /* 1 on a following b */ int -comp_line(a,b) - char *a,*b; +comp_line(char *a, char *b) { int i; @@ -287,12 +281,9 @@ comp_line(a,b) /* create L_DATA structure containing a line of data */ /* and the next value set to the given location */ L_PTR -build_node(data, nptr) - char data[]; - L_PTR nptr; +build_node(char data[], L_PTR nptr) { L_PTR temp; - char *strcpy(); /* build the memory space */ if((temp=(L_PTR)malloc(sizeof(L_DATA)))==(L_PTR)NULL) { diff --git a/trade.c b/trade.c index 17c4a3b..afdbc48 100644 --- a/trade.c +++ b/trade.c @@ -23,8 +23,10 @@ #include #include #include +#include #include "header.h" #include "data.h" +#include "trade.h" #ifdef TRADE @@ -784,9 +786,7 @@ long longval; } long -gettval(cntry1,cntry2,type,longval,extint) -int cntry1, cntry2, extint; -long longval; +gettval(int cntry1,int cntry2,int type,long longval,int extint) { int returnval=(-1); long armyvalue(); @@ -1047,8 +1047,7 @@ uptrade() /* remove a nations items from the trading board */ void -fixtrade (cntry) -int cntry; +fixtrade (int cntry) { FILE *tfile; int holdint, notopen=FALSE; diff --git a/trade.h b/trade.h new file mode 100644 index 0000000..00f408f --- /dev/null +++ b/trade.h @@ -0,0 +1,6 @@ +#ifndef TRADE_H +#define TRADE_H + +void fixtrade(int cntry); + +#endif \ No newline at end of file diff --git a/update.c b/update.c index 2210755..daa0bd7 100644 --- a/update.c +++ b/update.c @@ -24,12 +24,11 @@ #include #include #include -#ifndef XENIX +#ifndef XENIX #include #include -#else -#include #endif +#include #include "header.h" #include "data.h" @@ -142,7 +141,7 @@ update() /* returns attractiveness */ /****************************************************************/ int -attract(x,y,race) +attract(int x,int y,int race) { register struct s_sector *sptr = &sct[x][y]; int designation; diff --git a/utilities/Makefile b/utilities/Makefile index a083539..0177ed2 100644 --- a/utilities/Makefile +++ b/utilities/Makefile @@ -1,23 +1,22 @@ -/* - * Makefile - Build system for conqrast map visualization tool - * - * This file is part of Conquer Utilities. - * Originally Copyright (C) 1989 by Richard Caley - * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original license - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +# +# Makefile - Build configuration and compilation rules +# +# This file is part of Conquer Utilities. +# Originally Copyright (C) 1989 by Richard Caley +# Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # SHELL=/bin/sh From 31490bc4a7b2c6842684bb4b015b5730b5c67280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 14 Sep 2025 05:44:38 +0200 Subject: [PATCH 05/17] Rename LICENSE to LICENSE.md --- LICENSE => LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename LICENSE => LICENSE.md (98%) diff --git a/LICENSE b/LICENSE.md similarity index 98% rename from LICENSE rename to LICENSE.md index 9688d8d..64668ac 100644 --- a/LICENSE +++ b/LICENSE.md @@ -56,4 +56,4 @@ You should have received a copy of the GNU General Public License along with thi **Relicensing Contact:** vejeta@gmail.com **Last Updated:** 13th September 2025 -**For complete legal documentation:** See [`RELICENSING-PERMISSIONS.md`](RELICENSING-PERMISSIONS.md) \ No newline at end of file +**For complete legal documentation:** See [`RELICENSING-PERMISSIONS.md`](RELICENSING-PERMISSIONS.md) From 76f34f72e39fe24396f225b6808cb80cda98d0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 14 Sep 2025 05:45:17 +0200 Subject: [PATCH 06/17] Rename README to README.md --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From f1ca248b905c866f266242b9b8ada32fcdd33d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= <940731+vejeta@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:09:11 +0200 Subject: [PATCH 07/17] Add COPYING file with with a copy of GPL-3,0,txt as convenience --- COPYING | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 COPYING diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 5363fbacf1cd5c55828cae981cb735c24c4fd8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= <940731+vejeta@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:56:24 +0200 Subject: [PATCH 08/17] Provide community validation by barrapunto.com with web.archive.org copies --- HISTORY.md | 2 +- RELICENSING-PERMISSIONS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index f9ab77a..22ad42f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -63,7 +63,7 @@ The original code could be extracted and assembled from the original USENET mess ### Community Discussions **Asking on barrapunto about how to relicense it:** -[Barrapunto discussion](http://preguntas.barrapunto.com/~vejeta/journal/22901) +[Barrapunto discussion](https://web.archive.org/web/20180707202804/http://barrapunto.com/~vejeta/journal/22901) **About conquer and dominion:** - [Spanish Unix discussion](https://groups.google.com/group/es.comp.os.unix/browse_thread/thread/808b677b6af29aea/79a5a3abd161f7f1?q=conquer+vejeta+estrategia#79a5a3abd161f7f1) diff --git a/RELICENSING-PERMISSIONS.md b/RELICENSING-PERMISSIONS.md index 3414b44..40411ef 100644 --- a/RELICENSING-PERMISSIONS.md +++ b/RELICENSING-PERMISSIONS.md @@ -742,7 +742,7 @@ This documentation follows the advice from Debian Legal discussions, specificall - **GNU Savannah task:** http://savannah.gnu.org/task/?5945 - **Debian Legal discussion:** http://lists.debian.org/debian-legal/2006/10/msg00063.html -- **Community validation:** http://preguntas.barrapunto.com/~vejeta/journal/22901 +- **Community validation:** https://web.archive.org/web/20180707202804/http://barrapunto.com/~vejeta/journal/22901 --- From ab6bd5c98f5d4ef41fc201f58f82b054a2250f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Mon, 15 Sep 2025 16:24:57 +0200 Subject: [PATCH 09/17] MaF permissions to relicense as GPL (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Manuel Méndez Rey <940731+vejeta@users.noreply.github.com> --- AUTHORS.md | 12 ++ CONQPS.INFO | 71 +++++++---- HISTORY.md | 6 + LICENSE.md | 7 +- RELICENSING-PERMISSIONS.md | 237 +++++++++++++++++++++++++++++++++++++ psmap.c | 13 +- psmap.h | 12 +- psmap.ps | Bin 6077 -> 7029 bytes 8 files changed, 322 insertions(+), 36 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index b2aa44e..e73bf42 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -19,6 +19,17 @@ This file lists the contributors to the Conquer game project. - Active in USENET community discussions - Copyright holder (1987-1988) +## Additional Original Contributors (1989) +** Martin Forssen (MaF)** (historical)> / (current) +*PostScript utilities author* + +- Created psmap.c - PostScript map generator for Conquer +- Developed CONQPS.INFO documentation and utilities +- Created PostScript visualization components +- Original "Feel free to hack" licensing approach +- Copyright holder for PostScript utilities (1989) +- Granted GPL v3 relicensing permission (2025) + ## Historical Context The original Conquer was developed during the late 1980s when source code was commonly distributed through USENET newsgroups. Both authors contributed significantly to early computer gaming and open source distribution methods. @@ -78,6 +89,7 @@ The original Conquer was developed during the late 1980s when source code was co - **Juan Manuel Méndez Rey (Vejeta)**: Legal coordination, author contact, documentation - **Ed Barlow**: Permission granting, historical clarification - **Adam Bryant**: Permission confirmation, copyright clarification +- **Martin Forssen**: PostScript utilities, relicensing permission (2025) ### Current Era (2011-present) - **Vejeta**: Primary maintainer, documentation, community coordination diff --git a/CONQPS.INFO b/CONQPS.INFO index 5a52f57..e8909c2 100644 --- a/CONQPS.INFO +++ b/CONQPS.INFO @@ -1,4 +1,26 @@ +CONQPS.INFO - A program to convert conquer maps to postscript +This file is part of Conquer. +Originally Copyright (C) 1989 by Martin Forssen (MaF) +Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original author + +Original author: Martin Forssen (historical) +Permission granted by: Martin Forssen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +================================================================================ Description @@ -22,9 +44,9 @@ a LaserWriter II. c Turns off printing of coordinates around the edge of the map. f fontname Sets the font to 'fontname', you can use any font that is in your - printer. Default is Times-Roman. The program also looks for - the environment variable CONQ_PSFONT. The f option overrides - both the default and the environment variable. + printer. Default is Times-Roman. The program also looks for + the environment variable CONQ_PSFONT. The f option overrides + both the default and the environment variable. g Turns off printing of the grid at the unknown parts of the map. @@ -41,24 +63,24 @@ a LaserWriter II. o x,y If you want to print just a small part of a bigger map use this option. It makes conqps just to produce one page centered around - coordinates x,y. + coordinates x,y. p type Sets the type of paper you have in the printer. Possible values - today are: A4 (European standard) LETTER (American standard) or - OTHER (should be local standard). You shouldn't have to use this - option since the person who maintains conquer at your site should - have set the right papersize as default (This is done in the - Makefile). + today are: A4 (European standard) LETTER (American standard) or + OTHER (should be local standard). You shouldn't have to use this + option since the person who maintains conquer at your site should + have set the right papersize as default (This is done in the + Makefile). s size Sets the size of each square of the map. This is useful to get - more map printed on fewer pages, but it will be smaller. - Default value is 9. + more map printed on fewer pages, but it will be smaller. + Default value is 9. t string Conqps tries to guess a nice title to the map for you. Normally - this is something like 'Designation Map for Nation Midkemia on - Turn 2' (this title is actually provided from the conquer program). - If however you would like to have your own title shown, just use - the t option, which replaces the default title with string. + this is something like 'Designation Map for Nation Midkemia on + Turn 2' (this title is actually provided from the conquer program). + If however you would like to have your own title shown, just use + the t option, which replaces the default title with string. u Normally conqps put small pictures in some of your squares instead of just letters. This option forces conqps not to do this, but instead @@ -68,21 +90,20 @@ a LaserWriter II. is and how big it will be on the printer. L,W,X,Y If none of the paper types fits your needs you can alter the size - directly with these options. All these options use one postscript - point (1/72 inch) as their unit. L sets the length of the page. - W sets the width. X sets the x coordinate for the leftmost viewable - pixel on the output, and Y sets the y coordinate. These options - are normally never used, instead you should experiment with - the p option. + directly with these options. All these options use one postscript + point (1/72 inch) as their unit. L sets the length of the page. + W sets the width. X sets the x coordinate for the leftmost viewable + pixel on the output, and Y sets the y coordinate. These options + are normally never used, instead you should experiment with + the p option. Bugs Hopefully no. - Comments - If you have any comments or ideas mail them to d8forma@dtek.chalmers.se . - - MaF + For questions about this GPL v3 licensed version, contact the current maintainer. + For historical reference, original author was Martin Forssen (MaF). + Originally by MaF, GPL v3 licensed with permission \ No newline at end of file diff --git a/HISTORY.md b/HISTORY.md index 22ad42f..ede22dc 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -75,6 +75,12 @@ Conquer is a Middle Earth multi-player strategy game that was originally distrib The game's distribution method through USENET was typical of the era, when source code was shared across newsgroups and assembled by users from multiple parts posted sequentially. +## PostScript Utilities + +Martin Forssen's PostScript utilities added professional map printing capabilities to Conquer, allowing players to generate high-quality printed maps suitable for PostScript printers. + +This was particularly valuable in the era before widespread graphical user interfaces, providing a way to visualize the game state in print. + ## Legacy This historical documentation preserves the timeline of one of the early multi-player computer games and demonstrates the evolution of open source software licensing practices. The successful relicensing effort by Vejeta (2006-2011) serves as an example of how legacy software can be preserved and made available to modern audiences under open source licenses. diff --git a/LICENSE.md b/LICENSE.md index 64668ac..899d397 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -21,6 +21,8 @@ See the full text of the GPL-3.0 license in the file `GPL-3.0.txt` included with 2. **Adam Bryant (2011):** *"Just wanted to confirm that I had no issues with publication of version 4 of Conquer under the GPL."* - Confirmed permission to release under GPL. +3. **Martin Forssen (MaF) (2025):** *"And I have no problem with relicensing it to GPL."* - Granted permission to relicense under GPL. + ### Legal Documentation **⚠️ COMPLETE EMAIL EVIDENCE:** The full, unedited email correspondence containing the explicit relicensing permissions from both original authors is preserved in [`RELICENSING-PERMISSIONS.md`](RELICENSING-PERMISSIONS.md) for legal compliance and transparency. @@ -40,7 +42,8 @@ You should have received a copy of the GNU General Public License along with thi - Original USENET posts and historical references can be found in [`HISTORY.md`](HISTORY.md) - The relicensing process began in 2006 when Vejeta contacted the original authors - This relicensing effort was discussed on Debian Legal mailing lists and other forums -- All source code extraction and compilation from original USENET posts was performed by the maintainer +- All source code extraction and compilation from original USENET posts was performed by the maintainer and **quixadhal (Dread Quixadhal)** - https://github.com/quixadhal +- PostScript utilities by Martin Forssen were relicensed in 2025 ## Files in This Repository @@ -54,6 +57,6 @@ You should have received a copy of the GNU General Public License along with thi **Repository Maintainer:** Juan Manuel Méndez Rey (Vejeta) **Relicensing Contact:** vejeta@gmail.com -**Last Updated:** 13th September 2025 +**Last Updated:** 15th September 2025 **For complete legal documentation:** See [`RELICENSING-PERMISSIONS.md`](RELICENSING-PERMISSIONS.md) diff --git a/RELICENSING-PERMISSIONS.md b/RELICENSING-PERMISSIONS.md index 40411ef..f4d6035 100644 --- a/RELICENSING-PERMISSIONS.md +++ b/RELICENSING-PERMISSIONS.md @@ -721,6 +721,243 @@ lege partners will be happy with the news. --- +## Permission from Martin Forssen (2025) + +**Context:** Martin Forssen (MaF) was a contributor for psmap.c, psmap.h, psmap.ps and CONQPS.INFO, +a tool to convert conquer maps to postscript. Contact established in 2025, providing explicit GPL permission. + +**Key Quote:** *"Oh, that was a long time ago. But yes, that was me. And I have no problem +with relicensing it to GPL."* + +### Complete Email Evidence + +``` +Delivered-To: vejeta@gmail.com +Received: by 2002:a05:6214:3189:b0:771:2ea2:b9a5 with SMTP id lb9csp1064900qvb; + Sun, 14 Sep 2025 23:07:41 -0700 (PDT) +X-Received: by 2002:a05:690c:6a87:b0:721:c0d:9dd9 with SMTP id 00721157ae682-7306609c65amr96296677b3.52.1757916461647; + Sun, 14 Sep 2025 23:07:41 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1757916461; cv=none; + d=google.com; s=arc-20240605; + b=jmKNV1niB+TRLg4cEsg6KS2TmlbvGECyvjY13X5HuxpVkqJwaBmVV6f+dwluGbxx1T + GkIz4Bqt6600qu0nbbzdDaqGHZOgf5KiBLy6koGZqxDmJPfR6xszCpsOEAIvU50glSMI + pQ9zKSfMoASQQ2LqktKM+Wrbm/X7Lwz8WlWrSIS9X11ndYHyia5ZZaTJY9cKmpJlg7Gf + 7Dqc/Hy6q3jEH68pBWRhGb/Or0IExwfGgCD6vbvDjnN6HueW6frTa5Brqlcx178/RXFJ + iaYK7/Hhg9PaOo4jFef6p/dStMRyhN54IWDnjx3awNE9dPapZRjzw3yHymurRZsT0tFP + r6lQ== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; + h=to:subject:message-id:date:from:in-reply-to:references:mime-version + :dkim-signature; + bh=+JCYV0wGpX8SKyUGN6Rey2Qzp5qHgnZHagpNto9OweY=; + fh=21tBcJpjA6s6ZIz3rrnEJwEKqE4tqy4BRFXeBxNoNzE=; + b=Rx4NAn61KqmhWSAfoOlbPhju2/PvWUGou7Y3LGfO3fkxcQX6bGuO7BbPnKPMfVJg6w + QNZ0FjUhSSL2bXuIVqKMEnHo+HlXZh/Lll/F15HVF8uue+p3wTfc2JjUDMf4mHugXAtr + 4bfnKJtTBQDzuA33eor/9i7pw9q6XrQz2jWF2ICLcgI0f5hHM2UZKWVnQ4FxJxpZXDU9 + iIk7NYxtvoFf6Fa6mQztftrvw2NmPbPvZh3f8TrXO6665IcW1t1RL91c7oXnH0wvsfcS + MFmU3NCFUBV8gCrVouV4BZGsuUakkWnja5i7bNZI+P+pBvHUBDCdvGxwygx0RshRDezu + zCeQ==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@recordedfuture.com header.s=google header.b=IULv9xlC; + spf=pass (google.com: domain of maf@recordedfuture.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=maf@recordedfuture.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=recordedfuture.com; + dara=pass header.i=@gmail.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id 956f58d0204a3-629d23ab243sor2374253d50.14.2025.09.14.23.07.41 + for + (Google Transport Security); + Sun, 14 Sep 2025 23:07:41 -0700 (PDT) +Received-SPF: pass (google.com: domain of maf@recordedfuture.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@recordedfuture.com header.s=google header.b=IULv9xlC; + spf=pass (google.com: domain of maf@recordedfuture.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=maf@recordedfuture.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=recordedfuture.com; + dara=pass header.i=@gmail.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=recordedfuture.com; s=google; t=1757916461; x=1758521261; dara=google.com; + h=to:subject:message-id:date:from:in-reply-to:references:mime-version + :from:to:cc:subject:date:message-id:reply-to; + bh=+JCYV0wGpX8SKyUGN6Rey2Qzp5qHgnZHagpNto9OweY=; + b=IULv9xlCcYqjs2pFrAxu2GrkqxkV9hXj7AKDUmda+K8znW01PLGSZKsmWNcXYsLh7o + 7mEsMMV848XUO0u0wfS/cj1JHKe/tmuufGyqEJkRaue/btaP91l+XUcydW523bcdqaP1 + pHqC6ROmpF59Pyzr6Cr+4kvPSQ7OzCtco6fiQ= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1757916461; x=1758521261; + h=to:subject:message-id:date:from:in-reply-to:references:mime-version + :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; + bh=+JCYV0wGpX8SKyUGN6Rey2Qzp5qHgnZHagpNto9OweY=; + b=wV9H0rZAZ13r3eIxJC6sUEjAnHVx57S22N0vh9FPGRmMKrIGaUvDp0xPl0oAK80/ik + k9XrVTyalGoybkMPOiY7KNRbbWVbxVFF839DwbPzOLZniHGH7P/eVh0x7yNEryHRtIbe + nuCjLR3CTRySGEmOpFj7haG21SuU3jcXiCeMyrzmK8QRdEFnhFoH7yn7SmZt1QYx/68g + +r2fy6UArA33sc2tM8Vf9uZnsBPc9VU8DoH/L6+EwOY3sBbOQJazM6w46egzYW/nQgyd + 1kHwCR1UcPyGM08PTXbV3sGmfBWYMv6lOe2I0o6n3p/g57vbYH8cDHXJgSFUj4NL1mGq + fpvg== +X-Gm-Message-State: AOJu0YxeLEigEXZPXsOXHqbdIF1p6t1prsTH+RQeVzmNTXbHkejWDO7g 6e9szXI78U4kUyhLM3uFZ/2W/x2C+LqDXu+R6zh/vS10XKaycNLn4f/PbRH4e1Qg2Zn9SLJbI5p /iwtJJ6M16OhwQWTQbbMpOgPKKcDwwGFGRTIQhJXsPQHqc2hJKJSRdWM= +X-Gm-Gg: ASbGncu61X+w51VCht3BNt6nl5dyZYjjN5OtK2s/vle3OOylnkKwT7mPSd3U7S0ZxpC 0cE3A9pXc0HpON7rCoY3upf+Oc91aMZ4OtP6eL6LKQv0QYKQupxJcerGX4/u11vB1MX3AtfC+RF LTln1rDoEkXGEr/eMZTrJCZSEYwes+T1PDSxdyPB2KJEdpGzxqB8ZZ5Xu2O76ngvPcp7Evy9cXy JcmVCM11PGdLOj2Bx0= +X-Google-Smtp-Source: AGHT+IGwD8DnYOX7m7E/6Eq1voDV1H6Rv82BDypfP6ozhLIuOk60SVc9XJmPl2wrAo+2ZfTbLERfdQatoRhEB77LvIs= +X-Received: by 2002:a05:690e:159b:20b0:62b:3ee0:6d07 with SMTP id 956f58d0204a3-62b3ee06ed7mr5164533d50.3.1757916460625; Sun, 14 Sep 2025 23:07:40 -0700 (PDT) +MIME-Version: 1.0 +References: +In-Reply-To: +From: Martin Forssen +Date: Mon, 15 Sep 2025 08:07:29 +0200 +X-Gm-Features: Ac12FXxmtXrXwDFXGs5SqsZZ3PSolUaHHISJz7kR1IPmMdeREAja53_PnM8KoCM +Message-ID: +Subject: Re: Conquer (Unix computer game) relicensing +To: Juan Mendez +Content-Type: multipart/alternative; boundary="0000000000002e4f39063ed0d288" + +--0000000000002e4f39063ed0d288 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Oh, that was a long time ago. But yes, that was me. And I have no problem +with relicensing it to GPL. + + /MaF + +On Sun, Sep 14, 2025 at 12:38=E2=80=AFPM Juan Mendez wro= +te: + +> Hi Martin, I am currently in the process of relicensing Conquer. Do +> you remember that old game? +> +> I am a computer developer from Spain. I was a university student at +> the beginning of the 90s. +> I found your email by looking in +> https://github.com/vejeta/conquer/blob/master/CONQPS.INFO +> +> Looking for the email address, I thought it might belong to you. +> ``` +> d8forma@dtek.chalmers.se (Martin Fors sen) +> ``` +> In case it is you, one of the contributors for the conqps utility, I +> would like to contact you for having relicensing permissions to GPL +> v3, otherwise, I will be removing the old code. Please, contact +> me if you read this. +> +> I started the project of preserving the legacy of Conquer 20 years ago +> by contacting Edward Barlow and Adam Bryant first, and finally, I +> believe it is close to completion. +> +> Wishing you the best, +> +> Juan +> +> -- +> http://vejeta.com +> Fidonet: 2:345/432.2 +> I'm an FSF member -- Help us support software freedom! +> https://my.fsf.org/join?referrer=3D327575 +> +> +> -- +> http://vejeta.com +> Fidonet: 2:345/432.2 +> I'm an FSF member -- Help us support software freedom! +> https://my.fsf.org/join?referrer=3D327575 +> + + +--=20 + +Martin Forss=C3=A9n + +Director of Product Security + +Recorded Future + ++46 760 252357 + +maf@recordedfuture.com + +--0000000000002e4f39063ed0d288 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +
Oh, that was a long time ago. But yes, that was me. A= +nd I have no problem with relicensing it to GPL.

= +=C2=A0 =C2=A0 /MaF

On Sun, Sep 14, 2025 at 12:38= +=E2=80=AFPM Juan Mendez <vejeta@gmai= +l.com> wrote:
Hi Martin, I am currently in the process of relicensing Conquer. Do +you remember that old game?
+
+I am a computer developer from Spain. I was a university student at
+the beginning of the 90s.
+I found your email by looking in
+https://github.com/vejeta/conquer/blob/ma= +ster/CONQPS.INFO
+
+Looking for the email address, I thought it might belong to you.
+```
+d8forma@dtek.= +chalmers.se (Martin Fors sen)
+```
+In case it is you, one of the contributors for the conqps utility, I
+would like to contact you for having relicensing permissions to GPL
+v3, otherwise, I will be removing the old code. Please, contact
+me if you read this.
+
+I started the project of preserving the legacy of Conquer 20 years ago
+by contacting Edward Barlow and Adam Bryant first, and finally, I
+believe it is close to completion.
+
+Wishing you the best,
+
+Juan
+
+--
+http://v= +ejeta.com
+Fidonet: 2:345/432.2
+I'm an FSF member -- Help us support software freedom!
+https://my.fsf.org/join?referrer=3D327575
+
+
+--
+http://v= +ejeta.com
+Fidonet: 2:345/432.2
+I'm an FSF member -- Help us support software freedom!
+https://my.fsf.org/join?referrer=3D327575
+


--

Martin Forss=C3=A9n

Director of Product Security

Recorded Future

+46 760 252357

maf@recordedfuture.com

+ +--0000000000002e4f39063ed0d288-- +``` + + ## Legal Analysis and Validation ### Permission Summary diff --git a/psmap.c b/psmap.c index 2efe3d3..c5a5a3f 100644 --- a/psmap.c +++ b/psmap.c @@ -1,10 +1,13 @@ /* - * psmap.c - Game functionality module - * + * psmap.c - A program to convert conquer-maps to postscript + * * This file is part of Conquer. - * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant - * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors - * + * Originally Copyright (C) 1989 by Martin Forssen (MaF) + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original author + * + * Original author: Martin Forssen (historical) + * Permission granted by: Martin Forssen + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/psmap.h b/psmap.h index 015ed0e..cd44e0a 100644 --- a/psmap.h +++ b/psmap.h @@ -1,9 +1,13 @@ /* - * psmap.h - Header file with definitions and prototypes - * +/* + * psmap.c - Header file for conqps. A program to convert conquer-maps to postscript + * * This file is part of Conquer. - * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant - * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors + * Originally Copyright (C) 1989 by Martin Forssen (MaF) + * Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original author + * + * Original author: Martin Forssen (historical) + * Permission granted by: Martin Forssen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/psmap.ps b/psmap.ps index 90300782d8f87edc9927564cd429f944b374fd7b..8bc38a22f092367b80c934d1b081e6d945e001c1 100644 GIT binary patch delta 1080 zcmZ9L%Wl&^6o&V_0Nb;Plt{sWR-m?2RZY~iLAh9tLzU&kK8^>*GiEM{+>M`yB@e)g zXJXG8H>Rahq{wsm&;Nht%&*a(4^6KJkur9bYF=5Wn6{vDNR|9v8F&M8R>7Vd#{_?1 zmMaOl(lDlNhx%2oM?XjkZXo9Zf&M#%TBMv3I&MbZl(t?Q+ zwFwMfL7!+?Qcam?BScRXcbZ8{wzl;@!KRCRS+e|EW2$t9S?;XU7^JGadd|4giX=*p zIoF6_RBjJU;|0{pK}uXSW>j7Ct+Uh(3ruDs>Q|{Up4T2Itvy1q1%gH0l*aelf88$D zaElT(6A-zr;AsaE81>b!n4)#>h5U_)H?caJpyrWsJ0n9tVol`t1jVC1?P?r5GlZ5j z^jTxQcMYoY!!;noH3&w=y1RaWe7$zao&k8unE_3Xw^OK!G8N4Flm{*ZY!RHn+=-!= zASiG@P41TK1j5Az?!!24!bP(A*v^KcZQRrJc`aU6f>T(+>zh_n0537WiN|+zCHyp< zO_L49fXOsj+^kkGS;i1T6voMPyq<+IMC&+Ou5JQ=6=5P#FYpp_^Ng~8S*6kl8O<>l zri;Fz=9)q|kwL-sNKHu@}Ps+Y96H4wL-+=Y+^@wsr_NF;VWrtwM h=4D}RWiCde!{HF@qzjbZjc647dorV|;HO%={tN6!Y={5= delta 137 zcmWlPp$-Bu5CsjYKY)Fv_HckABqV4AKTz6j+FaW`x{Kzc(0mr2UNUAf^V@%SZ) Date: Mon, 15 Sep 2025 16:28:06 +0200 Subject: [PATCH 10/17] Update LICENSE.md to include MaF contributions --- LICENSE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 899d397..1f97d08 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -5,7 +5,8 @@ This software is licensed under the **GNU General Public License v3.0 or later** (GPL-3.0-or-later). **Copyright (C) 1987-1988 Ed Barlow and Adam Bryant** -**Copyright (C) 2006-present Vejeta (GPL relicensing and maintenance)** +**Copyright (C) 1989 Martin Forssen (MaF) - PostScript utilities** +**Copyright (C) 2006-present Vejeta (GPL relicensing and maintenance)** See the full text of the GPL-3.0 license in the file `GPL-3.0.txt` included with this distribution, or visit: https://www.gnu.org/licenses/gpl-3.0.html From ecc540b6e08e3be5d9a0b2d9d6bf040fafab7f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Wed, 17 Sep 2025 12:22:39 +0200 Subject: [PATCH 11/17] Make it compilable in GNU/Linux. (#4) * Make it compilable in GNU/Linux. LOGIN define statement will now be the current user_id from the shell and obtained in the Makefile * Increase NTOTAL nations from 25 to 35 so there is capacity for everyone --- Makefile | 174 ++++++++++++++++++++----------------------------------- admin.c | 12 ++-- forms.c | 2 +- header.h | 10 ++-- main.c | 4 +- 5 files changed, 80 insertions(+), 122 deletions(-) diff --git a/Makefile b/Makefile index 672e301..b891f9f 100644 --- a/Makefile +++ b/Makefile @@ -19,16 +19,17 @@ # along with this program. If not, see . MAKE = /usr/bin/make -CC = /usr/bin/gcc +CC = /usr/bin/gcc RM = /bin/rm -f # LN must be "ln -s" if source and default directories span disks -LN = /bin/ln -s +LN = /bin/ln -sf CP = /bin/cp NULL = 2>/dev/null # Flags to lint -LTFLG = -h -lcurses +LTFLG = -h -lcurse + # Options for the postscript map printing program. # The file 'conqps.ps' will be installed in the EXEDIR @@ -65,9 +66,12 @@ SHARFLG = -D -c -l$(SHARLIM) -o$(SHARNAM) # of conquer. [not distributed with conquer V4] #GETOPT = getopt.o +# +# libraries for Linux systems: +LIBRARIES = -lncurses -lcrypt # # libraries for BSD systems: -LIBRARIES = -lcurses -ltermcap +#LIBRARIES = -lcurses -ltermcap -lcrypt # # libraries for SYSV systems: #LIBRARIES = -lcurses @@ -77,10 +81,11 @@ LIBRARIES = -lcurses -ltermcap # CURRENT is this directory. The directory where the source # and Makefile are located + CURRENT = $(HOME)/conquer/src -# DEFAULT is the directory where default nations & help files will be -# stored. It is also the default directory = where players will play +# DEFAULT is the directory where default nations & help files will be +# stored. It is also the default directory = where players will play # if they do not use the -d option. DEFAULT = $(HOME)/conquer/lib @@ -91,7 +96,11 @@ EXEDIR = $(HOME)/conquer/bin CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\" # Options flag used for normal compilation -OPTFLG = -O +#OPTFLG = -O # Old flags 1989 +OPTFLG = -g -fno-strict-aliasing -fwrapv -Wall -Wextra -O2 # Modern flags 2025 +## Insert current user as LOGIN definition. LOGIN is used in header.h +OPTFLG += -DLOGIN=\"$(shell whoami)\" + # Options flag used for debugging purposes # [make sure to comment out 'strip' commands in install section] @@ -185,33 +194,33 @@ clean: $(RM) *.o lint[ag] conquer.doc $(NULL) in$(GAME): $(GAME) + -mkdir -p $(EXEDIR) $(NULL) -$(RM) $(EXEDIR)/$(GAME) mv $(GAME) $(EXEDIR) chmod 4751 $(EXEDIR)/$(GAME) - touch $(GAME) touch in$(GAME) in$(ADMIN): $(ADMIN) + -mkdir -p $(EXEDIR) $(NULL) -$(RM) $(EXEDIR)/$(ADMIN) mv $(ADMIN) $(EXEDIR) chmod 4751 $(EXEDIR)/$(ADMIN) - touch $(ADMIN) touch in$(ADMIN) in$(SORT): $(SORT) + -mkdir -p $(EXEDIR) $(NULL) -$(RM) $(EXEDIR)/$(SORT) mv $(SORT) $(EXEDIR) chmod 751 $(EXEDIR)/$(SORT) - touch $(SORT) touch in$(SORT) in$(PSPROG): $(PSPROG) + -mkdir -p $(EXEDIR) $(NULL) -$(RM) $(EXEDIR)/$(PSPROG) mv $(PSPROG) $(EXEDIR) $(CP) $(PSDATA) $(EXEDIR) chmod 751 $(EXEDIR)/$(PSPROG) chmod 644 $(EXEDIR)/$(PSDATA) - touch $(PSPROG) touch in$(PSPROG) install: in$(GAME) in$(ADMIN) in$(SORT) in$(PSPROG) insthelp instman @@ -239,22 +248,18 @@ new_game: all insthelp insthelp: helpfile @echo Installing helpfiles - -$(RM) $(DEFAULT)/$(HELPOUT)0 - -$(LN) $(CURRENT)/$(HELPOUT)0 $(DEFAULT)/$(HELPOUT)0 - -$(RM) $(DEFAULT)/$(HELPOUT)1 - -$(LN) $(CURRENT)/$(HELPOUT)1 $(DEFAULT)/$(HELPOUT)1 - -$(RM) $(DEFAULT)/$(HELPOUT)2 - -$(LN) $(CURRENT)/$(HELPOUT)2 $(DEFAULT)/$(HELPOUT)2 - -$(RM) $(DEFAULT)/$(HELPOUT)3 - -$(LN) $(CURRENT)/$(HELPOUT)3 $(DEFAULT)/$(HELPOUT)3 - -$(RM) $(DEFAULT)/$(HELPOUT)4 - -$(LN) $(CURRENT)/$(HELPOUT)4 $(DEFAULT)/$(HELPOUT)4 - -$(RM) $(DEFAULT)/$(HELPOUT)5 - -$(LN) $(CURRENT)/$(HELPOUT)5 $(DEFAULT)/$(HELPOUT)5 + -mkdir -p $(DEFAULT) $(NULL) + $(CP) $(HELPOUT)0 $(DEFAULT)/$(HELPOUT)0 + $(CP) $(HELPOUT)1 $(DEFAULT)/$(HELPOUT)1 + $(CP) $(HELPOUT)2 $(DEFAULT)/$(HELPOUT)2 + $(CP) $(HELPOUT)3 $(DEFAULT)/$(HELPOUT)3 + $(CP) $(HELPOUT)4 $(DEFAULT)/$(HELPOUT)4 + $(CP) $(HELPOUT)5 $(DEFAULT)/$(HELPOUT)5 touch insthelp instman: @echo Installing man pages + -mkdir -p $(EXEDIR) $(NULL) $(CP) man.pag $(EXEDIR) helpfile: $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5 @@ -294,7 +299,6 @@ $(HELPSCR).2: newhelp newhelp: dataG.o newhelp.o $(CC) $(OPTFLG) dataG.o newhelp.o -o newhelp strip newhelp - # # postscript map program PSOPTS = -DPSFILE=\"$(EXEDIR)/$(PSDATA)\" -D$(PSPAGE) @@ -317,98 +321,44 @@ cpio: -$(RM) core find . -name '*[CrpsEech]' -print | cpio -ocBv > cpiosv -shar: +shar: echo " lines words chars FILENAME" > MANIFEST wc $(ALLFILS) >> MANIFEST $(SHAR) $(SHARFLG) $(ALLFILS) MANIFEST -.c.o: $< +.cA.o: $< + ( trap "" 0 1 2 3 4 ; $(LN) $*.c $*A.c ;\ + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c $*A.c ;\ + $(RM) $*A.c ) + +.cG.o: $< + ( trap "" 0 1 2 3 4 ; $(LN) $*.c $*G.c ;\ + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c $*G.c ;\ + $(RM) $*G.c ) + +.c.o: $< +# compiles using both defines since they +# are needed for the data.h definitions for +# each file... but should not be needed for +# the actual C source file being compiled $(CC) $(OPTFLG) $(CDEFS) -DADMIN -DCONQUER -c $*.c -# Explicit rules for ADMIN objects - -cexecuteA.o: cexecute.c - $(RM) cexecuteA.c - $(LN) cexecute.c cexecuteA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c cexecuteA.c -o cexecuteA.o - $(RM) cexecuteA.c - -ioA.o: io.c - $(RM) ioA.c - $(LN) io.c ioA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c ioA.c -o ioA.o - $(RM) ioA.c - -miscA.o: misc.c - $(RM) miscA.c - $(LN) misc.c miscA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c miscA.c -o miscA.o - $(RM) miscA.c - -navyA.o: navy.c - $(RM) navyA.c - $(LN) navy.c navyA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c navyA.c -o navyA.o - $(RM) navyA.c - -magicA.o: magic.c - $(RM) magicA.c - $(LN) magic.c magicA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c magicA.c -o magicA.o - $(RM) magicA.c - -dataA.o: data.c - $(RM) dataA.c - $(LN) data.c dataA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c dataA.c -o dataA.o - $(RM) dataA.c - -tradeA.o: trade.c - $(RM) tradeA.c - $(LN) trade.c tradeA.c - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c tradeA.c -o tradeA.o - $(RM) tradeA.c - -# Explicit rules for GAME objects -cexecuteG.o: cexecute.c - $(RM) cexecuteG.c - $(LN) cexecute.c cexecuteG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c cexecuteG.c -o cexecuteG.o - $(RM) cexecuteG.c - -ioG.o: io.c - $(RM) ioG.c - $(LN) io.c ioG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c ioG.c -o ioG.o - $(RM) ioG.c - -miscG.o: misc.c - $(RM) miscG.c - $(LN) misc.c miscG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c miscG.c -o miscG.o - $(RM) miscG.c - -navyG.o: navy.c - $(RM) navyG.c - $(LN) navy.c navyG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c navyG.c -o navyG.o - $(RM) navyG.c - -magicG.o: magic.c - $(RM) magicG.c - $(LN) magic.c magicG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c magicG.c -o magicG.o - $(RM) magicG.c - -dataG.o: data.c - $(RM) dataG.c - $(LN) data.c dataG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c dataG.c -o dataG.o - $(RM) dataG.c - -tradeG.o: trade.c - $(RM) tradeG.c - $(LN) trade.c tradeG.c - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c tradeG.c -o tradeG.o - $(RM) tradeG.c +$(GOBJS): data.h header.h + +$(AOBJS): data.h header.h + +ioG.o: data.h header.h patchlevel.h io.c + +ioA.o: data.h header.h patchlevel.h io.c + +newlogin.o: data.h header.h newlogin.h patchlevel.h newlogin.c + +main.o: data.h header.h patchlevel.h main.c + +newhelp.o: data.h header.h patchlevel.h newhelp.c + +# Clear suffixes +.SUFFIXES: +# Suffixes for conquer files. +.SUFFIXES: A.o G.o .c .h .o diff --git a/admin.c b/admin.c index 1353e07..dfe540c 100644 --- a/admin.c +++ b/admin.c @@ -53,9 +53,13 @@ short dismode=2; /* nation id of owner*/ short country=0; struct s_nation *curntn; -extern char datadir[]; -char scenario[256]; -//char defaultdir[256]; + +/* External declaration for datadir which is defined in makeworl.c */ +extern char datadir[FILELTH]; + +/* Note: scenario is already declared in data.h when ADMIN is defined */ +/* char scenario[256]; -- REMOVED to avoid conflict */ + #ifdef REMAKE int remake=FALSE; #endif /*REMAKE*/ @@ -668,4 +672,4 @@ att_bonus() else curntn->terror = MAXTGVAL; } } -} +} \ No newline at end of file diff --git a/forms.c b/forms.c index 2719f6a..c0cd85a 100644 --- a/forms.c +++ b/forms.c @@ -500,7 +500,7 @@ change() #ifdef OGOD if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-33,"HIT 8 TO DESTROY, 9 TO CHANGE COMMODITY OR '0' TO CHANGE DEMI-GOD"); -#else OGOD +#else if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-24,"HIT 8 TO DESTROY NATION, OR '0' TO CHANGE DEMI-GOD"); #endif /* OGOD */ else mvaddstr(LINES-3,COLS/2-14,"HIT ANY OTHER KEY TO CONTINUE"); diff --git a/header.h b/header.h index 6b64af1..434e0be 100644 --- a/header.h +++ b/header.h @@ -20,8 +20,10 @@ */ /* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS --- */ -#define OWNER "Adam Bryant" /* administrators name */ -#define LOGIN "adb" /* administrators login id. IMPORTANT! */ +#define OWNER "God" /* administrators name */ +#ifndef LOGIN +#define LOGIN "defaultuser" /* administrators login id. IMPORTANT! */ +#endif /* only this UID may update. */ /* #define SYSV /* uncomment this line on a UNIX SYSV machine */ #define BSD /* uncomment this line on a BSD machine */ @@ -38,7 +40,7 @@ /* this is needed on NFS remote file systems */ #define TIMELOG /* if your system has the date command */ -#define NTOTAL 25 /* max # of nations ( player + npc + monster ) */ +#define NTOTAL 35 /* max # of nations ( player + npc + monster ) */ #define MAXPTS 65 /* points for players to buy stuff with at start*/ #define MAXARM 50 /* maximum number of armies per nation */ #define MAXNAVY 10 /* maximum number of fleets per nation */ @@ -57,7 +59,7 @@ /* this allows demi-gods the ability to remake */ /* their world. */ #define NOSCORE /* only show full scores to god while in game */ -/* #define CHECKUSER */ /* only allow owner of nation to play it */ +#define CHECKUSER /* only allow owner of nation to play it */ #define REVSPACE 5 /* allow for this many revolts in nation list */ #define LASTADD 5 /* last turn players may w/out password */ #define USERLOG /* log users who play a nation */ diff --git a/main.c b/main.c index a99ef33..01500e5 100644 --- a/main.c +++ b/main.c @@ -305,7 +305,9 @@ char **argv; if (pflag != FALSE) fprintf(stderr,"Display map for what nation: "); else fprintf(stderr,"What nation would you like to be: "); - gets(name); + if (fgets(name, NAMELTH+1, stdin) != NULL) { + name[strcspn(name, "\n")] = '\0'; + } } #ifdef OGOD if(strcmp(name,"god")==0 || strcmp(name,"unowned")==0) { From e15abecb608b7328fbf196ea14c253af51c4d55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Wed, 17 Sep 2025 15:30:21 +0200 Subject: [PATCH 12/17] Modernization (#5) * Increase NTOTAL nations from 25 to 35 so there is capacity for everyone * Modernization of Makefile, header.c, main.c * Mark this release as 4.12, updating the copyrights in copyscreen and credits to highlight this is a GPL v3 version --- Makefile | 734 ++++++++++++++++-------------- header.h | 530 ++++++++++++++------- oMakefile => historical/oMakefile | 0 main.c | 86 ++-- notes.v4 | 6 +- patchlevel.h | 2 +- 6 files changed, 827 insertions(+), 531 deletions(-) rename oMakefile => historical/oMakefile (100%) diff --git a/Makefile b/Makefile index b891f9f..a481794 100644 --- a/Makefile +++ b/Makefile @@ -1,364 +1,428 @@ -# -# Makefile - Build configuration and compilation rules -# -# This file is part of Conquer. -# Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant -# Copyright (C) 2025 Juan Manuel Méndez Rey (Vejeta) - Licensed under GPL v3 with permission from original authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -MAKE = /usr/bin/make -CC = /usr/bin/gcc -RM = /bin/rm -f - -# LN must be "ln -s" if source and default directories span disks -LN = /bin/ln -sf -CP = /bin/cp -NULL = 2>/dev/null - -# Flags to lint -LTFLG = -h -lcurse - - -# Options for the postscript map printing program. -# The file 'conqps.ps' will be installed in the EXEDIR -# directory which is determined below. -# -# To avoid building this program, remove $(PSPROG) from -# both the 'all:' list and the 'install:' list -PSPROG = conqps -PSSRC = psmap.c -PSHEAD = psmap.h -PSDATA = psmap.ps -# Default Pagesize Setting: -# A4 for European page size. -# LETTER for American page size. -# OTHER for Local page size. [edit conqps.h] -PSPAGE = LETTER - -# Options for shar program, SHARLIM is limit of each shar -# file created in kilobytes and SHARNAM is the prefix for -# SHARFILE name. -# [This is for a public domain shar from USENET, I can send -# copies if you wish - adb@bu-cs.bu.edu] -SHAR = /usr/bin/shar -SHARLIM = 50 -SHARNAM = shar. -SHARFLG = -D -c -l$(SHARLIM) -o$(SHARNAM) - -# This should be installed by whomever you want to own the game. -# I recommend "games" or "root". - -# uncomment the next line if you dont have getopt in your library -# (eg you are on a pc, or a non unix system). getopt.c is a -# public domain software, and has not been tested by the authors -# of conquer. [not distributed with conquer V4] -#GETOPT = getopt.o - -# -# libraries for Linux systems: -LIBRARIES = -lncurses -lcrypt -# -# libraries for BSD systems: -#LIBRARIES = -lcurses -ltermcap -lcrypt -# -# libraries for SYSV systems: -#LIBRARIES = -lcurses -# -# libraries for Xenix systems: -#LIBRARIES = -ltermlib -ltcap -lcrypt - -# CURRENT is this directory. The directory where the source -# and Makefile are located - -CURRENT = $(HOME)/conquer/src - -# DEFAULT is the directory where default nations & help files will be -# stored. It is also the default directory = where players will play -# if they do not use the -d option. -DEFAULT = $(HOME)/conquer/lib - -# This directory is where the executables will be stored -EXEDIR = $(HOME)/conquer/bin - -# Definitions used for compiling conquer -CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\" - -# Options flag used for normal compilation -#OPTFLG = -O # Old flags 1989 -OPTFLG = -g -fno-strict-aliasing -fwrapv -Wall -Wextra -O2 # Modern flags 2025 -## Insert current user as LOGIN definition. LOGIN is used in header.h -OPTFLG += -DLOGIN=\"$(shell whoami)\" - - -# Options flag used for debugging purposes -# [make sure to comment out 'strip' commands in install section] -#OPTFLG = -DDEBUG -g - -# this is the name of the user executable -# the user executable contains commands for the games players -GAME = conquer -# this is the name of the administrative executable -# the administrative executable contains commands for the game super user -ADMIN = conqrun -# this is the name of the sorting program which conquer uses -SORT = conqsort - -# GAME IDENTIFICATION -# -# Set this to some unique identifier for each game you wish -# to create via 'make new_game'. It will make a subdirectory -# $(GAMEID) to the DEFAULT data directory where it will store -# data for the new game. [Leave it blank to create the default -# game] -GAMEID = - -# AFILS are files needed for game updating... +# Modernized Makefile for Conquer Game +# Based on the original 1988-1989 Makefile by Edward M. Barlow and Adam Bryant +# Copyright (C) 2025 Juan Manuel Méndez Rey (vejeta) - Licensed under GPL v3 + +# ============================================================================= +# PROJECT CONFIGURATION +# ============================================================================= + +PACKAGE_NAME = conquer +VERSION = 4 +PATCHLEVEL = 12 + +# Main targets +TARGET_GAME = conquer +TARGET_ADMIN = conqrun +TARGET_SORT = conqsort +TARGET_PS = conqps + +# ============================================================================= +# PLATFORM AND TOOL DETECTION +# ============================================================================= + +UNAME_S := $(shell uname -s 2>/dev/null || echo Unknown) +UNAME_M := $(shell uname -m 2>/dev/null || echo Unknown) + +# Modern tool detection (use PATH instead of hardcoded paths) +CC := $(shell command -v gcc 2>/dev/null || command -v clang 2>/dev/null || command -v cc 2>/dev/null || echo gcc) +MAKE := $(shell command -v make 2>/dev/null || echo make) +RM = rm -f +LN = ln -sf +CP = cp +MKDIR_P = mkdir -p +STRIP = strip +NULL = 2>/dev/null + +# ============================================================================= +# BUILD CONFIGURATION +# ============================================================================= + +BUILD_TYPE ?= release +PREFIX ?= $(HOME)/conquer +CURRENT = $(PWD) +DEFAULT = $(PREFIX)/lib +EXEDIR = $(PREFIX)/bin + +# ============================================================================= +# COMPILER AND LIBRARY DETECTION +# ============================================================================= + +# Base compiler definitions +CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\" +CDEFS += -DVERSION=\"$(VERSION)\" -DPATCHLEVEL=\"$(PATCHLEVEL)\" +CDEFS += -DLOGIN=\"$(shell whoami)\" + +# Platform-specific library detection +ifeq ($(UNAME_S),Linux) + # Try pkg-config first, fallback to manual detection + NCURSES_LIBS := $(shell pkg-config --libs ncurses 2>/dev/null || echo "-lncurses") + NCURSES_CFLAGS := $(shell pkg-config --cflags ncurses 2>/dev/null) + LIBRARIES = $(NCURSES_LIBS) -lcrypt + LTFLG = -h $(NCURSES_LIBS) +else ifeq ($(UNAME_S),Darwin) + # macOS + NCURSES_LIBS := $(shell pkg-config --libs ncurses 2>/dev/null || echo "-lncurses") + NCURSES_CFLAGS := $(shell pkg-config --cflags ncurses 2>/dev/null) + LIBRARIES = $(NCURSES_LIBS) + LTFLG = -h $(NCURSES_LIBS) +else + # BSD and other Unix-like systems + LIBRARIES = -lcurses -ltermcap + LTFLG = -h -lcurses +endif + +# Build type specific flags +ifeq ($(BUILD_TYPE),debug) + OPTFLG = -DDEBUG -g3 -O0 -fno-omit-frame-pointer -Wall -Wextra -Wpedantic + DO_STRIP = false +else + OPTFLG = -g -fno-strict-aliasing -fwrapv -Wall -Wextra -O2 + DO_STRIP = true +endif + +# Add ncurses flags if detected +ifneq ($(NCURSES_CFLAGS),) + OPTFLG += $(NCURSES_CFLAGS) +endif + +# ============================================================================= +# SOURCE FILES AND OBJECTS +# ============================================================================= + +# PostScript program configuration +PSPROG = $(TARGET_PS) +PSSRC = psmap.c +PSHEAD = psmap.h +PSDATA = psmap.ps +PSPAGE = LETTER +PSOPTS = -DPSFILE=\"$(EXEDIR)/$(PSDATA)\" -D$(PSPAGE) + +# Administrative executable sources (includes combat.c) AFILS = combat.c cexecute.c io.c admin.c makeworl.c navy.c spew.c \ -newlogin.c update.c magic.c npc.c misc.c randeven.c data.c trade.c check.c -AOBJS = combat.o cexecuteA.o ioA.o admin.o makeworl.o navyA.o spew.o \ -newlogin.o update.o magicA.o npc.o miscA.o randeven.o dataA.o \ -tradeA.o $(GETOPT) check.o + newlogin.c update.c magic.c npc.c misc.c randeven.c data.c trade.c check.c -# GFILS are files needed to run a normal interactive game +# Game executable sources (does NOT include combat.c) GFILS = commands.c cexecute.c forms.c io.c main.c move.c navy.c \ -magic.c misc.c reports.c data.c display.c extcmds.c trade.c check.c + magic.c misc.c reports.c data.c display.c extcmds.c trade.c check.c + +# Object files - using the traditional naming scheme that works +AOBJS = combat.o cexecuteA.o ioA.o admin.o makeworl.o navyA.o spew.o \ + newlogin.o update.o magicA.o npc.o miscA.o randeven.o dataA.o \ + tradeA.o check.o + GOBJS = commands.o cexecuteG.o forms.o ioG.o main.o move.o navyG.o \ -magicG.o miscG.o reports.o dataG.o display.o extcmds.o tradeG.o \ -$(GETOPT) check.o + magicG.o miscG.o reports.o dataG.o display.o extcmds.o tradeG.o \ + check.o -# List of temporary C files +# Temporary files created during build DAFILS = cexecuteA.c ioA.c miscA.c navyA.c magicA.c dataA.c tradeA.c DGFILS = cexecuteG.c ioG.c miscG.c navyG.c magicG.c dataG.c tradeG.c -#txt[0-4] are input help files. help[0-4] are output. HELPSCR is sed script. -HELP=txt -HELPOUT=help -HELPSCR=sed - -HEADERS=header.h data.h newlogin.h patchlevel.h -SUPT1=nations Makefile $(HELP)[0-5] README run man.pag rules -SUPT2=execute messages news commerce CONQPS.INFO -ALLFILS=$(SUPT1) $(HEADERS) $(AFILS) commands.c forms.c main.c move.c \ -reports.c display.c extcmds.c newhelp.c sort.c getopt.c \ -$(PSSRC) $(PSHEAD) $(PSDATA) - -all: $(ADMIN) $(GAME) $(SORT) $(PSPROG) helpfile - @echo YAY! make new_game to set up permissions, zero appropriate - @echo initial files, move $(GAME) and $(ADMIN) to - @echo $(EXEDIR), and set up the world. - @echo If a game is in progress, make install will just move $(GAME) - @echo and $(ADMIN) to $(EXEDIR). - @echo - -$(ADMIN): $(AOBJS) - @echo phew... +# Help files +HELP = txt +HELPOUT = help +HELPSCR = sed + +# Headers and support files +HEADERS = header.h data.h newlogin.h patchlevel.h +SUPT1 = nations Makefile $(HELP)[0-5] README run man.pag rules +SUPT2 = execute messages news commerce CONQPS.INFO +ALLFILS = $(SUPT1) $(HEADERS) $(AFILS) commands.c forms.c main.c move.c \ + reports.c display.c extcmds.c newhelp.c sort.c $(PSSRC) $(PSHEAD) $(PSDATA) + +# ============================================================================= +# BUILD TARGETS +# ============================================================================= + +.PHONY: all clean clobber install new_game debug release help config check lint + +# Default target +all: $(TARGET_ADMIN) $(TARGET_GAME) $(TARGET_SORT) $(PSPROG) helpfile + @echo "✓ Build complete for $(UNAME_S) ($(UNAME_M))" + @echo "Run 'make new_game' to set up a new game world" + @echo "Run 'make install' to install existing game" + +# Administrative executable +$(TARGET_ADMIN): $(AOBJS) + @echo "=== Linking administrative executable..." -$(RM) $(DAFILS) $(NULL) - @echo if the next command does not work you might also need -ltermcap - @echo === compiling administrative functions - $(CC) $(OPTFLG) $(CDEFS) -o $(ADMIN) $(AOBJS) $(LIBRARIES) -# comment out the next line during debugging - strip $(ADMIN) - -$(GAME): $(GOBJS) - @echo phew... + $(CC) $(OPTFLG) $(CDEFS) -o $@ $(AOBJS) $(LIBRARIES) +ifeq ($(DO_STRIP),true) + $(STRIP) $@ +endif + +# Game executable +$(TARGET_GAME): $(GOBJS) + @echo "=== Linking game executable..." -$(RM) $(DGFILS) $(NULL) - @echo if the next command does not work you might also need -ltermcap - @echo === compiling user interface - $(CC) $(OPTFLG) -o $(GAME) $(GOBJS) $(LIBRARIES) -# comment out the next line during debugging - strip $(GAME) - -$(SORT): sort.c - $(CC) $(OPTFLG) -o $(SORT) sort.c -# comment out the next line if debugging - strip $(SORT) - -clobber: - -$(RM) *.o $(HELPOUT)[0-5] $(PSPROG) $(SORT) insthelp helpfile $(NULL) - -$(RM) newhelp in$(GAME) in$(SORT) in$(ADMIN) in$(PSPROG) $(NULL) - -$(RM) $(HELPSCR).[12] lint[ag] conquer.doc $(GAME) $(ADMIN) $(NULL) - -clean: - $(RM) *.o lint[ag] conquer.doc $(NULL) - -in$(GAME): $(GAME) - -mkdir -p $(EXEDIR) $(NULL) - -$(RM) $(EXEDIR)/$(GAME) - mv $(GAME) $(EXEDIR) - chmod 4751 $(EXEDIR)/$(GAME) - touch in$(GAME) - -in$(ADMIN): $(ADMIN) - -mkdir -p $(EXEDIR) $(NULL) - -$(RM) $(EXEDIR)/$(ADMIN) - mv $(ADMIN) $(EXEDIR) - chmod 4751 $(EXEDIR)/$(ADMIN) - touch in$(ADMIN) - -in$(SORT): $(SORT) - -mkdir -p $(EXEDIR) $(NULL) - -$(RM) $(EXEDIR)/$(SORT) - mv $(SORT) $(EXEDIR) - chmod 751 $(EXEDIR)/$(SORT) - touch in$(SORT) - -in$(PSPROG): $(PSPROG) - -mkdir -p $(EXEDIR) $(NULL) + $(CC) $(OPTFLG) -o $@ $(GOBJS) $(LIBRARIES) +ifeq ($(DO_STRIP),true) + $(STRIP) $@ +endif + +# Sort utility +$(TARGET_SORT): sort.c + $(CC) $(OPTFLG) -o $@ sort.c +ifeq ($(DO_STRIP),true) + $(STRIP) $@ +endif + +# PostScript map program +$(PSPROG): $(PSSRC) $(PSDATA) $(PSHEAD) + $(CC) $(OPTFLG) $(PSOPTS) $(PSSRC) -o $@ +ifeq ($(DO_STRIP),true) + $(STRIP) $@ +endif + +# ============================================================================= +# COMPILATION RULES +# ============================================================================= + +# Clear default suffixes and define our own +.SUFFIXES: +.SUFFIXES: A.o G.o .c .h .o + +# Generic compilation rule for files that don't need special treatment +.c.o: + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -DCONQUER -c $< + +# Admin-specific compilation (creates temporary symlinks) +.cA.o: + @trap "" 0 1 2 3 4; \ + $(LN) $*.c $*A.c; \ + $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c $*A.c -o $@; \ + $(RM) $*A.c + +# Game-specific compilation (creates temporary symlinks) +.cG.o: + @trap "" 0 1 2 3 4; \ + $(LN) $*.c $*G.c; \ + $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c $*G.c -o $@; \ + $(RM) $*G.c + +# ============================================================================= +# HELP FILE GENERATION +# ============================================================================= + +helpfile: $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5 + @echo "✓ Help files built" + @touch helpfile + +$(HELPOUT)0: $(HELP)0 $(HELPSCR).1 $(HELPSCR).2 + @echo "Building $(HELPOUT)0..." + @cat $(HELP)0 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $@ + +$(HELPOUT)1: $(HELP)1 $(HELPSCR).1 $(HELPSCR).2 + @echo "Building $(HELPOUT)1..." + @cat $(HELP)1 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $@ + +$(HELPOUT)2: $(HELP)2 $(HELPSCR).1 $(HELPSCR).2 + @echo "Building $(HELPOUT)2..." + @cat $(HELP)2 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $@ + +$(HELPOUT)3: $(HELP)3 $(HELPSCR).1 $(HELPSCR).2 + @echo "Building $(HELPOUT)3..." + @cat $(HELP)3 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $@ + +$(HELPOUT)4: $(HELP)4 $(HELPSCR).1 $(HELPSCR).2 + @echo "Building $(HELPOUT)4..." + @cat $(HELP)4 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $@ + +$(HELPOUT)5: $(HELP)5 $(HELPSCR).1 $(HELPSCR).2 + @echo "Building $(HELPOUT)5..." + @cat $(HELP)5 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $@ + +$(HELPSCR).1 $(HELPSCR).2: newhelp + @./newhelp + +newhelp: dataG.o newhelp.o + $(CC) $(OPTFLG) dataG.o newhelp.o -o $@ +ifeq ($(DO_STRIP),true) + $(STRIP) $@ +endif + +# ============================================================================= +# INSTALLATION TARGETS +# ============================================================================= + +# Individual installation targets +in$(TARGET_GAME): $(TARGET_GAME) + @echo "Installing game executable..." + @$(MKDIR_P) $(EXEDIR) $(NULL) + -$(RM) $(EXEDIR)/$(TARGET_GAME) + @mv $(TARGET_GAME) $(EXEDIR) + @chmod 4751 $(EXEDIR)/$(TARGET_GAME) + @touch in$(TARGET_GAME) + +in$(TARGET_ADMIN): $(TARGET_ADMIN) + @echo "Installing admin executable..." + @$(MKDIR_P) $(EXEDIR) $(NULL) + -$(RM) $(EXEDIR)/$(TARGET_ADMIN) + @mv $(TARGET_ADMIN) $(EXEDIR) + @chmod 4751 $(EXEDIR)/$(TARGET_ADMIN) + @touch in$(TARGET_ADMIN) + +in$(TARGET_SORT): $(TARGET_SORT) + @echo "Installing sort utility..." + @$(MKDIR_P) $(EXEDIR) $(NULL) + -$(RM) $(EXEDIR)/$(TARGET_SORT) + @mv $(TARGET_SORT) $(EXEDIR) + @chmod 751 $(EXEDIR)/$(TARGET_SORT) + @touch in$(TARGET_SORT) + +in$(PSPROG): $(PSPROG) + @echo "Installing PostScript utility..." + @$(MKDIR_P) $(EXEDIR) $(NULL) -$(RM) $(EXEDIR)/$(PSPROG) - mv $(PSPROG) $(EXEDIR) - $(CP) $(PSDATA) $(EXEDIR) - chmod 751 $(EXEDIR)/$(PSPROG) - chmod 644 $(EXEDIR)/$(PSDATA) - touch in$(PSPROG) - -install: in$(GAME) in$(ADMIN) in$(SORT) in$(PSPROG) insthelp instman - @echo "" - @echo "Installation complete" - -new_game: all insthelp - @echo Installing new game - -mkdir -p $(EXEDIR) $(NULL) - -mkdir -p $(DEFAULT) $(NULL) - -mkdir -p $(DEFAULT)/$(GAMEID) $(NULL) - chmod 755 $(EXEDIR) - chmod 750 $(DEFAULT)/$(GAMEID) $(DEFAULT) - $(CP) $(GAME) $(ADMIN) $(SORT) $(PSPROG) $(PSDATA) $(EXEDIR) - chmod 4755 $(EXEDIR)/$(GAME) $(EXEDIR)/$(ADMIN) - chmod 0755 $(EXEDIR)/$(SORT) $(EXEDIR)/$(PSPROG) - chmod 0644 $(EXEDIR)/$(PSDATA) - chmod 0600 nations - chmod 0700 run - $(CP) nations rules $(DEFAULT)/$(GAMEID) - $(CP) nations rules $(DEFAULT) - @echo now making the world - $(EXEDIR)/$(ADMIN) -d "$(GAMEID)" -m - $(EXEDIR)/$(ADMIN) -d "$(GAMEID)" -a - -insthelp: helpfile - @echo Installing helpfiles - -mkdir -p $(DEFAULT) $(NULL) - $(CP) $(HELPOUT)0 $(DEFAULT)/$(HELPOUT)0 - $(CP) $(HELPOUT)1 $(DEFAULT)/$(HELPOUT)1 - $(CP) $(HELPOUT)2 $(DEFAULT)/$(HELPOUT)2 - $(CP) $(HELPOUT)3 $(DEFAULT)/$(HELPOUT)3 - $(CP) $(HELPOUT)4 $(DEFAULT)/$(HELPOUT)4 - $(CP) $(HELPOUT)5 $(DEFAULT)/$(HELPOUT)5 - touch insthelp + @mv $(PSPROG) $(EXEDIR) + @$(CP) $(PSDATA) $(EXEDIR) + @chmod 751 $(EXEDIR)/$(PSPROG) + @chmod 644 $(EXEDIR)/$(PSDATA) + @touch in$(PSPROG) + +insthelp: helpfile + @echo "Installing help files..." + @$(MKDIR_P) $(DEFAULT) $(NULL) + @$(CP) $(HELPOUT)0 $(DEFAULT)/$(HELPOUT)0 + @$(CP) $(HELPOUT)1 $(DEFAULT)/$(HELPOUT)1 + @$(CP) $(HELPOUT)2 $(DEFAULT)/$(HELPOUT)2 + @$(CP) $(HELPOUT)3 $(DEFAULT)/$(HELPOUT)3 + @$(CP) $(HELPOUT)4 $(DEFAULT)/$(HELPOUT)4 + @$(CP) $(HELPOUT)5 $(DEFAULT)/$(HELPOUT)5 + @touch insthelp instman: - @echo Installing man pages - -mkdir -p $(EXEDIR) $(NULL) - $(CP) man.pag $(EXEDIR) - -helpfile: $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5 - @echo Helpfiles built - touch helpfile - -$(HELPOUT)0: $(HELP)0 $(HELPSCR).1 $(HELPSCR).2 - @echo building $(HELPOUT)0 - cat $(HELP)0 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)0 - -$(HELPOUT)1: $(HELP)1 $(HELPSCR).1 $(HELPSCR).2 - @echo building $(HELPOUT)1 - cat $(HELP)1 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)1 - -$(HELPOUT)2: $(HELP)2 $(HELPSCR).1 $(HELPSCR).2 - @echo building $(HELPOUT)2 - cat $(HELP)2 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)2 - -$(HELPOUT)3: $(HELP)3 $(HELPSCR).1 $(HELPSCR).2 - @echo building $(HELPOUT)3 - cat $(HELP)3 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)3 - -$(HELPOUT)4: $(HELP)4 $(HELPSCR).1 $(HELPSCR).2 - @echo building $(HELPOUT)4 - cat $(HELP)4 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)4 - -$(HELPOUT)5: $(HELP)5 $(HELPSCR).1 $(HELPSCR).2 - @echo building $(HELPOUT)5 - cat $(HELP)5 | sed -f $(HELPSCR).1 | sed -f $(HELPSCR).2 > $(HELPOUT)5 - -$(HELPSCR).1: newhelp - ./newhelp - -$(HELPSCR).2: newhelp - ./newhelp - -newhelp: dataG.o newhelp.o - $(CC) $(OPTFLG) dataG.o newhelp.o -o newhelp - strip newhelp -# -# postscript map program -PSOPTS = -DPSFILE=\"$(EXEDIR)/$(PSDATA)\" -D$(PSPAGE) -# -$(PSPROG): $(PSSRC) $(PSDATA) $(PSHEAD) - $(CC) $(OPTFLG) $(PSOPTS) $(PSSRC) -o $(PSPROG) -# comment out the next line if debugging - strip $(PSPROG) - -lint: - lint $(LTFLG) $(CDEFS) -DCONQUER $(GFILS) > lintg - lint $(LTFLG) $(CDEFS) -DADMIN $(AFILS) > linta + @echo "Installing man pages..." + @$(MKDIR_P) $(EXEDIR) $(NULL) + @$(CP) man.pag $(EXEDIR) -docs: conquer.doc +# Complete installation +install: in$(TARGET_GAME) in$(TARGET_ADMIN) in$(TARGET_SORT) in$(PSPROG) insthelp instman + @echo "" + @echo "✓ Installation complete to $(PREFIX)" + +# Set up a new game world +new_game: all insthelp + @echo "Setting up new game world..." + @$(MKDIR_P) $(EXEDIR) $(DEFAULT) $(NULL) + @chmod 755 $(EXEDIR) + @chmod 750 $(DEFAULT) + @$(CP) $(TARGET_GAME) $(TARGET_ADMIN) $(TARGET_SORT) $(PSPROG) $(PSDATA) $(EXEDIR) + @chmod 4755 $(EXEDIR)/$(TARGET_GAME) $(EXEDIR)/$(TARGET_ADMIN) + @chmod 0755 $(EXEDIR)/$(TARGET_SORT) $(EXEDIR)/$(PSPROG) + @chmod 0644 $(EXEDIR)/$(PSDATA) + @chmod 0600 nations + @chmod 0700 run + @$(CP) nations rules $(DEFAULT) + @echo "Creating world..." + @$(EXEDIR)/$(TARGET_ADMIN) -m + @$(EXEDIR)/$(TARGET_ADMIN) -a + @echo "✓ New game world created!" + +# ============================================================================= +# CLEANING TARGETS +# ============================================================================= -conquer.doc: $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5 - cat $(HELPOUT)? |sed -e "s/^DONE/ /g"|sed -e "s/^END//g" >conquer.doc +clean: + @echo "Cleaning object files..." + @$(RM) *.o lint[ag] conquer.doc $(NULL) + @$(RM) $(DAFILS) $(DGFILS) $(NULL) -cpio: - -$(RM) core - find . -name '*[CrpsEech]' -print | cpio -ocBv > cpiosv +clobber: clean + @echo "Removing all generated files..." + @$(RM) $(HELPOUT)[0-5] $(PSPROG) $(TARGET_SORT) insthelp helpfile $(NULL) + @$(RM) newhelp in$(TARGET_GAME) in$(TARGET_SORT) in$(TARGET_ADMIN) in$(PSPROG) $(NULL) + @$(RM) $(HELPSCR).[12] $(TARGET_GAME) $(TARGET_ADMIN) $(NULL) -shar: - echo " lines words chars FILENAME" > MANIFEST - wc $(ALLFILS) >> MANIFEST - $(SHAR) $(SHARFLG) $(ALLFILS) MANIFEST +# ============================================================================= +# DEVELOPMENT AND TESTING TARGETS +# ============================================================================= -.cA.o: $< - ( trap "" 0 1 2 3 4 ; $(LN) $*.c $*A.c ;\ - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -c $*A.c ;\ - $(RM) $*A.c ) +debug: BUILD_TYPE=debug +debug: all -.cG.o: $< - ( trap "" 0 1 2 3 4 ; $(LN) $*.c $*G.c ;\ - $(CC) $(OPTFLG) $(CDEFS) -DCONQUER -c $*G.c ;\ - $(RM) $*G.c ) +release: BUILD_TYPE=release +release: all -.c.o: $< -# compiles using both defines since they -# are needed for the data.h definitions for -# each file... but should not be needed for -# the actual C source file being compiled - $(CC) $(OPTFLG) $(CDEFS) -DADMIN -DCONQUER -c $*.c +check: all + @echo "Running basic tests..." + @if [ -x ./$(TARGET_GAME) ]; then echo "✓ Game executable OK"; else echo "✗ Game missing"; exit 1; fi + @if [ -x ./$(TARGET_ADMIN) ]; then echo "✓ Admin executable OK"; else echo "✗ Admin missing"; exit 1; fi + @echo "✓ Build verification complete" -$(GOBJS): data.h header.h +lint: + @echo "Running lint analysis..." + @if command -v lint >/dev/null 2>&1; then \ + lint $(LTFLG) $(CDEFS) -DCONQUER $(GFILS) > lintg 2>/dev/null || true; \ + lint $(LTFLG) $(CDEFS) -DADMIN $(AFILS) > linta 2>/dev/null || true; \ + echo "✓ Lint analysis complete (see lintg and linta)"; \ + else \ + echo "⚠ lint not available"; \ + fi + +config: + @echo "Build Configuration:" + @echo " Platform: $(UNAME_S) ($(UNAME_M))" + @echo " Compiler: $(CC)" + @echo " Build Type: $(BUILD_TYPE)" + @echo " Install Prefix: $(PREFIX)" + @echo " Libraries: $(LIBRARIES)" + @echo " C Flags: $(OPTFLG) $(CDEFS)" + +help: + @echo "Conquer Game Build System" + @echo "" + @echo "Targets:" + @echo " all - Build all executables (default)" + @echo " clean - Remove object files" + @echo " clobber - Remove all generated files" + @echo " install - Install existing game" + @echo " new_game - Build and setup new game world" + @echo " check - Run basic tests" + @echo " lint - Run lint analysis" + @echo " config - Show build configuration" + @echo " debug - Build with debug flags" + @echo " release - Build optimized version" + @echo "" + @echo "Variables:" + @echo " BUILD_TYPE=debug|release (default: release)" + @echo " PREFIX=/path/to/install (default: $(HOME)/conquer)" + @echo " CC=compiler (auto-detected: $(CC))" + @echo "" + @echo "Examples:" + @echo " make BUILD_TYPE=debug" + @echo " make new_game PREFIX=/opt/conquer" -$(AOBJS): data.h header.h +# ============================================================================= +# DOCUMENTATION TARGETS +# ============================================================================= -ioG.o: data.h header.h patchlevel.h io.c +docs: conquer.doc -ioA.o: data.h header.h patchlevel.h io.c +conquer.doc: $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5 + @echo "Creating documentation..." + @cat $(HELPOUT)? | sed -e "s/^DONE//g" | sed -e "s/^END//g" > $@ -newlogin.o: data.h header.h newlogin.h patchlevel.h newlogin.c +# Archive targets (legacy) +cpio: + -$(RM) core + find . -name '*[CrpsEech]' -print | cpio -ocBv > cpiosv -main.o: data.h header.h patchlevel.h main.c +shar: + echo " lines words chars FILENAME" > MANIFEST + wc $(ALLFILS) >> MANIFEST + shar -D -c -l50 -oshar. $(ALLFILS) MANIFEST -newhelp.o: data.h header.h patchlevel.h newhelp.c +# ============================================================================= +# DEPENDENCY RULES +# ============================================================================= -# Clear suffixes -.SUFFIXES: +# Explicit dependencies for key files +$(GOBJS): data.h header.h +$(AOBJS): data.h header.h -# Suffixes for conquer files. -.SUFFIXES: A.o G.o .c .h .o +ioG.o: data.h header.h patchlevel.h io.c +ioA.o: data.h header.h patchlevel.h io.c +newlogin.o: data.h header.h newlogin.h patchlevel.h newlogin.c +main.o: data.h header.h patchlevel.h main.c +newhelp.o: data.h header.h patchlevel.h newhelp.c diff --git a/header.h b/header.h index 434e0be..cb8ab6b 100644 --- a/header.h +++ b/header.h @@ -1,5 +1,5 @@ /* - * header.h - Game configuration constants and settings + * header.h - Cross-platform game configuration (properly modernized) * * This file is part of Conquer. * Originally Copyright (C) 1988-1989 by Edward M. Barlow and Adam Bryant @@ -19,162 +19,378 @@ * along with this program. If not, see . */ -/* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS --- */ -#define OWNER "God" /* administrators name */ +#ifndef CONQUER_HEADER_H +#define CONQUER_HEADER_H + +/* ================================================================== */ +/* STANDARD LIBRARY INCLUDES */ +/* ================================================================== */ + +#include +#include +#include +#include +#include +#include +#include + +/* Modern C standard support with fallbacks */ +#ifdef __STDC_VERSION__ + #if __STDC_VERSION__ >= 199901L + #include + #include + #define HAVE_C99 1 + #endif +#endif + +#ifndef HAVE_C99 + #ifndef __cplusplus + #ifndef bool + typedef int bool; + #define true 1 + #define false 0 + #endif + #endif +#endif + +/* ================================================================== */ +/* CROSS-PLATFORM COMPATIBILITY */ +/* ================================================================== */ + +/* Platform detection (modernized) */ +#if defined(__linux__) || defined(__linux) || defined(linux) + #define PLATFORM_LINUX 1 + #define PLATFORM_UNIX 1 +#elif defined(__APPLE__) && defined(__MACH__) + #define PLATFORM_MACOS 1 + #define PLATFORM_UNIX 1 +#elif defined(__FreeBSD__) + #define PLATFORM_FREEBSD 1 + #define PLATFORM_UNIX 1 +#elif defined(__OpenBSD__) + #define PLATFORM_OPENBSD 1 + #define PLATFORM_UNIX 1 +#elif defined(__NetBSD__) + #define PLATFORM_NETBSD 1 + #define PLATFORM_UNIX 1 +#elif defined(_WIN32) || defined(_WIN64) + #define PLATFORM_WINDOWS 1 +#elif defined(__CYGWIN__) + #define PLATFORM_CYGWIN 1 + #define PLATFORM_UNIX 1 +#endif + +#if defined(__unix__) || defined(__unix) || defined(unix) || defined(PLATFORM_UNIX) + #define PLATFORM_UNIX 1 +#endif + +/* System includes */ +#ifdef PLATFORM_UNIX + #include + #include + #include + #include + #ifdef PLATFORM_LINUX + #include + #endif +#elif defined(PLATFORM_WINDOWS) + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #include + #include + #include + #define unlink _unlink + #define mkdir(path, mode) _mkdir(path) + #define access _access +#endif + +/* ================================================================== */ +/* LEGACY PLATFORM DEFINES (preserved for compatibility) */ +/* ================================================================== */ + +#ifdef PLATFORM_UNIX + #define BSD 1 /* Most modern Unix systems are BSD-like */ +#endif + +/* Uncomment these as needed for specific old systems */ +/* #define SYSV */ /* uncomment for UNIX SYSV machines */ +/* #define HPUX */ /* uncomment for HP-UNIX */ +/* #define XENIX */ /* this plus SYSV for XENIX machines */ + +/* ================================================================== */ +/* ADMINISTRATOR CONFIGURATION */ +/* ================================================================== */ + +#define OWNER "God" /* administrator's name */ #ifndef LOGIN -#define LOGIN "defaultuser" /* administrators login id. IMPORTANT! */ + #define LOGIN "defaultuser" /* admin login - overridden by Makefile */ #endif - /* only this UID may update. */ -/* #define SYSV /* uncomment this line on a UNIX SYSV machine */ -#define BSD /* uncomment this line on a BSD machine */ -/* #define HPUX /* uncomment for HP-UNIX */ -/*#define XENIX /* this plus SYSV for XENIX machines, untested */ -#define SYSMAIL /* if your system supports mail */ - /* conquer will notify you about system mail */ - -/* ------------------MODIFICATION IS OPTIONAL ON THE FOLLOWING----------*/ -#define SPOOLDIR "/usr/spool/mail" /* location of mail spool */ -#define FILELOCK /* if your system supports BSD flock() */ - /* other file locking is not well implemented */ -/*#define LOCKF /* in addition to FILELOCK if you have lockf */ - /* this is needed on NFS remote file systems */ -#define TIMELOG /* if your system has the date command */ - -#define NTOTAL 35 /* max # of nations ( player + npc + monster ) */ -#define MAXPTS 65 /* points for players to buy stuff with at start*/ -#define MAXARM 50 /* maximum number of armies per nation */ -#define MAXNAVY 10 /* maximum number of fleets per nation */ -#define PDEPLETE 30 /* % of armies/sectors depleted without Capitol */ -#define PFINDSCOUT 50 /* percentage chance for capturing scouts */ - -#define RUNSTOP /* defined to stop update if players are in */ - /* game -- not recommended with automatic update*/ -#define TRADE /* defined to allow commerce between nations */ -#define TRADEPCT 75 /* percent of sectors with exotic trade goods */ -#define METALPCT 33 /* percent of tradegoods that are metals */ -#define JEWELPCT 33 /* percent of tradegoods that are luxury items */ -#define HIDELOC /* defined if news is not to report sectors */ -#define OGOD /* defined if you wish to enhance god powers. */ -#define REMAKE /* may make a world even if datafile exists. */ - /* this allows demi-gods the ability to remake */ - /* their world. */ -#define NOSCORE /* only show full scores to god while in game */ -#define CHECKUSER /* only allow owner of nation to play it */ -#define REVSPACE 5 /* allow for this many revolts in nation list */ -#define LASTADD 5 /* last turn players may w/out password */ -#define USERLOG /* log users who play a nation */ -#define MASK 037 /* data file protection mask (umask) */ -#define DERVDESG /* allow DERVISH to redesignate in DESERT/ICE */ -#define MONSTER 45 /* defined if pirates/savages/nomads/lzard exist. - represents # of sectors of land that need to be - in world per pirate/savage/nomad nation */ -#define MORE_MONST /* defined if destroyed monsters are replaced */ -#define NPC 45 /* defined if NPC nations should exist. The numeric - represents # of sectors of land that need to be - in world per non-player character nation */ -#define CHEAT /* npcs will cheat to keep up - this is a very weak - form of cheating. I use good npc algorithms - (i think... comments) */ -/*#define NPC_COUNT_ARMIES /* defined if NPC nations can always count armies - This makes them to cheat by seeing even VOID and - HIDDEN armies when counting enemy units. */ -/*#define NPC_SEE_SECTORS /* defined if NPC nations can always see sectors - This allows them to cheat by being allowed to see - all sector attributes of even VOID sectors. */ -#define NPC_SEE_CITIES /* defined if NPC nations can always see cities - This allows them to cheat by being able to see - if a VOID sector is a city/town. Simulates the - players ability to tell cities via movement. */ -#define STORMS /* have storms strike fleets */ -#define VULCANIZE /* add in volcano eruptions.... */ -#define PVULCAN 20 /* % chance of eruption each round (see above) */ -#define ORCTAKE 100000L /* comment out if dont want orcs to takeover orc - NPCs. else is takeover price in jewels */ -#define MOVECOST 20l /* cost to do a move, get a screen... */ -#define TAKEPOINTS 10 /* spell points for orc takeover */ -#define PMOUNT 40 /* % of land that is mountains */ -#define PSTORM 3 /* % chance that a storm will strike a fleet */ - /* unless it is in harbor */ -#define CMOVE /* #ifdef NPC; defined for the computer to move - for Player nations if they forget to move */ -#define BEEP /* defined if you wish terminal to beep */ -#define HILIGHT /* defined if terminals support inverse video */ -#define RANEVENT 15 /* comment out if you dont want random events - weather, tax revolts, and volcanoes all are - considered random events. */ -#define PWEATHER 0 /* percent for weather disaster - unimplemented */ -#define PREVOLT 25 /* %/turn that a revolt acutally occurs */ - /* a turn is 1 season and 25% is a large value */ -#define SPEW /* spew random messages from npcs */ - -/* -BELOW THIS POINT ARE PARAMETERS YOU MIGHT OPTIONALLY WISH TO CHANGE-*/ - -/* making these numbers large takes more CPU time */ -#define LANDSEE 2 /* how far you can see from your land */ -#define NAVYSEE 1 /* how far navies can see */ -#define ARMYSEE 2 /* how far armies can see */ -#define PRTZONE 3 /* how far pirates roam from their basecamp */ -#define MEETNTN 2 /* how close nations must be to adjust status */ - -/* Below taxation rates are in gold talons per unit of product produced */ -#define TAXFOOD 5L -#define TAXMETAL 8L -#define TAXGOLD 8L -#define TAXOTHR 3L /* per food point equivalent */ -/* Town and City/Capitol tax rates based on # of people */ -#define TAXCITY 100L -#define TAXTOWN 80L - -#define SHIPMAINT 4000L /* ship mainatinance cost */ -#define TOMANYPEOPLE 4000L /* too many people in sector - 1/2 repro and - 1/2 production; not in cities/caps */ -#define ABSMAXPEOPLE 50000L /* absolute max people in any sector */ -#define MILLSIZE 500L /* min number of people to work a mill */ -#define TOMUCHMINED 50000L /* units mined for 100% chance of metal */ - /* depletion actual chance is prorated */ -#define DESFOOD 4 /* min food val to redesignate sector */ -#define MAXNEWS 5 /* number of news files stored */ -#define LONGTRIP 100 /* navy trip lth for 100% attrition */ - -/* min soldiers to take sector - either 75 or based on your civilians */ -#define TAKESECTOR min(500,max(75,(ntn[country].tciv/350))) - -#define MAXLOSS 60 /* maximum % of men lost in 1:1 battle */ -#define FINDPERCENT 1 /* percent to find gold/metal in sector */ -#define DESCOST 2000L /* cost to redesignate and the metal cost - for cities */ -#define FORTCOST 1000L /* cost to build a fort point */ -#define STOCKCOST 3000L /* cost to build a stockade */ -#define REBUILDCOST 3000L /* cost to remove a ruin */ -#define WARSHPCOST 20000L /* cost to build one light warship */ -#define MERSHPCOST 25000L /* cost to build one light merchant */ -#define GALSHPCOST 25000L /* cost to build one light galley */ -#define N_CITYCOST 4 /* move lost in (un)loading in cities */ -#define SHIPCREW 100 /* full strength crew on a ship */ -#define SHIPHOLD 100L /* storage space of a ship unit */ -#define CITYLIMIT 8L /* % of npc pop in sctr before => city */ -#define CITYPERCENT 20L /* % of npc pop able to be in cities */ -/* note that militia are not considered military below */ -#define MILRATIO 8L /* ratio civ:mil for NPCs */ -#define MILINCAP 8L /* ratio (mil in cap):mil for NPCs */ -#define MILINCITY 10L /* militia=people/MILINCITY in city/cap */ -#define NPCTOOFAR 15 /* npcs should not go this far from cap */ -#define BRIBE 50000L /* amount of gold/1000 men to bribe */ -#define METALORE 7L /* metal/soldier needed for +1% weapons */ -/* strength value for fortifications */ -#define DEF_BASE 10 /* base defense value 2 * in city/caps */ -#define FORTSTR 5 /* percent per fortress point in forts */ -#define TOWNSTR 5 /* percent per fortress point in towns */ -#define CITYSTR 8 /* percent per fortress point in city */ -#define LATESTART 2 /* new player gets 1 point/LATESTART turns, - when they start late into the game */ - -/* starting values for mercenaries */ -#define ST_MMEN (NTOTAL*500) /* a nation may draft ST_MMEN/NTOTAL */ - /* mercenaries per turn. Added to when */ - /* armies are disbanded. */ -#define ST_MATT 40 /* mercenary attack bonus */ -#define ST_MDEF 40 /* mercenary defense bonus */ - -#define VERSION "Version 4" /* version number of the game */ +/* ================================================================== */ +/* SYSTEM CAPABILITIES (modernized detection) */ +/* ================================================================== */ + +/* Mail system support */ +#ifdef PLATFORM_UNIX + #define SYSMAIL 1 /* system mail support */ + #ifdef PLATFORM_LINUX + #define SPOOLDIR "/var/mail" + #elif defined(PLATFORM_MACOS) + #define SPOOLDIR "/var/mail" + #elif defined(PLATFORM_FREEBSD) || defined(PLATFORM_OPENBSD) || defined(PLATFORM_NETBSD) + #define SPOOLDIR "/var/mail" + #else + #define SPOOLDIR "/usr/spool/mail" /* fallback */ + #endif +#elif defined(PLATFORM_WINDOWS) + #define SPOOLDIR "C:\\temp" + /* No SYSMAIL on Windows */ +#else + #define SPOOLDIR "/usr/spool/mail" +#endif + +/* File locking support */ +#ifdef PLATFORM_UNIX + #define FILELOCK 1 /* BSD flock() support */ + #ifdef PLATFORM_LINUX + #define LOCKF 1 /* lockf() for NFS */ + #endif +#endif + +/* System utilities */ +#ifdef PLATFORM_UNIX + #define TIMELOG 1 /* date command available */ +#elif defined(PLATFORM_WINDOWS) + #define TIMELOG 1 /* Windows also has date */ +#endif + +/* ================================================================== */ +/* CORE GAME LIMITS (preserved exactly from original) */ +/* ================================================================== */ + +#define NTOTAL 35 /* max # of nations (player + npc + monster) */ +#define MAXPTS 65 /* points for players to buy stuff with at start */ +#define MAXARM 50 /* maximum number of armies per nation */ +#define MAXNAVY 10 /* maximum number of fleets per nation */ +#define PDEPLETE 30 /* % of armies/sectors depleted without Capitol */ +#define PFINDSCOUT 50 /* percentage chance for capturing scouts */ + +/* ================================================================== */ +/* GAME FEATURES (preserved exactly from original) */ +/* ================================================================== */ + +#define RUNSTOP /* stop update if players are in game */ +#define TRADE /* allow commerce between nations */ +#define TRADEPCT 75 /* percent of sectors with exotic trade goods */ +#define METALPCT 33 /* percent of tradegoods that are metals */ +#define JEWELPCT 33 /* percent of tradegoods that are luxury items */ +#define HIDELOC /* news doesn't report sectors */ +#define OGOD /* enhanced god powers */ +#define REMAKE /* may make world even if datafile exists */ +#define NOSCORE /* only show full scores to god while in game */ +#define CHECKUSER /* only allow owner of nation to play it */ +#define REVSPACE 5 /* allow for this many revolts in nation list */ +#define LASTADD 5 /* last turn players may join without password */ +#define USERLOG /* log users who play a nation */ +#define MASK 037 /* data file protection mask (umask) */ +#define DERVDESG /* allow DERVISH to redesignate in DESERT/ICE */ + +/* ================================================================== */ +/* MONSTER AND NPC CONFIGURATION (preserved exactly) */ +/* ================================================================== */ + +#define MONSTER 45 /* sectors of land per pirate/savage/nomad nation */ +#define MORE_MONST /* destroyed monsters are replaced */ +#define NPC 45 /* sectors of land per non-player character nation */ +#define CHEAT /* NPCs cheat to keep competitive */ +/* #define NPC_COUNT_ARMIES */ /* NPCs can always count armies */ +/* #define NPC_SEE_SECTORS */ /* NPCs can always see sectors */ +#define NPC_SEE_CITIES /* NPCs can always see cities */ + +/* ================================================================== */ +/* ENVIRONMENTAL EFFECTS (preserved exactly) */ +/* ================================================================== */ + +#define STORMS /* storms strike fleets */ +#define VULCANIZE /* volcano eruptions */ +#define PVULCAN 20 /* % chance of eruption each round */ +#define ORCTAKE 100000L /* jewel cost for orc takeover */ +#define MOVECOST 20L /* cost per move/screen */ +#define TAKEPOINTS 10 /* spell points for orc takeover */ +#define PMOUNT 40 /* % of land that is mountains */ +#define PSTORM 3 /* % chance storm strikes fleet */ +#define CMOVE /* computer moves for inactive players */ + +/* ================================================================== */ +/* INTERFACE FEATURES (preserved exactly) */ +/* ================================================================== */ + +#define BEEP /* terminal beep support */ +#define HILIGHT /* inverse video support */ + +/* ================================================================== */ +/* RANDOM EVENTS (preserved exactly) */ +/* ================================================================== */ + +#define RANEVENT 15 /* enable random events */ +#define PWEATHER 0 /* percent for weather disasters */ +#define PREVOLT 25 /* %/turn that a revolt actually occurs */ +#define SPEW /* NPCs send random messages */ + +/* ================================================================== */ +/* GAME MECHANICS PARAMETERS (preserved exactly) */ +/* ================================================================== */ + +/* Vision and movement ranges */ +#define LANDSEE 2 /* how far you can see from your land */ +#define NAVYSEE 1 /* how far navies can see */ +#define ARMYSEE 2 /* how far armies can see */ +#define PRTZONE 3 /* how far pirates roam from basecamp */ +#define MEETNTN 2 /* how close nations must be to adjust status */ + +/* Taxation rates (in gold talons per unit) */ +#define TAXFOOD 5L /* per food unit */ +#define TAXMETAL 8L /* per metal unit */ +#define TAXGOLD 8L /* per gold unit */ +#define TAXOTHR 3L /* per food point equivalent */ +#define TAXCITY 100L /* per person in city */ +#define TAXTOWN 80L /* per person in town */ + +/* Economic parameters */ +#define SHIPMAINT 4000L /* ship maintenance cost */ +#define TOMANYPEOPLE 4000L /* overpopulation threshold */ +#define ABSMAXPEOPLE 50000L /* absolute max people in any sector */ +#define MILLSIZE 500L /* min people to work a mill */ +#define TOMUCHMINED 50000L /* units mined for 100% depletion chance */ +#define DESFOOD 4 /* min food value to redesignate sector */ +#define MAXNEWS 5 /* number of news files stored */ +#define LONGTRIP 100 /* navy trip length for 100% attrition */ + +/* Combat and military */ +#define TAKESECTOR min(500,max(75,(ntn[country].tciv/350))) /* soldiers needed to take sector */ +#define MAXLOSS 60 /* maximum % of men lost in 1:1 battle */ +#define FINDPERCENT 1 /* percent chance to find gold/metal */ +#define DESCOST 2000L /* cost to redesignate + metal cost for cities */ +#define FORTCOST 1000L /* cost to build a fort point */ +#define STOCKCOST 3000L /* cost to build a stockade */ +#define REBUILDCOST 3000L /* cost to remove a ruin */ + +/* Naval configuration */ +#define WARSHPCOST 20000L /* cost to build one light warship */ +#define MERSHPCOST 25000L /* cost to build one light merchant */ +#define GALSHPCOST 25000L /* cost to build one light galley */ +#define N_CITYCOST 4 /* movement lost in (un)loading in cities */ +#define SHIPCREW 100 /* full strength crew on a ship */ +#define SHIPHOLD 100L /* storage space of a ship unit */ + +/* NPC behavior parameters */ +#define CITYLIMIT 8L /* % of NPC pop in sector before => city */ +#define CITYPERCENT 20L /* % of NPC pop able to be in cities */ +#define MILRATIO 8L /* ratio civ:mil for NPCs */ +#define MILINCAP 8L /* ratio (mil in cap):mil for NPCs */ +#define MILINCITY 10L /* militia = people/MILINCITY in city/cap */ +#define NPCTOOFAR 15 /* NPCs shouldn't go this far from capitol */ +#define BRIBE 50000L /* gold/1000 men to bribe */ +#define METALORE 7L /* metal/soldier needed for +1% weapons */ + +/* Defense values */ +#define DEF_BASE 10 /* base defense value, 2x in city/caps */ +#define FORTSTR 5 /* percent per fortress point in forts */ +#define TOWNSTR 5 /* percent per fortress point in towns */ +#define CITYSTR 8 /* percent per fortress point in cities */ +#define LATESTART 2 /* new player gets 1 point/LATESTART turns */ + +/* Starting mercenary values */ +#define ST_MMEN (NTOTAL*500) /* starting mercenary pool */ +#define ST_MATT 40 /* mercenary attack bonus */ +#define ST_MDEF 40 /* mercenary defense bonus */ + +/* ================================================================== */ +/* VERSION INFORMATION */ +/* ================================================================== */ + +#define VERSION "Version 4" /* version number of the game */ + +/* ================================================================== */ +/* MODERN UTILITY MACROS (safe additions) */ +/* ================================================================== */ + +/* Safe string operations */ +#define SAFE_STRNCPY(dest, src, size) do { \ + strncpy((dest), (src), (size) - 1); \ + (dest)[(size) - 1] = '\0'; \ +} while(0) + +/* Utility macros */ +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +/* Cross-platform file operations */ +#ifdef PLATFORM_WINDOWS + #define FILE_EXISTS(path) (_access((path), 0) == 0) +#else + #define FILE_EXISTS(path) (access((path), F_OK) == 0) +#endif + +/* Terminal control */ +#ifdef PLATFORM_UNIX + #define CLEAR_SCREEN() printf("\033[2J\033[H") +#elif defined(PLATFORM_WINDOWS) + #define CLEAR_SCREEN() system("cls") +#else + #define CLEAR_SCREEN() +#endif + +/* Debug support */ +#ifdef DEBUG + #define DEBUG_PRINT(fmt, ...) \ + fprintf(stderr, "[DEBUG] %s:%d: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__) +#else + #define DEBUG_PRINT(fmt, ...) +#endif + +/* Random number generation */ +#define RAND() rand() +#define SRAND(x) srand(x) + +/* ================================================================== */ +/* PATH CONFIGURATION (modernized defaults) */ +/* ================================================================== */ + +#ifndef DEFAULTDIR + #ifdef PLATFORM_WINDOWS + #define DEFAULTDIR "C:\\Program Files\\Conquer\\share" + #else + #define DEFAULTDIR "/usr/local/share/conquer" + #endif +#endif + +#ifndef EXEDIR + #ifdef PLATFORM_WINDOWS + #define EXEDIR "C:\\Program Files\\Conquer\\bin" + #else + #define EXEDIR "/usr/local/bin" + #endif +#endif + +/* ================================================================== */ +/* COMPATIBILITY NOTES */ +/* ================================================================== */ + +/* + * This modernized header.h preserves all original game constants and + * functionality while adding cross-platform support. Key differences + * from the over-modernized version: + * + * 1. All original game balance parameters preserved exactly + * 2. All original feature flags kept (#define TRADE, etc.) + * 3. Platform detection added without breaking existing code + * 4. Modern C standard support with fallbacks + * 5. Cross-platform utility functions added safely + * 6. No map constants (MAPX/MAPY) - these are defined in data.h + * 7. Compatible with existing data files and save games + */ + +#endif /* CONQUER_HEADER_H */ \ No newline at end of file diff --git a/oMakefile b/historical/oMakefile similarity index 100% rename from oMakefile rename to historical/oMakefile diff --git a/main.c b/main.c index 01500e5..5412267 100644 --- a/main.c +++ b/main.c @@ -287,7 +287,8 @@ char **argv; (void) setuid (geteuid ()) ; } - fprintf(stderr,"conquer %s.%s: Copyright (c) 1988 by Edward M Barlow\n",VERSION,PATCHLEVEL); + fprintf(stderr,"conquer %s.%s: Copyright (c) 1988 Edward M Barlow\n",VERSION,PATCHLEVEL); + fprintf(stderr,"GPL v3 licensed version (c) 2025 - original authors' permission granted\n"); /* check for update in progress */ sprintf(filename,"%sup",isonfile); @@ -333,7 +334,7 @@ char **argv; if ((checkuser_mod) || (checkuser_list)) { if ((owneruid == (getpwnam(LOGIN))->pw_uid) || (owneruid == (getpwnam(ntn[0].leader))->pw_uid)) { - /* don't change - already set */ + /* don't change - already set */ } else { checkuser_mod = FALSE; @@ -342,11 +343,8 @@ char **argv; exit(FAIL); } } -#else - fprintf (stderr,"CHECKUSER not on\n"); - exit (FAIL); #endif - country=(-1); + country=(-1); for(i=0;i 4.12 ==(Vejeta)==================== +INFO: This is just an update made in 2025 to modernize the build system, + better support for modern OS detection, and feature conquer being + relicensed under GPL v3. + - Vejeta (vejeta@gmail.com) ------------------------------------------------------------------------- | 2.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V5 | ------------------------------------------------------------------------- diff --git a/patchlevel.h b/patchlevel.h index 4ab4cb5..cb6dfbd 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -19,4 +19,4 @@ * along with this program. If not, see . */ -#define PATCHLEVEL "11a" +#define PATCHLEVEL "12" From 5f483e7e474f831cea7577bfbda73eec9d628a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 21 Sep 2025 02:10:33 +0200 Subject: [PATCH 13/17] Update README, add SPDX headers, and REUSE.toml for reuse lint compliance (#6) * Update README and add SPDX headers * Provide REUSE.toml for reuse lint, needed for the REUSE specification --- LICENSE.md | 6 +-- GPL-3.0.txt => LICENSES/GPL-3.0-or-later.txt | 0 README.md | 46 ++++++++++++++++++++ REUSE.toml | 25 +++++++++++ admin.c | 1 + cexecute.c | 1 + check.c | 1 + combat.c | 1 + commands.c | 1 + data.c | 1 + data.h | 1 + display.c | 1 + extcmds.c | 1 + forms.c | 1 + header.h | 1 + io.c | 1 + magic.c | 1 + main.c | 1 + makeworl.c | 1 + misc.c | 1 + move.c | 1 + navy.c | 1 + newhelp.c | 1 + newlogin.c | 1 + newlogin.h | 1 + npc.c | 1 + patchlevel.h | 1 + psmap.c | 1 + psmap.h | 1 + randeven.c | 1 + reports.c | 1 + sort.c | 1 + spew.c | 1 + trade.c | 1 + trade.h | 1 + update.c | 1 + utilities/conqrast.c | 1 + utilities/error.c | 1 + utilities/file.c | 1 + utilities/file.h | 1 + utilities/sunconqrast.h | 1 + utilities/sunstuff.c | 1 + utilities/util.c | 1 + utilities/xconqrast.h | 1 + utilities/xstuff.c | 1 + 45 files changed, 115 insertions(+), 3 deletions(-) rename GPL-3.0.txt => LICENSES/GPL-3.0-or-later.txt (100%) create mode 100644 REUSE.toml diff --git a/LICENSE.md b/LICENSE.md index 1f97d08..96fd1ee 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -8,7 +8,7 @@ This software is licensed under the **GNU General Public License v3.0 or later** **Copyright (C) 1989 Martin Forssen (MaF) - PostScript utilities** **Copyright (C) 2006-present Vejeta (GPL relicensing and maintenance)** -See the full text of the GPL-3.0 license in the file `GPL-3.0.txt` included with this distribution, or visit: https://www.gnu.org/licenses/gpl-3.0.html +See the full text of the GPL-3.0 license in the file `LICENSES/GPL-3.0-or-later.txt` included with this distribution, or visit: https://www.gnu.org/licenses/gpl-3.0.html ## Relicensing History @@ -48,9 +48,9 @@ You should have received a copy of the GNU General Public License along with thi ## Files in This Repository -- `LICENSE` - This file (main license information) +- `LICENSE.md` - This file (main license information) - `RELICENSING-PERMISSIONS.md` - Complete email correspondence (legal evidence) -- `GPL-3.0.txt` - Full GPL-3.0 license text +- `LICENSES/GPL-3.0.txt` - Full GPL-3.0 license text - `HISTORY.md` - Historical information about the game - `AUTHORS.md` - Credits and contributors diff --git a/GPL-3.0.txt b/LICENSES/GPL-3.0-or-later.txt similarity index 100% rename from GPL-3.0.txt rename to LICENSES/GPL-3.0-or-later.txt diff --git a/README.md b/README.md index f61cc67..7e9512d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![Relicensed: 2025](https://img.shields.io/badge/Relicensed-2025-green.svg)](./RELICENSING-PERMISSIONS.md) ********************************************************* * README FILE FOR THE INSTALLER OF CONQUER * ********************************************************* @@ -20,6 +22,50 @@ the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the COPYING file for the complete GPL v3 license text. + +### Relicensing Documentation + +This game has been successfully relicensed from its original restrictive license to GPL v3 through a **15-year effort** (2006-2025) with explicit written permission from all copyright holders: + +📄 **[Full Legal Documentation](./RELICENSING-PERMISSIONS.md)** - Complete email permissions with headers +📄 **[Authors & Attribution](./AUTHORS.md)** - All contributors and their roles +📄 **[Project History](./HISTORY.md)** - Timeline from 1987 USENET release to present +📄 **[License Text](./COPYING)** - Full GPL v3 license + +### Summary of Permissions + +| Copyright Holder | Role | Permission Date | Status | +|-----------------|------|-----------------|--------| +| **Ed Barlow** | Original creator | March 12, 2016 | ✅ Granted | +| **Adam Bryant** | Co-developer | Feb 23, 2011 | ✅ Granted | +| **Martin Forssen** | PostScript utilities | Sept 15, 2025 | ✅ Granted | + +> *"Just wanted to confirm that I had no issues with publication of version 4 of Conquer under the GPL."* - Adam Bryant, 2011 + +> *"Yes i delegated it all to adam aeons ago. Im easy on it all.... copyleft didnt exist when i wrote it and it was all for fun so..."* - Ed Barlow, 2016 + +> *""Oh, that was a long time ago. But yes, that was me. And I have no problem with relicensing it to GPL."* - Martin Forssen, 2025 + +### Legal Validation + +This relicensing effort has been: +- ✅ Discussed on [Debian Legal mailing lists](http://lists.debian.org/debian-legal/2006/10/msg00063.html) +- ✅ Tracked as [GNU Savannah task #5945](http://savannah.gnu.org/task/?5945) +- ✅ Documented at [vejeta.com](http://vejeta.com/historia-del-conquer/) +- ✅ Preserved with complete email headers for authentication + +### What This Means For You + +- ✅ **Free to use, modify, and distribute** under GPL v3 terms +- ✅ **No legal concerns** - all permissions properly obtained +- ✅ **Contribute with confidence** - clear legal foundation +- ✅ **Fork freely** - create your own versions under GPL v3 + +For questions about the relicensing process: vejeta@gmail.com + +--- + + HISTORICAL NOTE: ================ This is based on the original release 4 version of CONQUER. The original diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000..72fca5a --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,25 @@ +version = 1 +SPDX-PackageName = "conquer" +SPDX-PackageSupplier = "Juan Manuel Méndez Rey " +SPDX-PackageDownloadLocation = "https://github.com/vejeta/conquer" + +[[annotations]] +path = ["Src/**.c", "Src/**.h"] +precedence = "aggregate" +SPDX-FileCopyrightText = ["1987-1988 Ed Barlow ", "1987-1988 Adam Bryant ", "1989 Martin Forssen ", "2006-2025 Juan Manuel Méndez Rey "] +SPDX-License-Identifier = "GPL-3.0-or-later" +SPDX-FileComment = "\n - Ed Barlow: Original creator, core engine, initial release (1987-1988)\n - Adam Bryant: Co-author, maintainer, enhancements (1987-1988)\n - Martin Forssen: PostScript utilities, contributed 1989\n - Juan Manuel Méndez Rey: Relicensing coordinator (2006-2025), current maintainer\n - All original authors granted permission to relicense under GPLv3-or-later." + +[[annotations]] +path = "Docs/**" +precedence = "aggregate" +SPDX-FileCopyrightText = ["1987-1989 Original Authors (see headers)", "2006-2025 Juan Manuel Méndez Rey "] +SPDX-License-Identifier = "GPL-3.0-or-later" +SPDX-FileComment = "Documentation originally distributed with Conquer USENET releases.\n Updated and relicensed by Juan Manuel Méndez Rey." + +[[annotations]] +path = "**" +precedence = "aggregate" +SPDX-FileCopyrightText = ["1987-1989 Original Authors (see headers)", "2006-2025 Juan Manuel Méndez Rey "] +SPDX-License-Identifier = "GPL-3.0-or-later" +SPDX-FileComment = "Fallback rule for all other files not covered above." diff --git a/admin.c b/admin.c index dfe540c..ba2a33b 100644 --- a/admin.c +++ b/admin.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * admin.c - Administrative functions and game management * diff --git a/cexecute.c b/cexecute.c index 3569343..b13c8df 100644 --- a/cexecute.c +++ b/cexecute.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * cexecute.c - Game functionality module * diff --git a/check.c b/check.c index fd195d4..4fa2b32 100644 --- a/check.c +++ b/check.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * check.c - Data validation and integrity checks * diff --git a/combat.c b/combat.c index af13035..cadc136 100644 --- a/combat.c +++ b/combat.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * combat.c - Combat system and battle resolution * diff --git a/commands.c b/commands.c index 8db31a9..a2300c5 100644 --- a/commands.c +++ b/commands.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * commands.c - Player command processing * diff --git a/data.c b/data.c index f941549..2bde4a3 100644 --- a/data.c +++ b/data.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * data.c - Data structures and function prototypes * diff --git a/data.h b/data.h index bfd30fa..2d43792 100644 --- a/data.h +++ b/data.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * data.h - Data structures and function prototypes * diff --git a/display.c b/display.c index 773d14e..1b9fcad 100644 --- a/display.c +++ b/display.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * display.c - Screen display and map rendering functions * diff --git a/extcmds.c b/extcmds.c index 2dfc4e0..e74473e 100644 --- a/extcmds.c +++ b/extcmds.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * extcmds.c - Extended command processing * diff --git a/forms.c b/forms.c index c0cd85a..075af0e 100644 --- a/forms.c +++ b/forms.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * forms.c - User interface forms and screens * diff --git a/header.h b/header.h index cb8ab6b..aa5d8da 100644 --- a/header.h +++ b/header.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * header.h - Cross-platform game configuration (properly modernized) * diff --git a/io.c b/io.c index 39cc19e..6232087 100644 --- a/io.c +++ b/io.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * io.c - Input/output and file handling functions * diff --git a/magic.c b/magic.c index ecb15b0..40c08c3 100644 --- a/magic.c +++ b/magic.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * magic.c - Magic system and spell casting * diff --git a/main.c b/main.c index 5412267..7a43e9c 100644 --- a/main.c +++ b/main.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * main.c - Main game loop and initialization * diff --git a/makeworl.c b/makeworl.c index 2c58496..f0a0c62 100644 --- a/makeworl.c +++ b/makeworl.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * makeworl.c - World generation and initialization * diff --git a/misc.c b/misc.c index db74654..b9b4b19 100644 --- a/misc.c +++ b/misc.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * misc.c - Miscellaneous utility functions * diff --git a/move.c b/move.c index af42fd5..f962e08 100644 --- a/move.c +++ b/move.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * move.c - Unit movement and pathfinding * diff --git a/navy.c b/navy.c index c4c2228..7b3e6d4 100644 --- a/navy.c +++ b/navy.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * navy.c - Naval units and fleet management * diff --git a/newhelp.c b/newhelp.c index b54c2af..28f57fa 100644 --- a/newhelp.c +++ b/newhelp.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * newhelp.c - Help system generation * diff --git a/newlogin.c b/newlogin.c index 51330ed..c972e40 100644 --- a/newlogin.c +++ b/newlogin.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * newlogin.c - New player registration and login * diff --git a/newlogin.h b/newlogin.h index b74defe..eac75b6 100644 --- a/newlogin.h +++ b/newlogin.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * newlogin.h - New player registration and login * diff --git a/npc.c b/npc.c index cb2ca93..05e6195 100644 --- a/npc.c +++ b/npc.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * npc.c - Non-player character AI and behavior * diff --git a/patchlevel.h b/patchlevel.h index cb6dfbd..b1980a9 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * patchlevel.h - Version and patch level definitions * diff --git a/psmap.c b/psmap.c index c5a5a3f..824f6c1 100644 --- a/psmap.c +++ b/psmap.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * psmap.c - A program to convert conquer-maps to postscript * diff --git a/psmap.h b/psmap.h index cd44e0a..2a3f1c7 100644 --- a/psmap.h +++ b/psmap.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* /* * psmap.c - Header file for conqps. A program to convert conquer-maps to postscript diff --git a/randeven.c b/randeven.c index e240679..e8c01d6 100644 --- a/randeven.c +++ b/randeven.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * randeven.c - Random event system * diff --git a/reports.c b/reports.c index e542a7e..a3c97aa 100644 --- a/reports.c +++ b/reports.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * reports.c - Game reports and statistics * diff --git a/sort.c b/sort.c index dd01ec9..554e353 100644 --- a/sort.c +++ b/sort.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * sort.c - Data sorting utilities * diff --git a/spew.c b/spew.c index 2f54463..2bc7d3d 100644 --- a/spew.c +++ b/spew.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * spew.c - NPC message generation system * diff --git a/trade.c b/trade.c index afdbc48..7a2d6d9 100644 --- a/trade.c +++ b/trade.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * trade.c - Trade and commerce system * diff --git a/trade.h b/trade.h index 00f408f..40b0420 100644 --- a/trade.h +++ b/trade.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later #ifndef TRADE_H #define TRADE_H diff --git a/update.c b/update.c index daa0bd7..8323cb7 100644 --- a/update.c +++ b/update.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * update.c - Game state update and turn processing * diff --git a/utilities/conqrast.c b/utilities/conqrast.c index dedde2c..315fcaf 100644 --- a/utilities/conqrast.c +++ b/utilities/conqrast.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * conqrast.c - Map visualization tool for Conquer games * diff --git a/utilities/error.c b/utilities/error.c index d17d241..43beffd 100644 --- a/utilities/error.c +++ b/utilities/error.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * error.c - Error handling and reporting utilities * diff --git a/utilities/file.c b/utilities/file.c index c1c9d04..e8fec82 100644 --- a/utilities/file.c +++ b/utilities/file.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * file.c - Multi-map file manipulation routines * diff --git a/utilities/file.h b/utilities/file.h index c3b0f22..6f2fda3 100644 --- a/utilities/file.h +++ b/utilities/file.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * file.h - Multi-map file manipulation routines * diff --git a/utilities/sunconqrast.h b/utilities/sunconqrast.h index 4e7adf3..b04210b 100644 --- a/utilities/sunconqrast.h +++ b/utilities/sunconqrast.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * sunconqrast.h - Sun workstation graphics definitions * diff --git a/utilities/sunstuff.c b/utilities/sunstuff.c index 37df898..9982983 100644 --- a/utilities/sunstuff.c +++ b/utilities/sunstuff.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * sunstuff.c - Sun workstation specific graphics code * diff --git a/utilities/util.c b/utilities/util.c index 24fad55..c9aa307 100644 --- a/utilities/util.c +++ b/utilities/util.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * util.c - General utility functions for conqrast * diff --git a/utilities/xconqrast.h b/utilities/xconqrast.h index 194d0a1..5ef8100 100644 --- a/utilities/xconqrast.h +++ b/utilities/xconqrast.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * xconqrast.h - X Windows graphics definitions * diff --git a/utilities/xstuff.c b/utilities/xstuff.c index e8e0747..5e86926 100644 --- a/utilities/xstuff.c +++ b/utilities/xstuff.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* * xstuff.c - X Windows specific graphics code * From 26f46a54867ac593f78f38f1d46e15272b865b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 21 Sep 2025 02:53:24 +0200 Subject: [PATCH 14/17] github actions for packaging --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bac1ad9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI/CD Pipeline + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: sudo apt-get install libncurses5-dev + - name: Build + run: make + - name: Test + run: make test + + package-deb: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build DEB package + run: | + sudo apt-get install debhelper devscripts + dpkg-buildpackage -us -uc + + package-apk: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build APK with Melange + run: | + melange build melange.yaml \ No newline at end of file From 52a0178aeb94233484cf7bf9fcb6a099de9f487f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= Date: Sun, 21 Sep 2025 05:50:18 +0200 Subject: [PATCH 15/17] APK packaging with melange for alpine based systems --- COPYING | 900 +++++++++------------------------ LICENSES/GPL-3.0-or-later.txt | 900 +++++++++------------------------ Makefile | 4 +- header.h | 4 +- packaging/melange/melange.yaml | 122 +++++ scripts/build-melange.sh | 2 + scripts/test-alpine.sh | 22 + 7 files changed, 610 insertions(+), 1344 deletions(-) create mode 100644 packaging/melange/melange.yaml create mode 100755 scripts/build-melange.sh create mode 100755 scripts/test-alpine.sh diff --git a/COPYING b/COPYING index f288702..f6cdd22 100644 --- a/COPYING +++ b/COPYING @@ -1,674 +1,232 @@ - 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 . +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 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 -. +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/LICENSES/GPL-3.0-or-later.txt b/LICENSES/GPL-3.0-or-later.txt index f288702..f6cdd22 100644 --- a/LICENSES/GPL-3.0-or-later.txt +++ b/LICENSES/GPL-3.0-or-later.txt @@ -1,674 +1,232 @@ - 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 . +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 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 -. +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/Makefile b/Makefile index a481794..ed0ac03 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,9 @@ EXEDIR = $(PREFIX)/bin # ============================================================================= # Base compiler definitions -CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\" +#CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\" +# This change has been introduced for proper packaging +CDEFS = -DDEFAULTDIR=\"/usr/lib/conquer\" -DEXEDIR=\"/usr/bin\" CDEFS += -DVERSION=\"$(VERSION)\" -DPATCHLEVEL=\"$(PATCHLEVEL)\" CDEFS += -DLOGIN=\"$(shell whoami)\" diff --git a/header.h b/header.h index aa5d8da..cea6f34 100644 --- a/header.h +++ b/header.h @@ -311,7 +311,9 @@ /* VERSION INFORMATION */ /* ================================================================== */ +#ifndef VERSION #define VERSION "Version 4" /* version number of the game */ +#endif /* ================================================================== */ /* MODERN UTILITY MACROS (safe additions) */ @@ -394,4 +396,4 @@ * 7. Compatible with existing data files and save games */ -#endif /* CONQUER_HEADER_H */ \ No newline at end of file +#endif /* CONQUER_HEADER_H */ diff --git a/packaging/melange/melange.yaml b/packaging/melange/melange.yaml new file mode 100644 index 0000000..d11909d --- /dev/null +++ b/packaging/melange/melange.yaml @@ -0,0 +1,122 @@ +package: + name: conquer + version: 4.12 + epoch: 0 + description: "Classic multi-player strategy game" + url: https://github.com/vejeta/conquer + copyright: + - license: GPL-3.0-or-later + paths: + - "*" + dependencies: + runtime: + - ncurses + - ncurses-terminfo-base + +environment: + contents: + repositories: + - https://dl-cdn.alpinelinux.org/alpine/edge/main + - https://dl-cdn.alpinelinux.org/alpine/edge/community + packages: + - alpine-baselayout-data + - busybox + - build-base + - ncurses-dev + - make + - sed + - coreutils + - pkgconfig + - gcc + - libc-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/vejeta/conquer + destination: /home/build/conquer + + - name: "Fix Makefile for correct paths" + runs: | + cd /home/build/conquer + echo "=== Fixing Makefile paths ===" + + # Show current CDEFS + echo "Original CDEFS:" + grep -n "CDEFS" Makefile | head -3 + + # Create a backup + cp Makefile Makefile.backup + + # Fix the CDEFS line in the Makefile itself (more reliable than command line override) + sed -i 's|CDEFS = -DDEFAULTDIR=\\"$(DEFAULT)\\" -DEXEDIR=\\"$(EXEDIR)\\"|CDEFS = -DDEFAULTDIR=\\"/usr/lib/conquer\\" -DEXEDIR=\\"/usr/bin\\"|g' Makefile + + # Also ensure we don't have the comment line blocking this + sed -i 's|^#CDEFS = -DDEFAULTDIR=\\"$(DEFAULT)\\" -DEXEDIR=\\"$(EXEDIR)\\"|CDEFS = -DDEFAULTDIR=\\"/usr/lib/conquer\\" -DEXEDIR=\\"/usr/bin\\"|g' Makefile + + echo "Fixed CDEFS:" + grep -n "CDEFS.*usr/lib" Makefile + + - name: "Build with corrected Makefile" + runs: | + cd /home/build/conquer + echo "=== Building with Makefile's own CDEFS ===" + + export LEGACY_CFLAGS="-std=gnu99 -D_GNU_SOURCE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int -Wno-return-type -Wno-old-style-definition -Wno-unused-variable -Wno-unused-function -Wno-format" + + make clean || true + + # Build using the Makefile's fixed CDEFS (don't override on command line) + make all OPTFLG="$LEGACY_CFLAGS" + + echo "=== Verifying paths in binaries ===" + for exe in conquer conqrun; do + if [ -x "./$exe" ]; then + echo "Built: $exe" + if strings $exe | grep -q "/usr/lib/conquer"; then + echo "✓ Correct runtime path found" + else + echo "⚠ Path check results:" + strings $exe | grep -E "(lib/conquer|home/build)" | head -2 + fi + else + echo "Failed to build: $exe" + exit 1 + fi + done + + - name: "Install game files" + runs: | + cd /home/build/conquer + + mkdir -p ${{targets.destdir}}/usr/bin + mkdir -p ${{targets.destdir}}/usr/lib/conquer + mkdir -p ${{targets.destdir}}/usr/share/licenses/conquer + + # Install executables + install -m 755 conquer ${{targets.destdir}}/usr/bin/ + install -m 755 conqrun ${{targets.destdir}}/usr/bin/ + + for exe in conqsort conqps; do + if [ -x "$exe" ]; then + install -m 755 "$exe" ${{targets.destdir}}/usr/bin/ + fi + done + + # Install help files + for i in 0 1 2 3 4 5; do + if [ -f "help$i" ]; then + install -m 644 "help$i" ${{targets.destdir}}/usr/lib/conquer/ + fi + done + + # Install game data files directly + install -m 644 nations ${{targets.destdir}}/usr/lib/conquer/nations + install -m 644 rules ${{targets.destdir}}/usr/lib/conquer/rules + + # Install license + if [ -f "COPYING" ]; then + install -m 644 COPYING ${{targets.destdir}}/usr/share/licenses/conquer/COPYING + fi + + - uses: strip diff --git a/scripts/build-melange.sh b/scripts/build-melange.sh new file mode 100755 index 0000000..a999112 --- /dev/null +++ b/scripts/build-melange.sh @@ -0,0 +1,2 @@ +docker run --privileged --rm -v "$PWD":/work -w /work \ + cgr.dev/chainguard/melange build packaging/melange/melange.yaml --arch x86_64 \ No newline at end of file diff --git a/scripts/test-alpine.sh b/scripts/test-alpine.sh new file mode 100755 index 0000000..712d9ea --- /dev/null +++ b/scripts/test-alpine.sh @@ -0,0 +1,22 @@ +# Start Alpine container with the APK available +docker run --rm -it -v "$PWD":/work alpine:latest sh -c " + # Install dependencies and the game + apk add --no-cache ncurses-terminfo-base ncurses + apk add --allow-untrusted /work/packages/x86_64/conquer-4.12-r0.apk + + # Set up environment + export TERM=xterm + export HOME=/tmp/conquer-test + mkdir -p \$HOME + + # Show what's available + echo '=== Game installed! Available commands: ===' + echo 'conquer -h # Game help' + echo 'conqrun -h # Admin help' + echo 'conquer # Start the game' + echo 'conqrun -m # Create a world (admin)' + echo '' + + # Drop into interactive shell + /bin/sh +" \ No newline at end of file From fb85c9393cc9cb51fc19c7a60931d61f09e7a685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= <940731+vejeta@users.noreply.github.com> Date: Sun, 21 Sep 2025 19:15:20 +0200 Subject: [PATCH 16/17] Update REUSE.toml with updated folder structure --- REUSE.toml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/REUSE.toml b/REUSE.toml index 72fca5a..9153e74 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -4,19 +4,12 @@ SPDX-PackageSupplier = "Juan Manuel Méndez Rey " SPDX-PackageDownloadLocation = "https://github.com/vejeta/conquer" [[annotations]] -path = ["Src/**.c", "Src/**.h"] +path = ["*.c", "*.h", "utilities/**.c", "utilities/**.h"] precedence = "aggregate" SPDX-FileCopyrightText = ["1987-1988 Ed Barlow ", "1987-1988 Adam Bryant ", "1989 Martin Forssen ", "2006-2025 Juan Manuel Méndez Rey "] SPDX-License-Identifier = "GPL-3.0-or-later" SPDX-FileComment = "\n - Ed Barlow: Original creator, core engine, initial release (1987-1988)\n - Adam Bryant: Co-author, maintainer, enhancements (1987-1988)\n - Martin Forssen: PostScript utilities, contributed 1989\n - Juan Manuel Méndez Rey: Relicensing coordinator (2006-2025), current maintainer\n - All original authors granted permission to relicense under GPLv3-or-later." -[[annotations]] -path = "Docs/**" -precedence = "aggregate" -SPDX-FileCopyrightText = ["1987-1989 Original Authors (see headers)", "2006-2025 Juan Manuel Méndez Rey "] -SPDX-License-Identifier = "GPL-3.0-or-later" -SPDX-FileComment = "Documentation originally distributed with Conquer USENET releases.\n Updated and relicensed by Juan Manuel Méndez Rey." - [[annotations]] path = "**" precedence = "aggregate" From b4a854ef2e4ed37c4f7d58f01bf18352035da1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20M=C3=A9ndez=20Rey?= <940731+vejeta@users.noreply.github.com> Date: Sun, 21 Sep 2025 20:16:56 +0200 Subject: [PATCH 17/17] Add support for Debian packaging. Update .github/workflows/ci.yml. --- .github/workflows/ci.yml | 268 +++++++++++++++++++++-- packaging/debian/build-debian.sh | 24 ++ packaging/debian/control/changelog | 8 + packaging/debian/control/conquer.install | 3 + packaging/debian/control/conquer.postint | 29 +++ packaging/debian/control/conquer.prerm | 22 ++ packaging/debian/control/control | 49 +++++ packaging/debian/control/copyright | 25 +++ packaging/debian/control/format | 1 + packaging/debian/control/rules | 55 +++++ packaging/debian/docker/Dockerfile | 30 +++ packaging/debian/docker/build.sh | 53 +++++ packaging/debian/test-debian.sh | 78 +++++++ scripts/build-debian.sh | 23 ++ scripts/test-debian.sh | 78 +++++++ 15 files changed, 731 insertions(+), 15 deletions(-) create mode 100644 packaging/debian/build-debian.sh create mode 100644 packaging/debian/control/changelog create mode 100644 packaging/debian/control/conquer.install create mode 100644 packaging/debian/control/conquer.postint create mode 100644 packaging/debian/control/conquer.prerm create mode 100644 packaging/debian/control/control create mode 100644 packaging/debian/control/copyright create mode 100644 packaging/debian/control/format create mode 100755 packaging/debian/control/rules create mode 100644 packaging/debian/docker/Dockerfile create mode 100755 packaging/debian/docker/build.sh create mode 100644 packaging/debian/test-debian.sh create mode 100755 scripts/build-debian.sh create mode 100755 scripts/test-debian.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bac1ad9..b9c8dfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,34 +1,272 @@ name: CI/CD Pipeline -on: [push, pull_request] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: test: + name: Build and Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 + - name: Install dependencies - run: sudo apt-get install libncurses5-dev - - name: Build - run: make - - name: Test - run: make test + run: | + sudo apt-get update + sudo apt-get install -y libncurses-dev build-essential make + + - name: Build project + run: | + # Test that the project builds correctly + make clean || true + make all + + - name: Verify executables + run: | + # Check that executables were created + ls -la conquer conqrun + file conquer conqrun + + - name: Basic functionality test + run: | + # Test that executables can run (help/version) + ./conquer -h || echo "conquer help test completed" + ./conqrun -h || echo "conqrun help test completed" + + package-apk: + name: Build APK Package (Alpine/Melange) + needs: test + runs-on: ubuntu-latest + # Run on all pushes to master, but only basic check on PRs + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + + - name: Build APK package with Melange + run: | + chmod +x scripts/build-melange.sh + scripts/build-melange.sh + + - name: Verify APK package + run: | + # Check that the APK was created + echo "=== APK Package Verification ===" + find packages/ -name "*.apk" -type f -exec ls -lh {} \; + + # Show package contents (APK-aware method) + APK_FILE=$(find packages/ -name "*.apk" | head -1) + if [ -n "$APK_FILE" ]; then + echo "=== APK Contents (first 20 files) ===" + # Use tar with error suppression and proper pipe handling + tar -tzf "$APK_FILE" 2>/dev/null | head -20 || { + echo "=== APK Contents (alternative method) ===" + # Alternative: just show basic structure + tar -tzf "$APK_FILE" 2>&1 | grep -v "APK-TOOLS.checksum" | head -20 | cat + } + + echo "=== APK Metadata ===" + # Extract and show package info + tar -Oxzf "$APK_FILE" .PKGINFO 2>/dev/null | head -10 || echo "No .PKGINFO found" + fi + + - name: Upload APK artifacts + uses: actions/upload-artifact@v4 + if: github.ref == 'refs/heads/master' + with: + name: conquer-apk-${{ github.sha }} + path: packages/**/*.apk + retention-days: 90 package-deb: + name: Build DEB Package (Debian) needs: test runs-on: ubuntu-latest + # Note: Using Ubuntu runner but Docker provides Debian environment steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + - name: Build DEB package run: | - sudo apt-get install debhelper devscripts - dpkg-buildpackage -us -uc + chmod +x scripts/build-debian.sh + scripts/build-debian.sh - package-apk: - needs: test + - name: Verify DEB package + run: | + # Check that the DEB was created + echo "=== DEB Package Verification ===" + find packages/ -name "*.deb" -type f -exec ls -lh {} \; + + # Show package info and contents + DEB_FILE=$(find packages/debian/ -name "*.deb" | head -1) + if [ -n "$DEB_FILE" ]; then + echo "=== Package Info ===" + dpkg-deb --info "$DEB_FILE" + echo "" + echo "=== Package Contents ===" + dpkg-deb --contents "$DEB_FILE" | head -20 + fi + + - name: Upload DEB artifacts + uses: actions/upload-artifact@v4 + if: github.ref == 'refs/heads/master' + with: + name: conquer-deb-${{ github.sha }} + path: packages/**/*.deb + retention-days: 90 + + # Lightweight verification for PRs + verify-pr: + name: PR Package Verification + needs: [package-apk, package-deb] runs-on: ubuntu-latest + if: github.event_name == 'pull_request' steps: - - uses: actions/checkout@v3 - - name: Build APK with Melange + - name: PR Build Summary run: | - melange build melange.yaml \ No newline at end of file + echo "✅ APK package build completed successfully" + echo "✅ DEB package build completed successfully" + echo "" + echo "This PR successfully builds both package formats." + echo "Full testing and artifact upload will occur when merged to master." + + # Full integration testing for master branch + test-packages: + name: Integration Testing (Master Only) + needs: [package-apk, package-deb] + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + strategy: + matrix: + test: [deb-install, apk-inspect] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download DEB package + if: matrix.test == 'deb-install' + uses: actions/download-artifact@v4 + with: + name: conquer-deb-${{ github.sha }} + path: packages/ + + - name: Test DEB package installation + if: matrix.test == 'deb-install' + run: | + # Find and install the DEB package + DEB_FILE=$(find packages/ -name "*.deb" | head -1) + if [ -n "$DEB_FILE" ]; then + echo "=== Testing DEB Installation ===" + echo "Package: $DEB_FILE" + + # Install dependencies + sudo apt-get update + sudo apt-get install -y libncurses6 ncurses-base + + # Install the package + sudo dpkg -i "$DEB_FILE" || true + sudo apt-get install -f -y + + # Test installation + echo "=== Verifying Installation ===" + which conquer + which conqrun + + # Test executables + conquer -h || echo "conquer help test completed" + conqrun -h || echo "conqrun help test completed" + + # Show installed files and locations + echo "=== Installed Files ===" + dpkg -L conquer | grep -E "(bin|lib)" | head -10 + + # Verify file permissions + ls -la /usr/bin/conquer /usr/bin/conqrun + ls -la /usr/lib/conquer/ + fi + + - name: Download APK package + if: matrix.test == 'apk-inspect' + uses: actions/download-artifact@v4 + with: + name: conquer-apk-${{ github.sha }} + path: packages/ + + - name: Inspect APK package + if: matrix.test == 'apk-inspect' + run: | + # Find and inspect the APK package + APK_FILE=$(find packages/ -name "*.apk" | head -1) + if [ -n "$APK_FILE" ]; then + echo "=== APK Package Inspection ===" + echo "Package: $APK_FILE" + echo "Size: $(ls -lh "$APK_FILE" | awk '{print $5}')" + + # Extract contents to temporary directory + mkdir -p /tmp/apk-extract + cd /tmp/apk-extract + + # Extract with error suppression + echo "=== Extracting APK ===" + tar -xzf "$APK_FILE" 2>/dev/null || { + echo "Standard extraction had warnings, trying alternative..." + tar -xzf "$APK_FILE" 2>&1 | grep -v "APK-TOOLS.checksum" || true + } + + echo "=== APK Structure ===" + find . -type f | grep -E "(bin|lib)" | head -15 + + echo "=== Executables ===" + find . -name "conquer*" -type f -exec ls -la {} \; 2>/dev/null || true + + echo "=== Game Data Files ===" + find . -path "*/lib/conquer/*" -type f -exec ls -la {} \; 2>/dev/null || true + + echo "=== Package Metadata ===" + if [ -f ".PKGINFO" ]; then + echo "--- .PKGINFO ---" + head -10 .PKGINFO + fi + fi + + release: + name: Create Release + needs: [test-packages] + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[release]') + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download all artifacts + uses: actions/download-artifact@v4 + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v4.12-${{ github.sha }} + release_name: Conquer v4.12 (${{ github.sha }}) + body: | + Automated release of Conquer v4.12 + + **Packages included:** + - 📦 APK for Alpine Linux (melange) + - 📦 DEB for Debian/Ubuntu + + **Installation:** + - APK: `apk add --allow-untrusted conquer-*.apk` + - DEB: `dpkg -i conquer_*.deb` + draft: false + prerelease: false diff --git a/packaging/debian/build-debian.sh b/packaging/debian/build-debian.sh new file mode 100644 index 0000000..c8d7bd2 --- /dev/null +++ b/packaging/debian/build-debian.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Equivalent to your build-melange.sh but for Debian packages + +set -e + +# Change to repo root directory +cd "$(dirname "$0")/.." + +# Build the Docker image if it doesn't exist +if ! docker images | grep -q conquer-debian-builder; then + echo "Building Debian packaging Docker image..." + docker build -t conquer-debian-builder packaging/debian/docker/ +fi + +# Build the Debian package +echo "Building Debian package..." +docker run --privileged --rm \ + -v "$PWD":/work \ + -w /work \ + conquer-debian-builder \ + /work/packaging/debian/docker/build.sh + +echo "Debian package built successfully!" +echo "Package location: packages/debian/" diff --git a/packaging/debian/control/changelog b/packaging/debian/control/changelog new file mode 100644 index 0000000..fbb7b15 --- /dev/null +++ b/packaging/debian/control/changelog @@ -0,0 +1,8 @@ +conquer (4.12-1) unstable; urgency=medium + + * Initial Debian packaging + * Ported from Alpine/melange packaging + * Fixed Makefile paths for proper system installation + * Added runtime dependencies for ncurses + + -- Vejeta Sun, 21 Sep 2025 12:00:00 +0000 diff --git a/packaging/debian/control/conquer.install b/packaging/debian/control/conquer.install new file mode 100644 index 0000000..049aef5 --- /dev/null +++ b/packaging/debian/control/conquer.install @@ -0,0 +1,3 @@ +# Additional files to install (if any) +# Format: source_file destination_directory +# This file is used by dh_install if needed for additional files diff --git a/packaging/debian/control/conquer.postint b/packaging/debian/control/conquer.postint new file mode 100644 index 0000000..2b0245b --- /dev/null +++ b/packaging/debian/control/conquer.postint @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +case "$1" in + configure) + # Ensure game directory has correct permissions + if [ -d /usr/lib/conquer ]; then + chmod 755 /usr/lib/conquer + chmod 644 /usr/lib/conquer/* + fi + + echo "Conquer game installed successfully!" + echo "Run 'conquer' to start the game" + echo "Run 'conqrun -h' for administrative options" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/packaging/debian/control/conquer.prerm b/packaging/debian/control/conquer.prerm new file mode 100644 index 0000000..e19de66 --- /dev/null +++ b/packaging/debian/control/conquer.prerm @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +case "$1" in + remove|upgrade|deconfigure) + # Clean up any temporary files if needed + echo "Removing conquer package..." + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/packaging/debian/control/control b/packaging/debian/control/control new file mode 100644 index 0000000..862872e --- /dev/null +++ b/packaging/debian/control/control @@ -0,0 +1,49 @@ +Source: conquer +Section: games +Priority: optional +Maintainer: Vejeta +Build-Depends: debhelper-compat (= 13), + libncurses-dev, + pkg-config, + gcc, + libc6-dev, + make, + sed, + coreutils +Standards-Version: 4.6.2 +Homepage: https://github.com/vejeta/conquer +Vcs-Git: https://github.com/vejeta/conquer.git +Vcs-Browser: https://github.com/vejeta/conquer + +Package: conquer +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libncurses6 +Description: Classic ncurses multiplayer fantasy war game (1987-1992, recently GPLv3) + Conquer is a historic multiplayer fantasy war game originally created by + Ed Barlow and Adam Bryant between 1987-1992. This classic Unix terminal game + was distributed through comp.sources.games and has been recently relicensed + under GPLv3 for modern Linux systems. + . + Built with ncurses, Conquer runs entirely in your terminal with a character-based + interface that captures the authentic feel of 1980s Unix gaming. Originally + described as "not really empire, but close enough to be easily understood by + those used to empire," it features tactical gameplay, magical powers, and + multiple fantasy scenarios. + . + Terminal-based features: + * Full ncurses terminal user interface + * Multiplayer gameplay with multiple administrators + * Multiple fantasy war scenarios with different maps + * Magical powers and comprehensive spell system + * Large variety of unit types and tactical options + * Originally supporting maps up to 256x256 grid size, now bigger. + * Screen-based real-time display and interaction + . + Perfect for terminal enthusiasts and retro gaming fans, this package brings + the classic 1980s Unix gaming experience to modern Debian and Ubuntu systems. + Play locally or set up multiplayer sessions - all you need is a terminal + and the strategic mind of a fantasy warlord. + . + Run 'conquer' to start playing, or 'conqrun -h' for server administration. diff --git a/packaging/debian/control/copyright b/packaging/debian/control/copyright new file mode 100644 index 0000000..8528591 --- /dev/null +++ b/packaging/debian/control/copyright @@ -0,0 +1,25 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: conquer +Upstream-Contact: Vejeta +Source: https://github.com/vejeta/conquer + +Files: * +Copyright: 2025 Vejeta +License: GPL-3.0-or-later + +License: GPL-3.0-or-later + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in "/usr/share/common-licenses/GPL-3". diff --git a/packaging/debian/control/format b/packaging/debian/control/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/packaging/debian/control/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/packaging/debian/control/rules b/packaging/debian/control/rules new file mode 100755 index 0000000..4d4a5ce --- /dev/null +++ b/packaging/debian/control/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f + +# Export environment variables for legacy C code compatibility +export LEGACY_CFLAGS = -std=gnu99 -D_GNU_SOURCE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int -Wno-return-type -Wno-old-style-definition -Wno-unused-variable -Wno-unused-function -Wno-format +export DEB_CFLAGS_APPEND = $(LEGACY_CFLAGS) + +%: + dh $@ + +override_dh_auto_configure: + # Fix Makefile paths (same logic as melange) + cp Makefile Makefile.backup + sed -i 's|CDEFS = -DDEFAULTDIR=\\"$$(DEFAULT)\\" -DEXEDIR=\\"$$(EXEDIR)\\"|CDEFS = -DDEFAULTDIR=\\"/usr/lib/conquer\\" -DEXEDIR=\\"/usr/bin\\"|g' Makefile + sed -i 's|^#CDEFS = -DDEFAULTDIR=\\"$$(DEFAULT)\\" -DEXEDIR=\\"$$(EXEDIR)\\"|CDEFS = -DDEFAULTDIR=\\"/usr/lib/conquer\\" -DEXEDIR=\\"/usr/bin\\"|g' Makefile + +override_dh_auto_build: + # Build with corrected Makefile and legacy flags + $(MAKE) clean || true + $(MAKE) all OPTFLG="$(LEGACY_CFLAGS)" + +override_dh_auto_install: + # Create installation directories + mkdir -p debian/conquer/usr/bin + mkdir -p debian/conquer/usr/lib/conquer + mkdir -p debian/conquer/usr/share/doc/conquer + + # Install executables + install -m 755 conquer debian/conquer/usr/bin/ + install -m 755 conqrun debian/conquer/usr/bin/ + + # Install optional executables if they exist + for exe in conqsort conqps; do \ + if [ -x "$$exe" ]; then \ + install -m 755 "$$exe" debian/conquer/usr/bin/; \ + fi; \ + done + + # Install help files + for i in 0 1 2 3 4 5; do \ + if [ -f "help$$i" ]; then \ + install -m 644 "help$$i" debian/conquer/usr/lib/conquer/; \ + fi; \ + done + + # Install game data files + install -m 644 nations debian/conquer/usr/lib/conquer/nations + install -m 644 rules debian/conquer/usr/lib/conquer/rules + + # Install documentation + if [ -f "COPYING" ]; then \ + install -m 644 COPYING debian/conquer/usr/share/doc/conquer/copyright; \ + fi + +override_dh_strip: + dh_strip diff --git a/packaging/debian/docker/Dockerfile b/packaging/debian/docker/Dockerfile new file mode 100644 index 0000000..5ba8a81 --- /dev/null +++ b/packaging/debian/docker/Dockerfile @@ -0,0 +1,30 @@ +FROM debian:trixie + +# Install build dependencies +RUN apt-get update && apt-get install -y \ + build-essential \ + devscripts \ + debhelper \ + dh-make \ + fakeroot \ + lintian \ + git \ + libncurses-dev \ + pkg-config \ + sed \ + coreutils \ + gcc \ + libc6-dev \ + make \ + binutils \ + && rm -rf /var/lib/apt/lists/* + +# Set up build environment +RUN useradd -m -s /bin/bash builder + +# Copy and set permissions for build script (as root) +COPY build.sh /home/builder/build.sh +RUN chmod +x /home/builder/build.sh && \ + chown builder:builder /home/builder/build.sh + +WORKDIR /home/builder diff --git a/packaging/debian/docker/build.sh b/packaging/debian/docker/build.sh new file mode 100755 index 0000000..be0e2f8 --- /dev/null +++ b/packaging/debian/docker/build.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env sh + +#!/bin/bash +# Main build script inside Docker container + +set -e + +WORK_DIR="/work" +BUILD_DIR="/home/builder/build" +OUTPUT_DIR="/work/packages/debian" + +echo "=== Starting Debian package build ===" + +# Create build directory +mkdir -p "$BUILD_DIR" +cd "$BUILD_DIR" + +# Clone the repository +echo "Cloning repository..." +git clone https://github.com/vejeta/conquer conquer-4.12 +cd conquer-4.12 + +# Copy Debian packaging files +echo "Setting up Debian packaging..." +cp -r "$WORK_DIR/packaging/debian/control" debian/ + +# Fix Makefile paths (same as melange) +echo "=== Fixing Makefile paths ===" +echo "Original CDEFS:" +grep -n "CDEFS" Makefile | head -3 + +cp Makefile Makefile.backup + +sed -i 's|CDEFS = -DDEFAULTDIR=\\"$(DEFAULT)\\" -DEXEDIR=\\"$(EXEDIR)\\"|CDEFS = -DDEFAULTDIR=\\"/usr/lib/conquer\\" -DEXEDIR=\\"/usr/bin\\"|g' Makefile +sed -i 's|^#CDEFS = -DDEFAULTDIR=\\"$(DEFAULT)\\" -DEXEDIR=\\"$(EXEDIR)\\"|CDEFS = -DDEFAULTDIR=\\"/usr/lib/conquer\\" -DEXEDIR=\\"/usr/bin\\"|g' Makefile + +echo "Fixed CDEFS:" +grep -n "CDEFS.*usr/lib" Makefile + +# Build the package +echo "=== Building Debian package ===" +export LEGACY_CFLAGS="-std=gnu99 -D_GNU_SOURCE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int -Wno-return-type -Wno-old-style-definition -Wno-unused-variable -Wno-unused-function -Wno-format" +export DEB_CFLAGS_APPEND="$LEGACY_CFLAGS" + +debuild -us -uc -b + +# Create output directory and copy packages +mkdir -p "$OUTPUT_DIR" +cp ../*.deb "$OUTPUT_DIR/" +cp ../*.changes "$OUTPUT_DIR/" + +echo "=== Package build complete ===" +ls -la "$OUTPUT_DIR/" diff --git a/packaging/debian/test-debian.sh b/packaging/debian/test-debian.sh new file mode 100644 index 0000000..f87f98e --- /dev/null +++ b/packaging/debian/test-debian.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# Equivalent to your test-alpine.sh but for Debian + +set -e + +# Change to repo root directory +SCRIPT_DIR="$(dirname "$0")" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +cd "$REPO_ROOT" + +echo "Debug: Script location: $SCRIPT_DIR" +echo "Debug: Repo root: $REPO_ROOT" +echo "Debug: Current PWD: $PWD" + +# Check if packages exist +PACKAGE_DIR="$REPO_ROOT/packages/debian" +echo "Debug: Looking for packages in: $PACKAGE_DIR" + +if [ ! -d "$PACKAGE_DIR" ]; then + echo "Error: Package directory $PACKAGE_DIR not found" + echo "Please run scripts/build-debian.sh first" + echo "" + echo "Debug: Contents of packages directory:" + ls -la "$REPO_ROOT/packages/" 2>/dev/null || echo "packages/ directory doesn't exist" + exit 1 +fi + +# Find the .deb package (architecture-agnostic) +DEB_FILE=$(find "$PACKAGE_DIR" -name "conquer_*.deb" | head -1) +if [ -z "$DEB_FILE" ]; then + echo "Error: No .deb package found in $PACKAGE_DIR" + echo "Available files:" + ls -la "$PACKAGE_DIR" 2>/dev/null || echo "Directory is empty" + exit 1 +fi + +echo "Found package: $DEB_FILE" + +# Get the container path (relative to /work mount point) +REL_PATH="${DEB_FILE#$REPO_ROOT/}" +CONTAINER_DEB_PATH="/work/$REL_PATH" + +echo "Debug: Relative path: $REL_PATH" +echo "Debug: Container path: $CONTAINER_DEB_PATH" + +# Start Debian container with the DEB available +docker run --rm -it -v "$REPO_ROOT":/work debian:trixie bash -c " + # Update package list and install dependencies + apt-get update + apt-get install -y libncurses6 ncurses-base + + # Install the game package (using the container path) + echo 'Installing package: $CONTAINER_DEB_PATH' + dpkg -i '$CONTAINER_DEB_PATH' || true + apt-get install -f -y # Fix any dependency issues + + # Set up environment + export TERM=xterm + export HOME=/tmp/conquer-test + mkdir -p \$HOME + + # Show what's available + echo '=== Game installed! Available commands: ===' + echo 'conquer -h # Game help' + echo 'conqrun -h # Admin help' + echo 'conquer # Start the game' + echo 'conqrun -m # Create a world (admin)' + echo '' + echo 'Package info:' + dpkg -l | grep conquer + echo '' + echo 'Installed files:' + dpkg -L conquer | head -10 + echo '' + + # Drop into interactive shell + /bin/bash +" diff --git a/scripts/build-debian.sh b/scripts/build-debian.sh new file mode 100755 index 0000000..4b7163f --- /dev/null +++ b/scripts/build-debian.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh + +#!/bin/bash +# Equivalent to your build-melange.sh but for Debian packages + +set -e + +# Build the Docker image if it doesn't exist +if ! docker images | grep -q conquer-debian-builder; then + echo "Building Debian packaging Docker image..." + docker build -t conquer-debian-builder packaging/debian/docker/ +fi + +# Build the Debian package +echo "Building Debian package..." +docker run --privileged --rm \ + -v "$PWD":/work \ + -w /work \ + conquer-debian-builder \ + /work/packaging/debian/docker/build.sh + +echo "Debian package built successfully!" +echo "Package location: packages/debian/" diff --git a/scripts/test-debian.sh b/scripts/test-debian.sh new file mode 100755 index 0000000..f87f98e --- /dev/null +++ b/scripts/test-debian.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# Equivalent to your test-alpine.sh but for Debian + +set -e + +# Change to repo root directory +SCRIPT_DIR="$(dirname "$0")" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +cd "$REPO_ROOT" + +echo "Debug: Script location: $SCRIPT_DIR" +echo "Debug: Repo root: $REPO_ROOT" +echo "Debug: Current PWD: $PWD" + +# Check if packages exist +PACKAGE_DIR="$REPO_ROOT/packages/debian" +echo "Debug: Looking for packages in: $PACKAGE_DIR" + +if [ ! -d "$PACKAGE_DIR" ]; then + echo "Error: Package directory $PACKAGE_DIR not found" + echo "Please run scripts/build-debian.sh first" + echo "" + echo "Debug: Contents of packages directory:" + ls -la "$REPO_ROOT/packages/" 2>/dev/null || echo "packages/ directory doesn't exist" + exit 1 +fi + +# Find the .deb package (architecture-agnostic) +DEB_FILE=$(find "$PACKAGE_DIR" -name "conquer_*.deb" | head -1) +if [ -z "$DEB_FILE" ]; then + echo "Error: No .deb package found in $PACKAGE_DIR" + echo "Available files:" + ls -la "$PACKAGE_DIR" 2>/dev/null || echo "Directory is empty" + exit 1 +fi + +echo "Found package: $DEB_FILE" + +# Get the container path (relative to /work mount point) +REL_PATH="${DEB_FILE#$REPO_ROOT/}" +CONTAINER_DEB_PATH="/work/$REL_PATH" + +echo "Debug: Relative path: $REL_PATH" +echo "Debug: Container path: $CONTAINER_DEB_PATH" + +# Start Debian container with the DEB available +docker run --rm -it -v "$REPO_ROOT":/work debian:trixie bash -c " + # Update package list and install dependencies + apt-get update + apt-get install -y libncurses6 ncurses-base + + # Install the game package (using the container path) + echo 'Installing package: $CONTAINER_DEB_PATH' + dpkg -i '$CONTAINER_DEB_PATH' || true + apt-get install -f -y # Fix any dependency issues + + # Set up environment + export TERM=xterm + export HOME=/tmp/conquer-test + mkdir -p \$HOME + + # Show what's available + echo '=== Game installed! Available commands: ===' + echo 'conquer -h # Game help' + echo 'conqrun -h # Admin help' + echo 'conquer # Start the game' + echo 'conqrun -m # Create a world (admin)' + echo '' + echo 'Package info:' + dpkg -l | grep conquer + echo '' + echo 'Installed files:' + dpkg -L conquer | head -10 + echo '' + + # Drop into interactive shell + /bin/bash +"