diff --git a/.gitignore b/.gitignore index 0b2ff7cf2..29f29be5f 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,36 @@ cscope.out cscope.files *.log INSTALL +*.aux +*.cp +*.cps +*.dvi +*.fn +*.fns +*.ky +*.pg +*.toc +*.tp +*.vr +*.tps +*.vrs +*.pgs +*.rn +*.rns +/meta/gdb-uninstalled-guile +/meta/guile +/meta/uninstalled-env +/examples/box-module/box +/examples/box/box +/lib/alloca.h +/lib/charset.alias +/lib/configmake.h +/lib/ref-add.sed +/lib/ref-del.sed +/lib/stdlib.h +/lib/string.h +/lib/strings.h +/lib/sys/file.h +/lib/time.h +/lib/unistd.h +/lib/unistr/.dirstamp diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..94a9ed024 --- /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 +. diff --git a/COPYING.LESSER b/COPYING.LESSER index 8add30ad5..cca7fc278 100644 --- a/COPYING.LESSER +++ b/COPYING.LESSER @@ -1,504 +1,165 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + 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. -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - Preamble + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. + 0. Additional Definitions. - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. + 1. Exception to Section 3 of the GNU GPL. - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. + 2. Conveying Modified Versions. - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 3. Object Code Incorporating Material from Library Header Files. - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) + b) Accompany the object code with a copy of the GNU GPL and this license + document. - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. + 4. Combined Works. - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/FAQ b/FAQ deleted file mode 100644 index 2ff6cad50..000000000 --- a/FAQ +++ /dev/null @@ -1,19 +0,0 @@ -Guile FAQ -*- outline -*- - -* Build problems - -** readline.c: error: `rl_pending_input' undeclared - -This occurs if the Readline library detected by Guile's configure -script is actually the BSD Editline project's supposedly -Readline-compatible library. The immediate fix is to uninstall -Editline and install the real GNU Readline instead. When you do this, -please note that it probably won't work to keep Editline in /usr and -install GNU Readline in /usr/local (or some similar arrangement), -because the Editline library will then still be picked up at link and -run time; it's best (subject to other constraints) to remove Editline -completely. - -For the longer term, please also report this problem to the Editline -project, to encourage them to fix it in the next release of their -Readline compatibility library. diff --git a/LICENSE b/LICENSE index 213e34ae8..3961579b8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ Guile is covered under the terms of the GNU Lesser General Public -License, version 2.1. See COPYING.LESSER. +License, version 3 or later. See COPYING.LESSER and COPYING. diff --git a/Makefile.am b/Makefile.am index a82143b78..4562dddf3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,23 +1,23 @@ ## Process this file with automake to produce Makefile.in. ## -## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, 2007, 2008 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA # want automake 1.10 or higher so that AM_GNU_GETTEXT can tell automake that # config.rpath is needed @@ -31,7 +31,7 @@ SUBDIRS = lib meta libguile guile-readline emacs \ include_HEADERS = libguile.h EXTRA_DIST = LICENSE HACKING GUILE-VERSION \ - m4/ChangeLog-2008 FAQ \ + m4/ChangeLog-2008 \ m4/autobuild.m4 ChangeLog-2008 TESTS = check-guile @@ -40,4 +40,16 @@ ACLOCAL_AMFLAGS = -I m4 DISTCLEANFILES = check-guile.log +dist-hook: gen-ChangeLog + +gen_start_rev = 61db429e251bfd2f75cb4632972e0238056eb24b +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d .git; then \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ + $(gen_start_rev)..HEAD > $(distdir)/cl-t; \ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + # Makefile.am ends here diff --git a/NEWS b/NEWS index 9aca5d912..593d6c27a 100644 --- a/NEWS +++ b/NEWS @@ -5,29 +5,491 @@ See the end for copying conditions. Please send Guile bug reports to bug-guile@gnu.org. -Changes in 1.9.0: +Changes in 1.9.0 (changes since the 1.8.x series): * New modules (see the manual for details) -** `(srfi srfi-18)', multithreading support -** The `(ice-9 i18n)' module provides internationalization support - -* Changes to the distribution - -** Guile now uses Gnulib as a portability aid +** `(srfi srfi-18)', more sophisticated multithreading support +** `(ice-9 i18n)', internationalization support +** `(rnrs bytevector)', the R6RS bytevector API +** `(rnrs io ports)', a subset of the R6RS I/O port API +** `(system xref)', a cross-referencing facility (FIXME undocumented) * Changes to the stand-alone interpreter + +** Guile now can compile Scheme to bytecode for a custom virtual machine. + +Compiled code loads much faster than Scheme source code, and runs around +3 or 4 times as fast, generating much less garbage in the process. + +** The stack limit is now initialized from the environment. + +If getrlimit(2) is available and a stack limit is set, Guile will set +its stack limit to 80% of the rlimit. Otherwise the limit is 160000 +words, a four-fold increase from the earlier default limit. + +** New environment variables: GUILE_LOAD_COMPILED_PATH, + GUILE_SYSTEM_LOAD_COMPILED_PATH + +GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is +for source files. It is a different path, however, because compiled +files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like +GUILE_SYSTEM_PATH. + +** New read-eval-print loop (REPL) implementation + +Running Guile with no arguments drops the user into the new REPL. While +it is self-documenting to an extent, the new REPL has not yet been +documented in the manual. This will be fixed before 2.0. + +** New `guile-tools' commands: `compile', `disassemble' + +Pass the `--help' command-line option to these commands for more +information. + * Changes to Scheme functions and syntax -** A new 'memoize-symbol evaluator trap has been added. This trap can -be used for efficiently implementing a Scheme code coverage. +** Procedure removed: `the-environment' + +This procedure was part of the interpreter's execution model, and does +not apply to the compiler. + +** Files loaded with `primitive-load-path' will now be compiled + automatically. + +If a compiled .go file corresponding to a .scm file is not found or is +not fresh, the .scm file will be compiled on the fly, and the resulting +.go file stored away. An advisory note will be printed on the console. + +Note that this mechanism depends on preservation of the .scm and .go +modification times; if the .scm or .go files are moved after +installation, care should be taken to preserve their original +timestamps. + +Autocompiled files will be stored in the user's ~/.guile-ccache +directory, which will be created if needed. This is analogous to +ccache's behavior for C files. + +To inhibit autocompilation, set the GUILE_AUTO_COMPILE environment +variable to 0, or pass --no-autocompile on the Guile command line. + +Note that there is currently a bug here: automatic compilation will +sometimes be attempted when it shouldn't. + +For example, the old (lang elisp) modules are meant to be interpreted, +not compiled. This bug will be fixed before 2.0. FIXME 2.0: Should say +something here about module-transformer called for compile. + +** New POSIX procedures: `getrlimit' and `setrlimit' + +Note however that the interface of these functions is likely to change +in the next prerelease. + +** New procedure in `(oops goops)': `method-formals' + +** BUG: (procedure-property func 'arity) does not work on compiled + procedures + +This will be fixed one way or another before 2.0. + +** New procedures in (ice-9 session): `add-value-help-handler!', + `remove-value-help-handler!', `add-name-help-handler!' + `remove-name-help-handler!', `procedure-arguments', + +The value and name help handlers provide some minimal extensibility to +the help interface. Guile-lib's `(texinfo reflection)' uses them, for +example, to make stexinfo help documentation available. See those +procedures' docstrings for more information. + +`procedure-arguments' describes the arguments that a procedure can take, +combining arity and formals. For example: + + (procedure-arguments resolve-interface) + => ((required . (name)) (rest . args)) + +Additionally, `module-commentary' is now publically exported from +`(ice-9 session). + +** Deprecated: `procedure->memoizing-macro', `procedure->syntax' + +These procedures will not work with syncase expansion, and indeed are +not used in the normal course of Guile. They are still used by the old +Emacs Lisp support, however. + +** New language: ECMAScript + +Guile now ships with one other high-level language supported, +ECMAScript. The goal is to support all of version 3.1 of the standard, +but not all of the libraries are there yet. This support is not yet +documented; ask on the mailing list if you are interested. + +** Defmacros may now have docstrings. + +Indeed, any macro may have a docstring. `object-documentation' from +`(ice-9 documentation)' may be used to retrieve the docstring, once you +have a macro value -- but see the above note about first-class macros. +Docstrings are associated with the syntax transformer procedures. + +** The psyntax expander now knows how to interpret the @ and @@ special + forms. + +** The psyntax expander is now hygienic with respect to modules. + +Free variables in a macro are scoped in the module that the macro was +defined in, not in the module the macro is used in. For example, code +like this works now: + + (define-module (foo) #:export (bar)) + (define (helper x) ...) + (define-syntax bar + (syntax-rules () ((_ x) (helper x)))) + + (define-module (baz) #:use-module (foo)) + (bar qux) + +It used to be you had to export `helper' from `(foo)' as well. +Thankfully, this has been fixed. + +** New function, `procedure-module' + +While useful on its own, `procedure-module' is used by psyntax on syntax +transformers to determine the module in which to scope introduced +identifiers. + +** `eval-case' has been deprecated, and replaced by `eval-when'. + +The semantics of `eval-when' are easier to understand. It is still +missing documentation, however. + +** Guile is now more strict about prohibiting definitions in expression + contexts. + +Although previous versions of Guile accepted it, the following +expression is not valid, in R5RS or R6RS: + + (if test (define foo 'bar) (define foo 'baz)) + +In this specific case, it would be better to do: + + (define foo (if test 'bar 'baz)) + +It is certainly possible to circumvent this resriction with e.g. +`(module-define! (current-module) 'foo 'baz)'. We would appreciate +feedback about this change (a consequence of using psyntax as the +default expander), and may choose to revisit this situation before 2.0 +in response to user feedback. + +** Defmacros must now produce valid Scheme expressions. + +It used to be that defmacros could unquote in Scheme values, as a way of +supporting partial evaluation, and avoiding some hygiene issues. For +example: + + (define (helper x) ...) + (define-macro (foo bar) + `(,helper ,bar)) + +Assuming this macro is in the `(baz)' module, the direct translation of +this code would be: + + (define (helper x) ...) + (define-macro (foo bar) + `((@@ (baz) helper) ,bar)) + +Of course, one could just use a hygienic macro instead: + + (define-syntax foo + (syntax-rules () + ((_ bar) (helper bar)))) + +** Guile's psyntax now supports docstrings and internal definitions. + +The following Scheme is not strictly legal: + + (define (foo) + "bar" + (define (baz) ...) + (baz)) + +However its intent is fairly clear. Guile interprets "bar" to be the +docstring of `foo', and the definition of `baz' is still in definition +context. + +** Macros need to be defined before their first use. + +It used to be that with lazy memoization, this might work: + + (define (foo x) + (ref x)) + (define-macro (ref x) x) + (foo 1) => 1 + +But now, the body of `foo' is interpreted to mean a call to the toplevel +`ref' function, instead of a macro expansion. The solution is to define +macros before code that uses them. + +** Functions needed by macros at expand-time need to be present at + expand-time. + +For example, this code will work at the REPL: + + (define (double-helper x) (* x x)) + (define-macro (double-literal x) (double-helper x)) + (double-literal 2) => 4 + +But it will not work when a file is compiled, because the definition of +`double-helper' is not present at expand-time. The solution is to wrap +the definition of `double-helper' in `eval-when': + + (eval-when (load compile eval) + (define (double-helper x) (* x x))) + (define-macro (double-literal x) (double-helper x)) + (double-literal 2) => 4 + +See the (currently missing) documentation for eval-when for more +information. + +** New variable, %pre-modules-transformer + +Need to document this one some more. + +** Temporarily removed functions: `macroexpand', `macroexpand-1' + +`macroexpand' will be added back before 2.0. It is unclear how to +implement `macroexpand-1' with syntax-case, though PLT Scheme does prove +that it is possible. + +** New reader macros: #' #` #, #,@ + +These macros translate, respectively, to `syntax', `quasisyntax', +`unsyntax', and `unsyntax-splicing'. See the R6RS for more information. +These reader macros may be overridden by `read-hash-extend'. + +** Incompatible change to #' + +Guile did have a #' hash-extension, by default, which just returned the +subsequent datum: #'foo => foo. In the unlikely event that anyone +actually used this, this behavior may be reinstated via the +`read-hash-extend' mechanism. + +** Scheme expresssions may be commented out with #; + +#; comments out an entire expression. See SRFI-62 or the R6RS for more +information. + +** `make-stack' with a tail-called procedural narrowing argument no longer + works (with compiled procedures) + +It used to be the case that a captured stack could be narrowed to select +calls only up to or from a certain procedure, even if that procedure +already tail-called another procedure. This was because the debug +information from the original procedure was kept on the stack. + +Now with the new compiler, the stack only contains active frames from +the current continuation. A narrow to a procedure that is not in the +stack will result in an empty stack. To fix this, narrow to a procedure +that is active in the current continuation, or narrow to a specific +number of stack frames. + +** backtraces through compiled procedures only show procedures that are + active in the current continuation + +Similarly to the previous issue, backtraces in compiled code may be +different from backtraces in interpreted code. There are no semantic +differences, however. Please mail bug-guile@gnu.org if you see any +deficiencies with Guile's backtraces. + +** syntax-rules and syntax-case macros now propagate source information + through to the expanded code + +This should result in better backtraces. + +** The currying behavior of `define' has been removed. + +Before, `(define ((f a) b) (* a b))' would translate to + + (define f (lambda (a) (lambda (b) (* a b)))) + +Now a syntax error is signaled, as this syntax is not supported by +default. If there is sufficient demand, this syntax can be supported +again by default. + +** All modules have names now + +Before, you could have anonymous modules: modules without names. Now, +because of hygiene and macros, all modules have names. If a module was +created without a name, the first time `module-name' is called on it, a +fresh name will be lazily generated for it. + +** Many syntax errors have different texts now + +Syntax errors still throw to the `syntax-error' key, but the arguments +are often different now. Perhaps in the future, Guile will switch to +using standard SRFI-35 conditions. + +** Returning multiple values to compiled code will silently truncate the + values to the expected number + +For example, the interpreter would raise an error evaluating the form, +`(+ (values 1 2) (values 3 4))', because it would see the operands as +being two compound "values" objects, to which `+' does not apply. + +The compiler, on the other hand, receives multiple values on the stack, +not as a compound object. Given that it must check the number of values +anyway, if too many values are provided for a continuation, it chooses +to truncate those values, effectively evaluating `(+ 1 3)' instead. + +The idea is that the semantics that the compiler implements is more +intuitive, and the use of the interpreter will fade out with time. +This behavior is allowed both by the R5RS and the R6RS. + +** Multiple values in compiled code are not represented by compound + objects + +This change may manifest itself in the following situation: + + (let ((val (foo))) (do-something) val) + +In the interpreter, if `foo' returns multiple values, multiple values +are produced from the `let' expression. In the compiler, those values +are truncated to the first value, and that first value is returned. In +the compiler, if `foo' returns no values, an error will be raised, while +the interpreter would proceed. + +Both of these behaviors are allowed by R5RS and R6RS. The compiler's +behavior is more correct, however. If you wish to preserve a potentially +multiply-valued return, you will need to set up a multiple-value +continuation, using `call-with-values'. + +** Defmacros are now implemented in terms of syntax-case. + +The practical ramification of this is that the `defmacro?' predicate has +been removed, along with `defmacro-transformer', `macro-table', +`xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and +`defmacro:transformer'. This is because defmacros are simply macros. If +any of these procedures provided useful facilities to you, we encourage +you to contact the Guile developers. + +** psyntax is now the default expander + +Scheme code is now expanded by default by the psyntax hygienic macro +expander. Expansion is performed completely before compilation or +interpretation. + +Notably, syntax errors will be signalled before interpretation begins. +In the past, many syntax errors were only detected at runtime if the +code in question was memoized. + +As part of its expansion, psyntax renames all lexically-bound +identifiers. Original identifier names are preserved and given to the +compiler, but the interpreter will see the renamed variables, e.g., +`x432' instead of `x'. + +Note that the psyntax that Guile uses is a fork, as Guile already had +modules before incompatible modules were added to psyntax -- about 10 +years ago! Thus there are surely a number of bugs that have been fixed +in psyntax since then. If you find one, please notify bug-guile@gnu.org. + +** syntax-rules and syntax-case are available by default. + +There is no longer any need to import the `(ice-9 syncase)' module +(which is now deprecated). The expander may be invoked directly via +`sc-expand', though it is normally searched for via the current module +transformer. + +Also, the helper routines for syntax-case are available in the default +environment as well: `syntax->datum', `datum->syntax', +`bound-identifier=?', `free-identifier=?', `generate-temporaries', +`identifier?', and `syntax-violation'. See the R6RS for documentation. + +** Lexical bindings introduced by hygienic macros may not be referenced + by nonhygienic macros. + +If a lexical binding is introduced by a hygienic macro, it may not be +referenced by a nonhygienic macro. For example, this works: + + (let () + (define-macro (bind-x val body) + `(let ((x ,val)) ,body)) + (define-macro (ref x) + x) + (bind-x 10 (ref x))) + +But this does not: + + (let () + (define-syntax bind-x + (syntax-rules () + ((_ val body) (let ((x val)) body)))) + (define-macro (ref x) + x) + (bind-x 10 (ref x))) + +It is not normal to run into this situation with existing code. However, +as code is ported over from defmacros to syntax-case, it is possible to +run into situations like this. In the future, Guile will probably port +its `while' macro to syntax-case, which makes this issue one to know +about. + +** Macros may no longer be referenced as first-class values. + +In the past, you could evaluate e.g. `if', and get its macro value. Now, +expanding this form raises a syntax error. + +Macros still /exist/ as first-class values, but they must be +/referenced/ via the module system, e.g. `(module-ref (current-module) +'if)'. + +This decision may be revisited before the 2.0 release. Feedback welcome +to guile-devel@gnu.org (subscription required) or bug-guile@gnu.org (no +subscription required). + +** New macro type: syncase-macro + +XXX Need to decide whether to document this for 2.0, probably should: +make-syncase-macro, make-extended-syncase-macro, macro-type, +syncase-macro-type, syncase-macro-binding + +** A new `memoize-symbol' evaluator trap has been added. + +This trap can be used for efficiently implementing a Scheme code +coverage. ** Duplicate bindings among used modules are resolved lazily. + This slightly improves program startup times. ** New thread cancellation and thread cleanup API + See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'. +** Fix bad interaction between `false-if-exception' and stack-call. + +Exceptions thrown by `false-if-exception' were erronously causing the +stack to be saved, causing later errors to show the incorrectly-saved +backtrace. This has been fixed. + +** New global variables: %load-compiled-path, %load-compiled-extensions + +These are analogous to %load-path and %load-extensions. + +** New procedure, `make-promise' + +`(make-promise (lambda () foo))' is equivalent to `(delay foo)'. + +** New entry into %guile-build-info: `ccachedir' + +** Fix bug in `module-bound?'. + +`module-bound?' was returning true if a module did have a local +variable, but one that was unbound, but another imported module bound +the variable. This was an error, and was fixed. + +** `(ice-9 syncase)' has been deprecated. + +As syntax-case is available by default, importing `(ice-9 syncase)' has +no effect, and will trigger a deprecation warning. + * Changes to the C interface ** The GH interface (deprecated in version 1.6, 2001) was removed. @@ -40,12 +502,45 @@ application code. ** Functions for handling `scm_option' now no longer require an argument indicating length of the `scm_t_option' array. -** Primitive procedures (aka. "subrs") are now stored in double cells -This removes the subr table and simplifies the code. +** scm_primitive_load_path has additional argument, exception_on_error + +** New C function: scm_module_public_interface + +This procedure corresponds to Scheme's `module-public-interface'. + +** `scm_stat' has an additional argument, `exception_on_error' +** `scm_primitive_load_path' has an additional argument `exception_on_not_found' + +** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type + +Previously they would use the `off_t' type, which is fragile since its +definition depends on the application's value for `_FILE_OFFSET_BITS'. + +* Changes to the distribution + +** Guile's license is now LGPLv3+ + +In other words the GNU Lesser General Public License, version 3 or +later (at the discretion of each person that chooses to redistribute +part of Guile). + +** `guile-config' will be deprecated in favor of `pkg-config' + +`guile-config' has been rewritten to get its information from +`pkg-config', so this should be a transparent change. Note however that +guile.m4 has yet to be modified to call pkg-config instead of +guile-config. + +** New installation directory: $(pkglibdir)/1.9/ccache + +If $(libdir) is /usr/lib, for example, Guile will install its .go files +to /usr/lib/guile/1.9/ccache. These files are architecture-specific. + +** New dependency: GNU libunistring. + +See http://www.gnu.org/software/libunistring/. We hope to merge in +Unicode support in the next prerelease. -** Primitive procedures with more than 3 arguments (aka. "gsubrs") are -no longer implemented using the "compiled closure" mechanism. This -simplifies code and reduces both the storage and run-time overhead. Changes in 1.8.7 (since 1.8.6) @@ -193,13 +688,6 @@ lead to a stack overflow. ** Fixed shadowing of libc's on Tru64, which broke compilation ** Make sure all tests honor `$TMPDIR' -* Changes to the distribution - -** New FAQ - -We've started collecting Frequently Asked Questions (FAQ), and will -distribute these (with answers!) in future Guile releases. - Changes in 1.8.4 (since 1.8.3) diff --git a/README b/README index 4950229df..1f71b8afe 100644 --- a/README +++ b/README @@ -14,7 +14,7 @@ Guile versions with an odd middle number, i.e. 1.9.* are unstable development versions. Even middle numbers indicate stable versions. This has been the case since the 1.3.* series. -The next stable release will likely be version 1.10.0. +The next stable release will likely be version 2.0.0. Please send bug reports to bug-guile@gnu.org. @@ -27,24 +27,38 @@ Generic instructions for configuring and compiling Guile can be found in the INSTALL file. Guile specific information and configure options can be found below, including instructions for installing SLIB. -Guile requires a few external packages and can optionally use a number -of external packages such as `readline' when they are available. -Guile expects to be able to find these packages in the default -compiler setup, it does not try to make any special arrangements -itself. For example, for the `readline' package, Guile expects to be -able to find the include file , without passing -any special `-I' options to the compiler. +Guile depends on the following external libraries. +- libgmp +- libiconv +- libintl +- libltdl +- libunistring +It will also use the libreadline library if it is available. For each +of these there is a corresponding --with-XXX-prefix option that you +can use when invoking ./configure, if you have these libraries +installed in a location other than the standard places (/usr and +/usr/local). -If you installed an external package, and you used the --prefix -installation option to install it somewhere else than /usr/local, you -must arrange for your compiler to find it by default. If that -compiler is gcc, one convenient way of making such arrangements is to -use the --with-local-prefix option during installation, naming the -same directory as you used in the --prefix option of the package. In -particular, it is not good enough to use the same --prefix option when -you install gcc and the package; you need to use the ---with-local-prefix option as well. See the gcc documentation for -more details. +These options are provided by the Gnulib `havelib' module, and details +of how they work are documented in `Searching for Libraries' in the +Gnulib manual (http://www.gnu.org/software/gnulib/manual). The extent +to which they work on a given OS depends on whether that OS supports +encoding full library path names in executables (aka `rpath'). Also +note that using these options, and hence hardcoding full library path +names (where that is supported), makes it impossible to later move the +built executables and libraries to an installation location other than +the one that was specified at build time. + +Another possible approach is to set CPPFLAGS and LDFLAGS before +running configure, so that they include -I options for all the +non-standard places where you have installed header files and -L +options for all the non-standard places where you have installed +libraries. This will allow configure and make to find those headers +and libraries during the build. The locations found will not be +hardcoded into the build executables and libraries, so with this +approach you will probably also need to set LD_LIBRARY_PATH +correspondingly, to allow Guile to find the necessary libraries again +at runtime. Required External Packages ================================================ @@ -309,6 +323,7 @@ About This Distribution ============================================== Interesting files include: - LICENSE, which contains the exact terms of the Guile license. +- COPYING.LESSER, which contains the terms of the GNU Lesser General Public License. - COPYING, which contains the terms of the GNU General Public License. - INSTALL, which contains general instructions for building/installing Guile. - NEWS, which describes user-visible changes since the last release of Guile. diff --git a/THANKS b/THANKS index e3cf1e37c..47aa93cc7 100644 --- a/THANKS +++ b/THANKS @@ -13,6 +13,7 @@ Contributors since the last release: Kevin Ryde Bill Schottstaedt Richard Todd + Andy Wingo Sponsors since the last release: @@ -23,6 +24,7 @@ For fixes or providing information which led to a fix: David Allouche Martin Baulig Fabrice Bauzac + Sylvain Beucler Carlo Bramini Rob Browning Adrian Bunk @@ -84,6 +86,7 @@ For fixes or providing information which led to a fix: David Pirotte Carlos Pita Ken Raeburn + Juhani Rantanen Andreas Rottmann Hugh Sasse Werner Scheinast @@ -93,6 +96,7 @@ For fixes or providing information which led to a fix: Scott Shedden Alex Shinn Daniel Skarda + Dale Smith Cesar Strauss Rainer Tammer Richard Todd @@ -108,6 +112,7 @@ For fixes or providing information which led to a fix: Andreas Vögele Michael Talbot-Wilson Michael Tuexen + Mark H. Weaver Jon Wilson Andy Wingo Keith Wright diff --git a/am/Makefile.am b/am/Makefile.am index 2c49adb09..d1b7eccc7 100644 --- a/am/Makefile.am +++ b/am/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/am/maintainer-dirs b/am/maintainer-dirs index c64268de9..f1b741be7 100644 --- a/am/maintainer-dirs +++ b/am/maintainer-dirs @@ -5,17 +5,17 @@ ## This file is part of GUILE. ## ## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## it under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, write ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth ## Floor, Boston, MA 02110-1301 USA diff --git a/am/pre-inst-guile b/am/pre-inst-guile index 353908dfb..7993d1531 100644 --- a/am/pre-inst-guile +++ b/am/pre-inst-guile @@ -5,17 +5,17 @@ ## This file is part of GUILE. ## ## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## it under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, write ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth ## Floor, Boston, MA 02110-1301 USA diff --git a/benchmark-suite/benchmarks/bytevectors.bm b/benchmark-suite/benchmarks/bytevectors.bm index 9547a71df..a686a08c9 100644 --- a/benchmark-suite/benchmarks/bytevectors.bm +++ b/benchmark-suite/benchmarks/bytevectors.bm @@ -4,19 +4,20 @@ ;;; Copyright 2009 Ludovic Courtès ;;; ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2 of the License, or +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program; if not, write to the Free Software -;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this software; see the file COPYING.LESSER. If +;;; not, write to the Free Software Foundation, Inc., 51 Franklin +;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (benchmarks bytevector) :use-module (rnrs bytevector) diff --git a/benchmark-suite/benchmarks/read.bm b/benchmark-suite/benchmarks/read.bm index cb876b5ad..f11ca687a 100644 --- a/benchmark-suite/benchmarks/read.bm +++ b/benchmark-suite/benchmarks/read.bm @@ -2,20 +2,20 @@ ;;; ;;; Copyright (C) 2008 Free Software Foundation, Inc. ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3, or +;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this software; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301 USA +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this software; see the file COPYING.LESSER. If +;;; not, write to the Free Software Foundation, Inc., 51 Franklin +;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (benchmarks read) :use-module (benchmark-suite lib)) diff --git a/benchmark-suite/benchmarks/subr.bm b/benchmark-suite/benchmarks/subr.bm index 9c87a9921..ea0045650 100644 --- a/benchmark-suite/benchmarks/subr.bm +++ b/benchmark-suite/benchmarks/subr.bm @@ -2,20 +2,20 @@ ;;; ;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3, or +;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this software; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301 USA +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this software; see the file COPYING.LESSER. If +;;; not, write to the Free Software Foundation, Inc., 51 Franklin +;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (benchmarks subrs) :use-module (benchmark-suite lib)) diff --git a/benchmark-suite/benchmarks/uniform-vector-read.bm b/benchmark-suite/benchmarks/uniform-vector-read.bm index d288f0b44..d188b2b86 100644 --- a/benchmark-suite/benchmarks/uniform-vector-read.bm +++ b/benchmark-suite/benchmarks/uniform-vector-read.bm @@ -2,20 +2,20 @@ ;;; ;;; Copyright (C) 2008 Free Software Foundation, Inc. ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3, or +;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this software; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301 USA +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this software; see the file COPYING.LESSER. If +;;; not, write to the Free Software Foundation, Inc., 51 Franklin +;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (benchmarks uniform-vector-read) :use-module (benchmark-suite lib) diff --git a/benchmark-suite/guile-benchmark b/benchmark-suite/guile-benchmark index c4c6f23de..41cae06a1 100755 --- a/benchmark-suite/guile-benchmark +++ b/benchmark-suite/guile-benchmark @@ -7,20 +7,20 @@ ;;;; ;;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This program is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3, or (at your option) any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; GNU Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this software; see the file COPYING.LESSER. +;;;; If not, write to the Free Software Foundation, Inc., 51 Franklin +;;;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;;; Usage: [guile -e main -s] guile-benchmark [OPTIONS] [BENCHMARK ...] diff --git a/benchmark-suite/lib.scm b/benchmark-suite/lib.scm index 65491d735..65253c5ff 100644 --- a/benchmark-suite/lib.scm +++ b/benchmark-suite/lib.scm @@ -1,20 +1,20 @@ ;;;; benchmark-suite/lib.scm --- generic support for benchmarking ;;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This program is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3, or (at your option) any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; GNU Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this software; see the file COPYING.LESSER. +;;;; If not, write to the Free Software Foundation, Inc., 51 Franklin +;;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (benchmark-suite lib) :export ( diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 000000000..1cc53eb7c --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,183 @@ +#!/usr/bin/perl +# Convert git log output to ChangeLog format. + +my $VERSION = '2009-06-04 08:53'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008, 2009 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +{ + my $since_date = '1970-01-01 UTC'; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + ) or usage 1; + + my @cmd = (qw (git log --log-size), "--since=$since_date", + '--pretty=format:%ct %an <%ae>%n%n%s%n%b%n', @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + my @line = split "\n", $log; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + # If this line would be the same as the previous date/name/email + # line, then arrange not to print it. + if ($date_line ne $prev_date_line) + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + } + $prev_date_line = $date_line; + + # Omit "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + # Remove leading and trailing blank lines. + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic +} + +# Local Variables: +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/configure.in b/configure.in index 6568e524f..73fc15321 100644 --- a/configure.in +++ b/configure.in @@ -8,20 +8,20 @@ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, This file is part of GUILE -GUILE is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your -option) any later version. +GUILE is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. -GUILE is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +GUILE is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received a copy of the GNU General Public License -along with GUILE; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. +You should have received a copy of the GNU Lesser General Public +License along with GUILE; see the file COPYING.LESSER. If not, write +to the Free Software Foundation, Inc., 51 Franklin Street, Fifth +Floor, Boston, MA 02110-1301, USA. ]]) @@ -827,6 +827,7 @@ fi dnl GMP tests +AC_LIB_LINKFLAGS(gmp) AC_CHECK_LIB([gmp], [__gmpz_init], , [AC_MSG_ERROR([GNU MP not found, see README])]) @@ -1053,18 +1054,6 @@ if test $guile_cv_localtime_cache = yes; then AC_DEFINE(LOCALTIME_CACHE, 1, [Define if localtime caches the TZ setting.]) fi -dnl Test whether system calls are restartable by default on the -dnl current system. If they are not, we put a loop around every system -dnl call to check for EINTR (see SCM_SYSCALL) and do not attempt to -dnl change from the default behaviour. On the other hand, if signals -dnl are restartable then the loop is not installed and when libguile -dnl initialises it also resets the behaviour of each signal to cause a -dnl restart (in case a different runtime had a different default -dnl behaviour for some reason: e.g., different versions of linux seem -dnl to behave differently.) - -AC_SYS_RESTARTABLE_SYSCALLS - if test "$enable_regex" = yes; then if test "$ac_cv_header_regex_h" = yes || test "$ac_cv_header_rxposix_h" = yes || diff --git a/doc/Makefile.am b/doc/Makefile.am index f4e0718d6..0a6b14ed5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,23 +1,23 @@ ## Process this file with Automake to create Makefile.in ## -## Copyright (C) 1998, 2002, 2006, 2008 Free Software Foundation, Inc. +## Copyright (C) 1998, 2002, 2006, 2008, 2009 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu @@ -43,5 +43,3 @@ include $(top_srcdir)/am/maintainer-dirs guile-api.alist: guile-api.alist-FORCE ( cd $(top_builddir) ; $(mscripts)/update-guile-api.alist ) guile-api.alist-FORCE: - -info_TEXINFOS = guile-vm.texi diff --git a/doc/example-smob/image-type.c b/doc/example-smob/image-type.c index 68ecded9d..8dd998a50 100644 --- a/doc/example-smob/image-type.c +++ b/doc/example-smob/image-type.c @@ -2,20 +2,20 @@ * * Copyright (C) 1998, 2000, 2004, 2006 Free Software Foundation, Inc. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/doc/example-smob/myguile.c b/doc/example-smob/myguile.c index 9df3cf31b..30200dd03 100644 --- a/doc/example-smob/myguile.c +++ b/doc/example-smob/myguile.c @@ -2,20 +2,20 @@ * * Copyright (C) 1998, 2006 Free Software Foundation, Inc. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/doc/goops/Makefile.am b/doc/goops/Makefile.am index 03794c4de..49bfb29b9 100644 --- a/doc/goops/Makefile.am +++ b/doc/goops/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/doc/groupings.alist b/doc/groupings.alist index ed5bb1fca..a1748196f 100644 --- a/doc/groupings.alist +++ b/doc/groupings.alist @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Commentary: diff --git a/doc/guile-vm.texi b/doc/guile-vm.texi deleted file mode 100644 index 927c09e88..000000000 --- a/doc/guile-vm.texi +++ /dev/null @@ -1,1042 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename guile-vm.info -@settitle Guile VM Specification -@footnotestyle end -@setchapternewpage odd -@c %**end of header - -@set EDITION 0.6 -@set VERSION 0.6 -@set UPDATED 2005-04-26 - -@c Macro for instruction definitions. -@macro insn{} -Instruction -@end macro - -@c For Scheme procedure definitions. -@macro scmproc{} -Scheme Procedure -@end macro - -@c Scheme records. -@macro scmrec{} -Record -@end macro - -@ifinfo -@dircategory Scheme Programming -@direntry -* Guile VM: (guile-vm). Guile's Virtual Machine. -@end direntry - -This file documents Guile VM. - -Copyright @copyright{} 2000 Keisuke Nishida -Copyright @copyright{} 2005 Ludovic Court`es - -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -@ignore -Permission is granted to process this file through TeX and print the -results, provided the printed document carries a copying permission -notice identical to this one except for the removal of this paragraph -(this paragraph not being relevant to the printed manual). - -@end ignore -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation -approved by the Free Software Foundation. -@end ifinfo - -@titlepage -@title Guile VM Specification -@subtitle for Guile VM @value{VERSION} -@author Keisuke Nishida - -@page -@vskip 0pt plus 1filll -Edition @value{EDITION} @* -Updated for Guile VM @value{VERSION} @* -@value{UPDATED} @* - -Copyright @copyright{} 2000 Keisuke Nishida -Copyright @copyright{} 2005 Ludovic Court`es - -Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation -approved by the Free Software Foundation. -@end titlepage - -@contents - -@c ********************************************************************* -@node Top, Introduction, (dir), (dir) -@top Guile VM Specification - -This document would like to correspond to Guile VM @value{VERSION}. -However, be warned that important parts still correspond to version -0.0 and are not valid anymore. - -@menu -* Introduction:: -* Variable Management:: -* Instruction Set:: -* The Compiler:: -* Concept Index:: -* Function and Instruction Index:: -* Command and Variable Index:: - -@detailmenu - --- The Detailed Node Listing --- - -Instruction Set - -* Environment Control Instructions:: -* Branch Instructions:: -* Subprogram Control Instructions:: -* Data Control Instructions:: - -The Compiler - -* Overview:: -* The Language Front-Ends:: -* GHIL:: -* Compiling Scheme Code:: -* GLIL:: -* The Assembler:: - -@end detailmenu -@end menu - -@c ********************************************************************* -@node Introduction, Variable Management, Top, Top -@chapter What is Guile VM? - -A Guile VM has a set of registers and its own stack memory. Guile may -have more than one VM's. Each VM may execute at most one program at a -time. Guile VM is a CISC system so designed as to execute Scheme and -other languages efficiently. - -@unnumberedsubsec Registers - -@itemize -@item pc - Program counter ;; ip (instruction poiner) is better? -@item sp - Stack pointer -@item bp - Base pointer -@item ac - Accumulator -@end itemize - -@unnumberedsubsec Engine - -A VM may have one of three engines: reckless, regular, or debugging. -Reckless engine is fastest but dangerous. Regular engine is normally -fail-safe and reasonably fast. Debugging engine is safest and -functional but very slow. - -@unnumberedsubsec Memory - -Stack is the only memory that each VM owns. The other memory is shared -memory that is shared among every VM and other part of Guile. - -@unnumberedsubsec Program - -A VM program consists of a bytecode that is executed and an environment -in which execution is done. Each program is allocated in the shared -memory and may be executed by any VM. A program may call other programs -within a VM. - -@unnumberedsubsec Instruction - -Guile VM has dozens of system instructions and (possibly) hundreds of -functional instructions. Some Scheme procedures such as cons and car -are implemented as VM's builtin functions, which are very efficient. -Other procedures defined outside of the VM are also considered as VM's -functional features, since they do not change the state of VM. -Procedures defined within the VM are called subprograms. - -Most instructions deal with the accumulator (ac). The VM stores all -results from functions in ac, instead of pushing them into the stack. -I'm not sure whether this is a good thing or not. - -@node Variable Management, Instruction Set, Introduction, Top -@chapter Variable Management - -FIXME: This chapter needs to be reviewed so that it matches reality. -A more up-to-date description of the mechanisms described in this -section is given in @ref{Instruction Set}. - -A program may have access to local variables, external variables, and -top-level variables. - -@section Local/external variables - -A stack is logically divided into several blocks during execution. A -"block" is such a unit that maintains local variables and dynamic chain. -A "frame" is an upper level unit that maintains subprogram calls. - -@example - Stack - dynamic | | | | - chain +==========+ - = - | |local vars| | | - `-|block data| | block | - /|frame data| | | - | +----------+ - | - | |local vars| | | frame - `-|block data| | | - /+----------+ - | - | |local vars| | | - `-|block data| | | - /+==========+ - = - | |local vars| | | - `-|block data| | | - /|frame data| | | - | +----------+ - | - | | | | | -@end example - -The first block of each frame may look like this: - -@example - Address Data - ------- ---- - xxx0028 Local variable 2 - xxx0024 Local variable 1 - bp ->xxx0020 Local variable 0 - xxx001c Local link (block data) - xxx0018 External link (block data) - xxx0014 Stack pointer (block data) - xxx0010 Return address (frame data) - xxx000c Parent program (frame data) -@end example - -The base pointer (bp) always points to the lowest address of local -variables of the recent block. Local variables are referred as "bp[n]". -The local link field has a pointer to the dynamic parent of the block. -The parent's variables are referred as "bp[-1][n]", and grandparent's -are "bp[-1][-1][n]". Thus, any local variable is represented by its -depth and offset from the current bp. - -A variable may be "external", which is allocated in the shared memory. -The external link field of a block has a pointer to such a variable set, -which I call "fragment" (what should I call?). A fragment has a set of -variables and its own chain. - -@example - local external - chain| | chain - | +-----+ .--------, | - `-|block|--+->|external|-' - /+-----+ | `--------'\, - `-|block|--' | - /+-----+ .--------, | - `-|block|---->|external|-' - +-----+ `--------' - | | -@end example - -An external variable is referred as "bp[-2]->variables[n]" or -"bp[-2]->link->...->variables[n]". This is also represented by a pair -of depth and offset. At any point of execution, the value of bp -determines the current local link and external link, and thus the -current environment of a program. - -Other data fields are described later. - -@section Top-level variables - -Guile VM uses the same top-level variables as the regular Guile. A -program may have direct access to vcells. Currently this is done by -calling scm_intern0, but a program is possible to have any top-level -environment defined by the current module. - -@section Scheme and VM variable - -Let's think about the following Scheme code as an example: - -@example - (define (foo a) - (lambda (b) (list foo a b))) -@end example - -In the lambda expression, "foo" is a top-level variable, "a" is an -external variable, and "b" is a local variable. - -When a VM executes foo, it allocates a block for "a". Since "a" may be -externally referred from the closure, the VM creates a fragment with a -copy of "a" in it. When the VM evaluates the lambda expression, it -creates a subprogram (closure), associating the fragment with the -subprogram as its external environment. When the closure is executed, -its environment will look like this: - -@example - block Top-level: foo - +-------------+ - |local var: b | fragment - +-------------+ .-----------, - |external link|---->|variable: a| - +-------------+ `-----------' -@end example - -The fragment remains as long as the closure exists. - -@section Addressing mode - -Guile VM has five addressing modes: - -@itemize -@item Real address -@item Local position -@item External position -@item Top-level location -@item Constant object -@end itemize - -Real address points to the address in the real program and is only used -with the program counter (pc). - -Local position and external position are represented as a pair of depth -and offset from bp, as described above. These are base relative -addresses, and the real address may vary during execution. - -Top-level location is represented as a Guile's vcell. This location is -determined at loading time, so the use of this address is efficient. - -Constant object is not an address but gives an instruction an Scheme -object directly. - -[ We'll also need dynamic scope addressing to support Emacs Lisp? ] - - -Overall procedure: - -@enumerate -@item A source program is compiled into a bytecode. -@item A bytecode is given an environment and becomes a program. -@item A VM starts execution, creating a frame for it. -@item Whenever a program calls a subprogram, a new frame is created for it. -@item When a program finishes execution, it returns a value, and the VM - continues execution of the parent program. -@item When all programs terminated, the VM returns the final value and stops. -@end enumerate - - -@node Instruction Set, The Compiler, Variable Management, Top -@chapter Instruction Set - -The Guile VM instruction set is roughly divided two groups: system -instructions and functional instructions. System instructions control -the execution of programs, while functional instructions provide many -useful calculations. - -@menu -* Environment Control Instructions:: -* Branch Instructions:: -* Subprogram Control Instructions:: -* Data Control Instructions:: -@end menu - -@node Environment Control Instructions, Branch Instructions, Instruction Set, Instruction Set -@section Environment Control Instructions - -@deffn @insn{} link binding-name -Look up @var{binding-name} (a string) in the current environment and -push the corresponding variable object onto the stack. If -@var{binding-name} is not bound yet, then create a new binding and -push its variable object. -@end deffn - -@deffn @insn{} variable-ref -Dereference the variable object which is on top of the stack and -replace it by the value of the variable it represents. -@end deffn - -@deffn @insn{} variable-set -Set the value of the variable on top of the stack (at @code{sp[0]}) to -the object located immediately before (at @code{sp[-1]}). -@end deffn - -As an example, let us look at what a simple function call looks like: - -@example -(+ 2 3) -@end example - -This call yields the following sequence of instructions: - -@example -(link "+") ;; lookup binding "+" -(variable-ref) ;; dereference it -(make-int8 2) ;; push immediate value `2' -(make-int8 3) ;; push immediate value `3' -(tail-call 2) ;; call the proc at sp[-3] with two args -@end example - -@deffn @insn{} local-ref offset -Push onto the stack the value of the local variable located at -@var{offset} within the current stack frame. -@end deffn - -@deffn @insn{} local-set offset -Pop the Scheme object located on top of the stack and make it the new -value of the local variable located at @var{offset} within the current -stack frame. -@end deffn - -@deffn @insn{} external-ref offset -Push the value of the closure variable located at position -@var{offset} within the program's list of external variables. -@end deffn - -@deffn @insn{} external-set offset -Pop the Scheme object located on top of the stack and make it the new -value of the closure variable located at @var{offset} within the -program's list of external variables. -@end deffn - -@deffn @insn{} make-closure -Pop the program object from the stack and assign it the current -closure variable list as its closure. Push the result program -object. -@end deffn - -Let's illustrate this: - -@example -(let ((x 2)) - (lambda () - (let ((x++ (+ 1 x))) - (set! x x++) - x++))) -@end example - -The resulting program has one external (closure) variable, i.e. its -@var{nexts} is set to 1 (@pxref{Subprogram Control Instructions}). -This yields the following code: - -@example - ;; the traditional program prologue with NLOCS = 0 and NEXTS = 1 - - 0 (make-int8 2) - 2 (external-set 0) - 4 (make-int8 4) - 6 (link "+") ;; lookup `+' - 9 (vector 1) ;; create the external variable vector for - ;; later use by `object-ref' and `object-set' - ... - 40 (load-program ##34#) - 59 (make-closure) ;; assign the current closure to the program - ;; just pushed by `load-program' - 60 (return) -@end example - -The program loaded here by @var{load-program} contains the following -sequence of instructions: - -@example - 0 (object-ref 0) ;; push the variable for `+' - 2 (variable-ref) ;; dereference `+' - 3 (make-int8:1) ;; push 1 - 4 (external-ref 0) ;; push the value of `x' - 6 (call 2) ;; call `+' and push the result - 8 (local-set 0) ;; make it the new value of `x++' - 10 (local-ref 0) ;; push the value of `x++' - 12 (external-set 0) ;; make it the new value of `x' - 14 (local-ref 0) ;; push the value of `x++' - 16 (return) ;; return it -@end example - -At this point, you should know pretty much everything about the three -types of variables a program may need to access. - - -@node Branch Instructions, Subprogram Control Instructions, Environment Control Instructions, Instruction Set -@section Branch Instructions - -All the conditional branch instructions described below work in the -same way: - -@itemize -@item They take the Scheme object located on the stack and use it as -the branch condition; -@item If the condition if false, then program execution continues with -the next instruction; -@item If the condition is true, then the instruction pointer is -increased by the offset passed as an argument to the branch -instruction; -@item Finally, when the instruction finished, the condition object is -removed from the stack. -@end itemize - -Note that the offset passed to the instruction is encoded on two 8-bit -integers which are then combined by the VM as one 16-bit integer. - -@deffn @insn{} br offset -Jump to @var{offset}. -@end deffn - -@deffn @insn{} br-if offset -Jump to @var{offset} if the condition on the stack is not false. -@end deffn - -@deffn @insn{} br-if-not offset -Jump to @var{offset} if the condition on the stack is false. -@end deffn - -@deffn @insn{} br-if-eq offset -Jump to @var{offset} if the two objects located on the stack are -equal in the sense of @var{eq?}. Note that, for this instruction, the -stack pointer is decremented by two Scheme objects instead of only -one. -@end deffn - -@deffn @insn{} br-if-not-eq offset -Same as @var{br-if-eq} for non-equal objects. -@end deffn - -@deffn @insn{} br-if-null offset -Jump to @var{offset} if the object on the stack is @code{'()}. -@end deffn - -@deffn @insn{} br-if-not-null offset -Jump to @var{offset} if the object on the stack is not @code{'()}. -@end deffn - - -@node Subprogram Control Instructions, Data Control Instructions, Branch Instructions, Instruction Set -@section Subprogram Control Instructions - -Programs (read: ``compiled procedure'') may refer to external -bindings, like variables or functions defined outside the program -itself, in the environment in which it will evaluate at run-time. In -a sense, a program's environment and its bindings are an implicit -parameter of every program. - -@cindex object table -In order to handle such bindings, each program has an @dfn{object -table} associated to it. This table (actually a Scheme vector) -contains all constant objects referenced by the program. The object -table of a program is initialized right before a program is loaded -with @var{load-program}. - -Variable objects are one such type of constant object: when a global -binding is defined, a variable object is associated to it and that -object will remain constant over time, even if the value bound to it -changes. Therefore, external bindings only need to be looked up once -when the program is loaded. References to the corresponding external -variables from within the program are then performed via the -@var{object-ref} instruction and are almost as fast as local variable -references. - -Let us consider the following program (procedure) which references -external bindings @code{frob} and @var{%magic}: - -@example -(lambda (x) - (frob x %magic)) -@end example - -This yields the following assembly code: - -@example -(make-int8 64) ;; number of args, vars, etc. (see below) -(link "frob") -(link "%magic") -(vector 2) ;; object table (external bindings) -... -(load-program #u8(20 0 23 21 0 20 1 23 36 2)) -(return) -@end example - -All the instructions occurring before @var{load-program} (some were -omitted for simplicity) form a @dfn{prologue} which, among other -things, pushed an object table (a vector) that contains the variable -objects for the variables bound to @var{frob} and @var{%magic}. This -vector and other data pushed onto the stack are then popped by the -@var{load-program} instruction. - -Besides, the @var{load-program} instruction takes one explicit -argument which is the bytecode of the program itself. Disassembled, -this bytecode looks like: - -@example -(object-ref 0) ;; push the variable object of `frob' -(variable-ref) ;; dereference it -(local-ref 0) ;; push the value of `x' -(object-ref 1) ;; push the variable object of `%magic' -(variable-ref) ;; dereference it -(tail-call 2) ;; call `frob' with two parameters -@end example - -This clearly shows that there is little difference between references -to local variables and references to externally bound variables since -lookup of externally bound variables if performed only once before the -program is run. - -@deffn @insn{} load-program bytecode -Load the program whose bytecode is @var{bytecode} (a u8vector), pop -its meta-information from the stack, and push a corresponding program -object onto the stack. The program's meta-information may consist of -(in the order in which it should be pushed onto the stack): - -@itemize -@item optionally, a pair representing meta-data (see the -@var{program-meta} procedure); [FIXME: explain their meaning] -@item optionally, a vector which is the program's object table (a -program that does not reference external bindings does not need an -object table); -@item either one immediate integer or four immediate integers -representing respectively the number of arguments taken by the -function (@var{nargs}), the number of @dfn{rest arguments} -(@var{nrest}, 0 or 1), the number of local variables (@var{nlocs}) and -the number of external variables (@var{nexts}) (@pxref{Environment -Control Instructions}). -@end itemize - -@end deffn - -@deffn @insn{} object-ref offset -Push the variable object for the external variable located at -@var{offset} within the program's object table. -@end deffn - -@deffn @insn{} return -Free the program's frame. -@end deffn - -@deffn @insn{} call nargs -Call the procedure, continuation or program located at -@code{sp[-nargs]} with the @var{nargs} arguments located from -@code{sp[0]} to @code{sp[-nargs + 1]}. The -procedure/continuation/program and its arguments are dropped from the -stack and the result is pushed. When calling a program, the -@code{call} instruction reserves room for its local variables on the -stack, and initializes its list of closure variables and its vector of -externally bound variables. -@end deffn - -@deffn @insn{} tail-call nargs -Same as @code{call} except that, for tail-recursive calls to a -program, the current stack frame is re-used, as required by RnRS. -This instruction is otherwise similar to @code{call}. -@end deffn - - -@node Data Control Instructions, , Subprogram Control Instructions, Instruction Set -@section Data Control Instructions - -@deffn @insn{} make-int8 value -Push @var{value}, an 8-bit integer, onto the stack. -@end deffn - -@deffn @insn{} make-int8:0 -Push the immediate value @code{0} onto the stack. -@end deffn - -@deffn @insn{} make-int8:1 -Push the immediate value @code{1} onto the stack. -@end deffn - -@deffn @insn{} make-false -Push @code{#f} onto the stack. -@end deffn - -@deffn @insn{} make-true -Push @code{#t} onto the stack. -@end deffn - -@itemize -@item %push -@item %pushi -@item %pushl, %pushl:0:0, %pushl:0:1, %pushl:0:2, %pushl:0:3 -@item %pushe, %pushe:0:0, %pushe:0:1, %pushe:0:2, %pushe:0:3 -@item %pusht -@end itemize - -@itemize -@item %loadi -@item %loadl, %loadl:0:0, %loadl:0:1, %loadl:0:2, %loadl:0:3 -@item %loade, %loade:0:0, %loade:0:1, %loade:0:2, %loade:0:3 -@item %loadt -@end itemize - -@itemize -@item %savei -@item %savel, %savel:0:0, %savel:0:1, %savel:0:2, %savel:0:3 -@item %savee, %savee:0:0, %savee:0:1, %savee:0:2, %savee:0:3 -@item %savet -@end itemize - -@section Flow control instructions - -@itemize -@item %br-if -@item %br-if-not -@item %jump -@end itemize - -@section Function call instructions - -@itemize -@item %func, %func0, %func1, %func2 -@end itemize - -@section Scheme built-in functions - -@itemize -@item cons -@item car -@item cdr -@end itemize - -@section Mathematical buitin functions - -@itemize -@item 1+ -@item 1- -@item add, add2 -@item sub, sub2, minus -@item mul2 -@item div2 -@item lt2 -@item gt2 -@item le2 -@item ge2 -@item num-eq2 -@end itemize - - - -@node The Compiler, Concept Index, Instruction Set, Top -@chapter The Compiler - -This section describes Guile-VM's compiler and the compilation process -to produce bytecode executable by the VM itself (@pxref{Instruction -Set}). - -@menu -* Overview:: -* The Language Front-Ends:: -* GHIL:: -* Compiling Scheme Code:: -* GLIL:: -* The Assembler:: -@end menu - -@node Overview, The Language Front-Ends, The Compiler, The Compiler -@section Overview - -Compilation in Guile-VM is a three-stage process: - -@cindex intermediate language -@cindex assembler -@cindex compiler -@cindex GHIL -@cindex GLIL -@cindex bytecode - -@enumerate -@item the source programming language (e.g. R5RS Scheme) is read and -translated into GHIL, @dfn{Guile's High-Level Intermediate Language}; -@item GHIL code is then translated into a lower-level intermediate -language call GLIL, @dfn{Guile's Low-Level Intermediate Language}; -@item finally, GLIL is @dfn{assembled} into the VM's assembly language -(@pxref{Instruction Set}) and bytecode. -@end enumerate - -The use of two separate intermediate languages eases the -implementation of front-ends since the gap between high-level -languages like Scheme and GHIL is relatively small. - -@vindex guilec -From an end-user viewpoint, compiling a Guile program into bytecode -can be done either by using the @command{guilec} command-line tool, or -by using the @code{compile-file} procedure exported by the -@code{(system base compile)} module. - -@deffn @scmproc{} compile-file file . opts -Compile Scheme source code from file @var{file} using compilation -options @var{opts}. The resulting file, a Guile object file, will be -name according the application of the @code{compiled-file-name} -procedure to @var{file}. The possible values for @var{opts} are the -same as for the @code{compile-in} procedure (see below, @pxref{The Language -Front-Ends}). -@end deffn - -@deffn @scmproc{} compiled-file-name file -Given source file name @var{file} (a string), return a string that -denotes the name of the Guile object file corresponding to -@var{file}. By default, the file name returned is @var{file} minus -its extension and plus the @code{.go} file extension. -@end deffn - -@cindex self-hosting -It is worth noting, as you might have already guessed, that Guile-VM's -compiler is written in Guile Scheme and is @dfn{self-hosted}: it can -compile itself. - -@node The Language Front-Ends, GHIL, Overview, The Compiler -@section The Language Front-Ends - -Guile-VM comes with a number of @dfn{language front-ends}, that is, -code that can read a given high-level programming language like R5RS -Scheme, and translate it into a lower-level representation suitable to -the compiler. - -Each language front-end provides a @dfn{specification} and a -@dfn{translator} to GHIL. Both of them come in the @code{language} -module hierarchy. As an example, the front-end for Scheme is located -in the @code{(language scheme spec)} and @code{(language scheme -translate)} modules. Language front-ends can then be retrieved using -the @code{lookup-language} procedure of the @code{(system base -language)} module. - -@deftp @scmrec{} name title version reader printer read-file expander translator evaluator environment -Denotes a language front-end specification a various methods used by -the compiler to handle source written in that language. Of particular -interest is the @code{translator} slot (@pxref{GHIL}). -@end deftp - -@deffn @scmproc{} lookup-language lang -Look for a language front-end named @var{lang}, a symbol (e.g, -@code{scheme}), and return the @code{} record describing it -if found. If @var{lang} does not denote a language front-end, an -error is raised. Note that this procedure assumes that language -@var{lang} exists if there exist a @code{(language @var{lang} spec)} -module. -@end deffn - -The @code{(system base compile)} module defines a procedure similar to -@code{compile-file} but that is not limited to the Scheme language: - -@deffn @scmproc{} compile-in expr env lang . opts -Compile expression @var{expr}, which is written in language @var{lang} -(a @code{} object), using compilation options @var{opts}, -and return bytecode as produced by the assembler (@pxref{The -Assembler}). - -Options @var{opts} may contain the following keywords: - -@table @code -@item :e -compilation will stop after the code expansion phase. -@item :t -compilation will stop after the code translation phase, i.e. after -code in the source language @var{lang} has been translated into GHIL -(@pxref{GHIL}). -@item :c -compilation will stop after the compilation phase and before the -assembly phase, i.e. once GHIL has been translated into GLIL -(@pxref{GLIL}). -@end table - -Additionally, @var{opts} may contain any option understood by the -GHIL-to-GLIL compiler described in @xref{GLIL}. -@end deffn - - -@node GHIL, Compiling Scheme Code, The Language Front-Ends, The Compiler -@section Guile's High-Level Intermediate Language - -GHIL has constructs almost equivalent to those found in Scheme. -However, unlike Scheme, it is meant to be read only by the compiler -itself. Therefore, a sequence of GHIL code is only a sequence of GHIL -@emph{objects} (records), as opposed to symbols, each of which -represents a particular language feature. These records are all -defined in the @code{(system il ghil)} module and are named -@code{}. - -Each GHIL record has at least two fields: one containing the -environment (Guile module) in which it is considered, and one -containing its location [FIXME: currently seems to be unused]. Below -is a list of the main GHIL object types and their fields: - -@example -;; Objects -( env loc) -( env loc obj) -( env loc exp) -( env loc exp) -( env loc exp) -;; Variables -( env loc var) -( env loc var val) -( env loc var val) -;; Controls -( env loc test then else) -( env loc exps) -( env loc exps) -( env loc exps) -( env loc vars vals body) -( env loc vars rest body) -( env loc proc args) -( env loc inline args) -@end example - -As can be seen from this examples, the constructs in GHIL are pretty -close to the fundamental primitives of Scheme. - -It is the role of front-end language translators (@pxref{The Language -Front-Ends}) to produce a sequence of GHIL objects from the -human-readable, source programming language. The next section -describes the translator for the Scheme language. - -@node Compiling Scheme Code, GLIL, GHIL, The Compiler -@section Compiling Scheme Code - -The language object for Scheme, as returned by @code{(lookup-language -'scheme)} (@pxref{The Language Front-Ends}), defines a translator -procedure that returns a sequence of GHIL objects given Scheme code. -Before actually performing this operation, the Scheme translator -expands macros in the original source code. - -The macros that may be expanded can come from different sources: - -@itemize -@item core Guile macros, such as @code{false-if-exception}; -@item macros defined in modules used by the module being compiled, -e.g., @code{receive} in @code{(ice-9 receive)}; -@item macros defined within the module being compiled. -@end itemize - -@cindex macro -@cindex syntax transformer -@findex define-macro -@findex defmacro -The main complexity in handling macros at compilation time is that -Guile's macros are first-class objects. For instance, when using -@code{define-macro}, one actually defines a @emph{procedure} that -returns code; of course, unlike a ``regular'' procedure, it is -executed when an S-exp is @dfn{memoized} by the evaluator, i.e., -before the actual evaluation takes place. Worse, it is possible to -turn a procedure into a macro, or @dfn{syntax transformer}, thus -removing, to some extent, the boundary between the macro expansion and -evaluation phases, @inforef{Internal Macros, , guile}. - -[FIXME: explain limitations, etc.] - - -@node GLIL, The Assembler, Compiling Scheme Code, The Compiler -@section Guile's Low-Level Intermediate Language - -A GHIL instruction sequence can be compiled into GLIL using the -@code{compile} procedure exported by the @code{(system il compile)} -module. During this translation process, various optimizations may -also be performed. - -The module @code{(system il glil)} defines record types representing -various low-level abstractions. Compared to GHIL, the flow control -primitives in GLIL are much more low-level: only @code{}, -@code{} and @code{} are available, no -@code{lambda}, @code{if}, etc. - - -@deffn @scmproc{} compile ghil environment . opts -Compile @var{ghil}, a GHIL instruction sequence, within -environment/module @var{environment}, and return the resulting GLIL -instruction sequence. The option list @var{opts} may be either the -empty list or a list containing the @code{:O} keyword in which case -@code{compile} will first go through an optimization stage of -@var{ghil}. - -Note that the @code{:O} option may be passed at a higher-level to the -@code{compile-file} and @code{compile-in} procedures (@pxref{The -Language Front-Ends}). -@end deffn - -@deffn @scmproc{} pprint-glil glil . port -Print @var{glil}, a GLIL sequence instructions, in a human-readable -form. If @var{port} is passed, it will be used as the output port. -@end deffn - - -Let's consider the following Scheme expression: - -@example -(lambda (x) (+ x 1)) -@end example - -The corresponding (unoptimized) GLIL code, as shown by -@code{pprint-glil}, looks like this: - -@example -(@@asm (0 0 0 0) - (@@asm (1 0 0 0) ;; expect one arg. - (@@bind (x argument 0)) ;; debugging info - (module-ref #f +) ;; lookup `+' - (argument-ref 0) ;; push the argument onto - ;; the stack - (const 1) ;; push `1' - (tail-call 2) ;; call `+', with 2 args, - ;; using the same stack frame - (@@source 15 33)) ;; additional debugging info - (return 0)) -@end example - -This is not unlike the VM's assembly language described in -@ref{Instruction Set}. - -@node The Assembler, , GLIL, The Compiler -@section The Assembler - -@findex code->bytes - -The final compilation step consists in converting the GLIL instruction -sequence into VM bytecode. This is what the @code{assemble} procedure -defined in the @code{(system vm assemble)} module is for. It relies -on the @code{code->bytes} procedure of the @code{(system vm conv)} -module to convert instructions (represented as lists whose @code{car} -is a symbol naming the instruction, e.g. @code{object-ref}, -@pxref{Instruction Set}) into binary code, or @dfn{bytecode}. -Bytecode itself is represented using SRFI-4 byte vectors, -@inforef{SRFI-4, SRFI-4 homogeneous numeric vectors, guile}. - - -@deffn @scmproc{} assemble glil environment . opts -Return a binary representation of @var{glil} (bytecode), either in the -form of an SRFI-4 @code{u8vector} or a @code{} object. -[FIXME: Why is that?] -@end deffn - - - -@c ********************************************************************* -@node Concept Index, Function and Instruction Index, The Compiler, Top -@unnumbered Concept Index -@printindex cp - -@node Function and Instruction Index, Command and Variable Index, Concept Index, Top -@unnumbered Function and Instruction Index -@printindex fn - -@node Command and Variable Index, , Function and Instruction Index, Top -@unnumbered Command and Variable Index -@printindex vr - -@bye - -@c Local Variables: -@c ispell-local-dictionary: "american"; -@c End: - -@c LocalWords: bytecode diff --git a/doc/maint/docstring.el b/doc/maint/docstring.el index 2b5639eb6..ef271930f 100644 --- a/doc/maint/docstring.el +++ b/doc/maint/docstring.el @@ -2,22 +2,22 @@ ;;; ;;; Copyright (C) 2001, 2004 Neil Jerram ;;; -;;; This file is not part of GNU Emacs, but the same permissions apply. +;;; This file is not part of GUILE, but the same permissions apply. ;;; -;;; GNU Emacs is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. +;;; GUILE is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU Lesser General Public License as +;;; published by the Free Software Foundation; either version 3, or +;;; (at your option) any later version. ;;; -;;; GNU Emacs is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GUILE is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Emacs; see the file COPYING. If not, write to the -;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301, USA. +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with GUILE; see the file COPYING.LESSER. If not, +;;; write to the Free Software Foundation, Inc., 51 Franklin Street, +;;; Fifth Floor, Boston, MA 02110-1301, USA. ;;; Commentary: diff --git a/doc/oldfmt.c b/doc/oldfmt.c index fc82ba92a..f60afeddd 100644 --- a/doc/oldfmt.c +++ b/doc/oldfmt.c @@ -1,18 +1,19 @@ /* Copyright (C) 2000,2001, 2006, 2008 Free Software Foundation, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/doc/r5rs/Makefile.am b/doc/r5rs/Makefile.am index 4af0c951a..c64e4ffb1 100644 --- a/doc/r5rs/Makefile.am +++ b/doc/r5rs/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/doc/ref/Makefile.am b/doc/ref/Makefile.am index 9d73e5da8..abf42edfe 100644 --- a/doc/ref/Makefile.am +++ b/doc/ref/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi index f3fe9584a..b3997efd7 100644 --- a/doc/ref/api-compound.texi +++ b/doc/ref/api-compound.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -1405,6 +1405,12 @@ C}), but returns a pointer to the elements of a uniform numeric vector of the indicated kind. @end deftypefn +Uniform numeric vectors can be written to and read from input/output +ports using the procedures listed below. However, bytevectors may often +be more convenient for binary input/output since they provide more +flexibility in the interpretation of raw byte sequences +(@pxref{Bytevectors}). + @deffn {Scheme Procedure} uniform-vector-read! uvec [port_or_fd [start [end]]] @deffnx {C Function} scm_uniform_vector_read_x (uvec, port_or_fd, start, end) Fill the elements of @var{uvec} by reading @@ -1643,18 +1649,18 @@ and writing. @subsection Generalized Vectors Guile has a number of data types that are generally vector-like: -strings, uniform numeric vectors, bitvectors, and of course ordinary -vectors of arbitrary Scheme values. These types are disjoint: a -Scheme value belongs to at most one of the four types listed above. +strings, uniform numeric vectors, bytevectors, bitvectors, and of course +ordinary vectors of arbitrary Scheme values. These types are disjoint: +a Scheme value belongs to at most one of the five types listed above. If you want to gloss over this distinction and want to treat all four types with common code, you can use the procedures in this section. They work with the @emph{generalized vector} type, which is the union -of the four vector-like types. +of the five vector-like types. @deffn {Scheme Procedure} generalized-vector? obj @deffnx {C Function} scm_generalized_vector_p (obj) -Return @code{#t} if @var{obj} is a vector, string, +Return @code{#t} if @var{obj} is a vector, bytevector, string, bitvector, or uniform numeric vector. @end deffn @@ -1743,9 +1749,9 @@ matrix with zero columns and 3 rows is different from a matrix with 3 columns and zero rows, which again is different from a vector of length zero. -Generalized vectors, such as strings, uniform numeric vectors, bit -vectors and ordinary vectors, are the special case of one dimensional -arrays. +Generalized vectors, such as strings, uniform numeric vectors, +bytevectors, bit vectors and ordinary vectors, are the special case of +one dimensional arrays. @menu * Array Syntax:: @@ -1828,6 +1834,16 @@ is a rank-zero array with contents 12. @end table +In addition, bytevectors are also arrays, but use a different syntax +(@pxref{Bytevectors}): + +@table @code + +@item #vu8(1 2 3) +is a 3-byte long bytevector, with contents 1, 2, 3. + +@end table + @node Array Procedures @subsubsection Array Procedures diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index b529199db..6e1a67ae1 100755 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -45,6 +45,7 @@ For the documentation of such @dfn{compound} data types, see * Characters:: Single characters. * Character Sets:: Sets of characters. * Strings:: Sequences of characters. +* Bytevectors:: Sequences of bytes. * Regular Expressions:: Pattern matching and substitution. * Symbols:: Symbols. * Keywords:: Self-quoting, customizable display keywords. @@ -3746,6 +3747,445 @@ is larger than @var{max_len}, only @var{max_len} bytes have been stored and you probably need to try again with a larger buffer. @end deftypefn +@node Bytevectors +@subsection Bytevectors + +@cindex bytevector +@cindex R6RS + +A @dfn{bytevector} is a raw bit string. The @code{(rnrs bytevector)} +module provides the programming interface specified by the +@uref{http://www.r6rs.org/, Revised^6 Report on the Algorithmic Language +Scheme (R6RS)}. It contains procedures to manipulate bytevectors and +interpret their contents in a number of ways: bytevector contents can be +accessed as signed or unsigned integer of various sizes and endianness, +as IEEE-754 floating point numbers, or as strings. It is a useful tool +to encode and decode binary data. + +The R6RS (Section 4.3.4) specifies an external representation for +bytevectors, whereby the octets (integers in the range 0--255) contained +in the bytevector are represented as a list prefixed by @code{#vu8}: + +@lisp +#vu8(1 53 204) +@end lisp + +denotes a 3-byte bytevector containing the octets 1, 53, and 204. Like +string literals, booleans, etc., bytevectors are ``self-quoting'', i.e., +they do not need to be quoted: + +@lisp +#vu8(1 53 204) +@result{} #vu8(1 53 204) +@end lisp + +Bytevectors can be used with the binary input/output primitives of the +R6RS (@pxref{R6RS I/O Ports}). + +@menu +* Bytevector Endianness:: Dealing with byte order. +* Bytevector Manipulation:: Creating, copying, manipulating bytevectors. +* Bytevectors as Integers:: Interpreting bytes as integers. +* Bytevectors and Integer Lists:: Converting to/from an integer list. +* Bytevectors as Floats:: Interpreting bytes as real numbers. +* Bytevectors as Strings:: Interpreting bytes as Unicode strings. +* Bytevectors as Generalized Vectors:: Guile extension to the bytevector API. +@end menu + +@node Bytevector Endianness +@subsubsection Endianness + +@cindex endianness +@cindex byte order +@cindex word order + +Some of the following procedures take an @var{endianness} parameter. +The @dfn{endianness} is defined as the order of bytes in multi-byte +numbers: numbers encoded in @dfn{big endian} have their most +significant bytes written first, whereas numbers encoded in +@dfn{little endian} have their least significant bytes +first@footnote{Big-endian and little-endian are the most common +``endiannesses'', but others do exist. For instance, the GNU MP +library allows @dfn{word order} to be specified independently of +@dfn{byte order} (@pxref{Integer Import and Export,,, gmp, The GNU +Multiple Precision Arithmetic Library Manual}).}. + +Little-endian is the native endianness of the IA32 architecture and +its derivatives, while big-endian is native to SPARC and PowerPC, +among others. The @code{native-endianness} procedure returns the +native endianness of the machine it runs on. + +@deffn {Scheme Procedure} native-endianness +@deffnx {C Function} scm_native_endianness () +Return a value denoting the native endianness of the host machine. +@end deffn + +@deffn {Scheme Macro} endianness symbol +Return an object denoting the endianness specified by @var{symbol}. If +@var{symbol} is neither @code{big} nor @code{little} then an error is +raised at expand-time. +@end deffn + +@defvr {C Variable} scm_endianness_big +@defvrx {C Variable} scm_endianness_little +The objects denoting big- and little-endianness, respectively. +@end defvr + + +@node Bytevector Manipulation +@subsubsection Manipulating Bytevectors + +Bytevectors can be created, copied, and analyzed with the following +procedures and C functions. + +@deffn {Scheme Procedure} make-bytevector len [fill] +@deffnx {C Function} scm_make_bytevector (len, fill) +@deffnx {C Function} scm_c_make_bytevector (size_t len) +Return a new bytevector of @var{len} bytes. Optionally, if @var{fill} +is given, fill it with @var{fill}; @var{fill} must be in the range +[-128,255]. +@end deffn + +@deffn {Scheme Procedure} bytevector? obj +@deffnx {C Function} scm_bytevector_p (obj) +Return true if @var{obj} is a bytevector. +@end deffn + +@deftypefn {C Function} int scm_is_bytevector (SCM obj) +Equivalent to @code{scm_is_true (scm_bytevector_p (obj))}. +@end deftypefn + +@deffn {Scheme Procedure} bytevector-length bv +@deffnx {C Function} scm_bytevector_length (bv) +Return the length in bytes of bytevector @var{bv}. +@end deffn + +@deftypefn {C Function} size_t scm_c_bytevector_length (SCM bv) +Likewise, return the length in bytes of bytevector @var{bv}. +@end deftypefn + +@deffn {Scheme Procedure} bytevector=? bv1 bv2 +@deffnx {C Function} scm_bytevector_eq_p (bv1, bv2) +Return is @var{bv1} equals to @var{bv2}---i.e., if they have the same +length and contents. +@end deffn + +@deffn {Scheme Procedure} bytevector-fill! bv fill +@deffnx {C Function} scm_bytevector_fill_x (bv, fill) +Fill bytevector @var{bv} with @var{fill}, a byte. +@end deffn + +@deffn {Scheme Procedure} bytevector-copy! source source-start target target-start len +@deffnx {C Function} scm_bytevector_copy_x (source, source_start, target, target_start, len) +Copy @var{len} bytes from @var{source} into @var{target}, starting +reading from @var{source-start} (a positive index within @var{source}) +and start writing at @var{target-start}. +@end deffn + +@deffn {Scheme Procedure} bytevector-copy bv +@deffnx {C Function} scm_bytevector_copy (bv) +Return a newly allocated copy of @var{bv}. +@end deffn + +@deftypefn {C Function} scm_t_uint8 scm_c_bytevector_ref (SCM bv, size_t index) +Return the byte at @var{index} in bytevector @var{bv}. +@end deftypefn + +@deftypefn {C Function} void scm_c_bytevector_set_x (SCM bv, size_t index, scm_t_uint8 value) +Set the byte at @var{index} in @var{bv} to @var{value}. +@end deftypefn + +Low-level C macros are available. They do not perform any +type-checking; as such they should be used with care. + +@deftypefn {C Macro} size_t SCM_BYTEVECTOR_LENGTH (bv) +Return the length in bytes of bytevector @var{bv}. +@end deftypefn + +@deftypefn {C Macro} {signed char *} SCM_BYTEVECTOR_CONTENTS (bv) +Return a pointer to the contents of bytevector @var{bv}. +@end deftypefn + + +@node Bytevectors as Integers +@subsubsection Interpreting Bytevector Contents as Integers + +The contents of a bytevector can be interpreted as a sequence of +integers of any given size, sign, and endianness. + +@lisp +(let ((bv (make-bytevector 4))) + (bytevector-u8-set! bv 0 #x12) + (bytevector-u8-set! bv 1 #x34) + (bytevector-u8-set! bv 2 #x56) + (bytevector-u8-set! bv 3 #x78) + + (map (lambda (number) + (number->string number 16)) + (list (bytevector-u8-ref bv 0) + (bytevector-u16-ref bv 0 (endianness big)) + (bytevector-u32-ref bv 0 (endianness little))))) + +@result{} ("12" "1234" "78563412") +@end lisp + +The most generic procedures to interpret bytevector contents as integers +are described below. + +@deffn {Scheme Procedure} bytevector-uint-ref bv index endianness size +@deffnx {Scheme Procedure} bytevector-sint-ref bv index endianness size +@deffnx {C Function} scm_bytevector_uint_ref (bv, index, endianness, size) +@deffnx {C Function} scm_bytevector_sint_ref (bv, index, endianness, size) +Return the @var{size}-byte long unsigned (resp. signed) integer at +index @var{index} in @var{bv}, decoded according to @var{endianness}. +@end deffn + +@deffn {Scheme Procedure} bytevector-uint-set! bv index value endianness size +@deffnx {Scheme Procedure} bytevector-sint-set! bv index value endianness size +@deffnx {C Function} scm_bytevector_uint_set_x (bv, index, value, endianness, size) +@deffnx {C Function} scm_bytevector_sint_set_x (bv, index, value, endianness, size) +Set the @var{size}-byte long unsigned (resp. signed) integer at +@var{index} to @var{value}, encoded according to @var{endianness}. +@end deffn + +The following procedures are similar to the ones above, but specialized +to a given integer size: + +@deffn {Scheme Procedure} bytevector-u8-ref bv index +@deffnx {Scheme Procedure} bytevector-s8-ref bv index +@deffnx {Scheme Procedure} bytevector-u16-ref bv index endianness +@deffnx {Scheme Procedure} bytevector-s16-ref bv index endianness +@deffnx {Scheme Procedure} bytevector-u32-ref bv index endianness +@deffnx {Scheme Procedure} bytevector-s32-ref bv index endianness +@deffnx {Scheme Procedure} bytevector-u64-ref bv index endianness +@deffnx {Scheme Procedure} bytevector-s64-ref bv index endianness +@deffnx {C Function} scm_bytevector_u8_ref (bv, index) +@deffnx {C Function} scm_bytevector_s8_ref (bv, index) +@deffnx {C Function} scm_bytevector_u16_ref (bv, index, endianness) +@deffnx {C Function} scm_bytevector_s16_ref (bv, index, endianness) +@deffnx {C Function} scm_bytevector_u32_ref (bv, index, endianness) +@deffnx {C Function} scm_bytevector_s32_ref (bv, index, endianness) +@deffnx {C Function} scm_bytevector_u64_ref (bv, index, endianness) +@deffnx {C Function} scm_bytevector_s64_ref (bv, index, endianness) +Return the unsigned @var{n}-bit (signed) integer (where @var{n} is 8, +16, 32 or 64) from @var{bv} at @var{index}, decoded according to +@var{endianness}. +@end deffn + +@deffn {Scheme Procedure} bytevector-u8-set! bv index value +@deffnx {Scheme Procedure} bytevector-s8-set! bv index value +@deffnx {Scheme Procedure} bytevector-u16-set! bv index value endianness +@deffnx {Scheme Procedure} bytevector-s16-set! bv index value endianness +@deffnx {Scheme Procedure} bytevector-u32-set! bv index value endianness +@deffnx {Scheme Procedure} bytevector-s32-set! bv index value endianness +@deffnx {Scheme Procedure} bytevector-u64-set! bv index value endianness +@deffnx {Scheme Procedure} bytevector-s64-set! bv index value endianness +@deffnx {C Function} scm_bytevector_u8_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_s8_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_u16_set_x (bv, index, value, endianness) +@deffnx {C Function} scm_bytevector_s16_set_x (bv, index, value, endianness) +@deffnx {C Function} scm_bytevector_u32_set_x (bv, index, value, endianness) +@deffnx {C Function} scm_bytevector_s32_set_x (bv, index, value, endianness) +@deffnx {C Function} scm_bytevector_u64_set_x (bv, index, value, endianness) +@deffnx {C Function} scm_bytevector_s64_set_x (bv, index, value, endianness) +Store @var{value} as an @var{n}-bit (signed) integer (where @var{n} is +8, 16, 32 or 64) in @var{bv} at @var{index}, encoded according to +@var{endianness}. +@end deffn + +Finally, a variant specialized for the host's endianness is available +for each of these functions (with the exception of the @code{u8} +accessors, for obvious reasons): + +@deffn {Scheme Procedure} bytevector-u16-native-ref bv index +@deffnx {Scheme Procedure} bytevector-s16-native-ref bv index +@deffnx {Scheme Procedure} bytevector-u32-native-ref bv index +@deffnx {Scheme Procedure} bytevector-s32-native-ref bv index +@deffnx {Scheme Procedure} bytevector-u64-native-ref bv index +@deffnx {Scheme Procedure} bytevector-s64-native-ref bv index +@deffnx {C Function} scm_bytevector_u16_native_ref (bv, index) +@deffnx {C Function} scm_bytevector_s16_native_ref (bv, index) +@deffnx {C Function} scm_bytevector_u32_native_ref (bv, index) +@deffnx {C Function} scm_bytevector_s32_native_ref (bv, index) +@deffnx {C Function} scm_bytevector_u64_native_ref (bv, index) +@deffnx {C Function} scm_bytevector_s64_native_ref (bv, index) +Return the unsigned @var{n}-bit (signed) integer (where @var{n} is 8, +16, 32 or 64) from @var{bv} at @var{index}, decoded according to the +host's native endianness. +@end deffn + +@deffn {Scheme Procedure} bytevector-u16-native-set! bv index value +@deffnx {Scheme Procedure} bytevector-s16-native-set! bv index value +@deffnx {Scheme Procedure} bytevector-u32-native-set! bv index value +@deffnx {Scheme Procedure} bytevector-s32-native-set! bv index value +@deffnx {Scheme Procedure} bytevector-u64-native-set! bv index value +@deffnx {Scheme Procedure} bytevector-s64-native-set! bv index value +@deffnx {C Function} scm_bytevector_u16_native_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_s16_native_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_u32_native_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_s32_native_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_u64_native_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_s64_native_set_x (bv, index, value) +Store @var{value} as an @var{n}-bit (signed) integer (where @var{n} is +8, 16, 32 or 64) in @var{bv} at @var{index}, encoded according to the +host's native endianness. +@end deffn + + +@node Bytevectors and Integer Lists +@subsubsection Converting Bytevectors to/from Integer Lists + +Bytevector contents can readily be converted to/from lists of signed or +unsigned integers: + +@lisp +(bytevector->sint-list (u8-list->bytevector (make-list 4 255)) + (endianness little) 2) +@result{} (-1 -1) +@end lisp + +@deffn {Scheme Procedure} bytevector->u8-list bv +@deffnx {C Function} scm_bytevector_to_u8_list (bv) +Return a newly allocated list of unsigned 8-bit integers from the +contents of @var{bv}. +@end deffn + +@deffn {Scheme Procedure} u8-list->bytevector lst +@deffnx {C Function} scm_u8_list_to_bytevector (lst) +Return a newly allocated bytevector consisting of the unsigned 8-bit +integers listed in @var{lst}. +@end deffn + +@deffn {Scheme Procedure} bytevector->uint-list bv endianness size +@deffnx {Scheme Procedure} bytevector->sint-list bv endianness size +@deffnx {C Function} scm_bytevector_to_uint_list (bv, endianness, size) +@deffnx {C Function} scm_bytevector_to_sint_list (bv, endianness, size) +Return a list of unsigned (resp. signed) integers of @var{size} bytes +representing the contents of @var{bv}, decoded according to +@var{endianness}. +@end deffn + +@deffn {Scheme Procedure} uint-list->bytevector lst endianness size +@deffnx {Scheme Procedure} sint-list->bytevector lst endianness size +@deffnx {C Function} scm_uint_list_to_bytevector (lst, endianness, size) +@deffnx {C Function} scm_sint_list_to_bytevector (lst, endianness, size) +Return a new bytevector containing the unsigned (resp. signed) integers +listed in @var{lst} and encoded on @var{size} bytes according to +@var{endianness}. +@end deffn + +@node Bytevectors as Floats +@subsubsection Interpreting Bytevector Contents as Floating Point Numbers + +@cindex IEEE-754 floating point numbers + +Bytevector contents can also be accessed as IEEE-754 single- or +double-precision floating point numbers (respectively 32 and 64-bit +long) using the procedures described here. + +@deffn {Scheme Procedure} bytevector-ieee-single-ref bv index endianness +@deffnx {Scheme Procedure} bytevector-ieee-double-ref bv index endianness +@deffnx {C Function} scm_bytevector_ieee_single_ref (bv, index, endianness) +@deffnx {C Function} scm_bytevector_ieee_double_ref (bv, index, endianness) +Return the IEEE-754 single-precision floating point number from @var{bv} +at @var{index} according to @var{endianness}. +@end deffn + +@deffn {Scheme Procedure} bytevector-ieee-single-set! bv index value endianness +@deffnx {Scheme Procedure} bytevector-ieee-double-set! bv index value endianness +@deffnx {C Function} scm_bytevector_ieee_single_set_x (bv, index, value, endianness) +@deffnx {C Function} scm_bytevector_ieee_double_set_x (bv, index, value, endianness) +Store real number @var{value} in @var{bv} at @var{index} according to +@var{endianness}. +@end deffn + +Specialized procedures are also available: + +@deffn {Scheme Procedure} bytevector-ieee-single-native-ref bv index +@deffnx {Scheme Procedure} bytevector-ieee-double-native-ref bv index +@deffnx {C Function} scm_bytevector_ieee_single_native_ref (bv, index) +@deffnx {C Function} scm_bytevector_ieee_double_native_ref (bv, index) +Return the IEEE-754 single-precision floating point number from @var{bv} +at @var{index} according to the host's native endianness. +@end deffn + +@deffn {Scheme Procedure} bytevector-ieee-single-native-set! bv index value +@deffnx {Scheme Procedure} bytevector-ieee-double-native-set! bv index value +@deffnx {C Function} scm_bytevector_ieee_single_native_set_x (bv, index, value) +@deffnx {C Function} scm_bytevector_ieee_double_native_set_x (bv, index, value) +Store real number @var{value} in @var{bv} at @var{index} according to +the host's native endianness. +@end deffn + + +@node Bytevectors as Strings +@subsubsection Interpreting Bytevector Contents as Unicode Strings + +@cindex Unicode string encoding + +Bytevector contents can also be interpreted as Unicode strings encoded +in one of the most commonly available encoding formats@footnote{Guile +1.8 does @emph{not} support Unicode strings. Therefore, the procedures +described here assume that Guile strings are internally encoded +according to the current locale. For instance, if @code{$LC_CTYPE} is +@code{fr_FR.ISO-8859-1}, then @code{string->utf-8} @i{et al.} will +assume that Guile strings are Latin-1-encoded.}. + +@lisp +(utf8->string (u8-list->bytevector '(99 97 102 101))) +@result{} "cafe" + +(string->utf8 "caf@'e") ;; SMALL LATIN LETTER E WITH ACUTE ACCENT +@result{} #vu8(99 97 102 195 169) +@end lisp + +@deffn {Scheme Procedure} string->utf8 str +@deffnx {Scheme Procedure} string->utf16 str +@deffnx {Scheme Procedure} string->utf32 str +@deffnx {C Function} scm_string_to_utf8 (str) +@deffnx {C Function} scm_string_to_utf16 (str) +@deffnx {C Function} scm_string_to_utf32 (str) +Return a newly allocated bytevector that contains the UTF-8, UTF-16, or +UTF-32 (aka. UCS-4) encoding of @var{str}. +@end deffn + +@deffn {Scheme Procedure} utf8->string utf +@deffnx {Scheme Procedure} utf16->string utf +@deffnx {Scheme Procedure} utf32->string utf +@deffnx {C Function} scm_utf8_to_string (utf) +@deffnx {C Function} scm_utf16_to_string (utf) +@deffnx {C Function} scm_utf32_to_string (utf) +Return a newly allocated string that contains from the UTF-8-, UTF-16-, +or UTF-32-decoded contents of bytevector @var{utf}. +@end deffn + +@node Bytevectors as Generalized Vectors +@subsubsection Accessing Bytevectors with the Generalized Vector API + +As an extension to the R6RS, Guile allows bytevectors to be manipulated +with the @dfn{generalized vector} procedures (@pxref{Generalized +Vectors}). This also allows bytevectors to be accessed using the +generic @dfn{array} procedures (@pxref{Array Procedures}). When using +these APIs, bytes are accessed one at a time as 8-bit unsigned integers: + +@example +(define bv #vu8(0 1 2 3)) + +(generalized-vector? bv) +@result{} #t + +(generalized-vector-ref bv 2) +@result{} 2 + +(generalized-vector-set! bv 2 77) +(array-ref bv 2) +@result{} 77 + +(array-type bv) +@result{} vu8 +@end example + + @node Regular Expressions @subsection Regular Expressions @tpindex Regular expressions diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index f69d07ede..b0b57412a 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007, 2009 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -18,6 +18,7 @@ * Block Reading and Writing:: Reading and writing blocks of text. * Default Ports:: Defaults for input, output and errors. * Port Types:: Types of port and how to make them. +* R6RS I/O Ports:: The R6RS port API. * I/O Extensions:: Using and extending ports in C. @end menu @@ -1023,6 +1024,269 @@ documentation for @code{open-file} in @ref{File Ports}. @end deffn +@node R6RS I/O Ports +@subsection R6RS I/O Ports + +@cindex R6RS +@cindex R6RS ports + +The I/O port API of the @uref{http://www.r6rs.org/, Revised Report^6 on +the Algorithmic Language Scheme (R6RS)} is provided by the @code{(rnrs +io ports)} module. It provides features, such as binary I/O and Unicode +string I/O, that complement or refine Guile's historical port API +presented above (@pxref{Input and Output}). + +@c FIXME: Update description when implemented. +@emph{Note}: The implementation of this R6RS API is currently far from +complete, notably due to the lack of support for Unicode I/O and strings. + +@menu +* R6RS End-of-File:: The end-of-file object. +* R6RS Port Manipulation:: Manipulating R6RS ports. +* R6RS Binary Input:: Binary input. +* R6RS Binary Output:: Binary output. +@end menu + +@node R6RS End-of-File +@subsubsection The End-of-File Object + +@cindex EOF +@cindex end-of-file + +R5RS' @code{eof-object?} procedure is provided by the @code{(rnrs io +ports)} module: + +@deffn {Scheme Procedure} eof-object? obj +@deffnx {C Function} scm_eof_object_p (obj) +Return true if @var{obj} is the end-of-file (EOF) object. +@end deffn + +In addition, the following procedure is provided: + +@deffn {Scheme Procedure} eof-object +@deffnx {C Function} scm_eof_object () +Return the end-of-file (EOF) object. + +@lisp +(eof-object? (eof-object)) +@result{} #t +@end lisp +@end deffn + + +@node R6RS Port Manipulation +@subsubsection Port Manipulation + +The procedures listed below operate on any kind of R6RS I/O port. + +@deffn {Scheme Procedure} port-position port +If @var{port} supports it (see below), return the offset (an integer) +indicating where the next octet will be read from/written to in +@var{port}. If @var{port} does not support this operation, an error +condition is raised. + +This is similar to Guile's @code{seek} procedure with the +@code{SEEK_CUR} argument (@pxref{Random Access}). +@end deffn + +@deffn {Scheme Procedure} port-has-port-position? port +Return @code{#t} is @var{port} supports @code{port-position}. +@end deffn + +@deffn {Scheme Procedure} set-port-position! port offset +If @var{port} supports it (see below), set the position where the next +octet will be read from/written to @var{port} to @var{offset} (an +integer). If @var{port} does not support this operation, an error +condition is raised. + +This is similar to Guile's @code{seek} procedure with the +@code{SEEK_SET} argument (@pxref{Random Access}). +@end deffn + +@deffn {Scheme Procedure} port-has-set-port-position!? port +Return @code{#t} is @var{port} supports @code{set-port-position!}. +@end deffn + +@deffn {Scheme Procedure} call-with-port port proc +Call @var{proc}, passing it @var{port} and closing @var{port} upon exit +of @var{proc}. Return the return values of @var{proc}. +@end deffn + + +@node R6RS Binary Input +@subsubsection Binary Input + +@cindex binary input + +R6RS binary input ports can be created with the procedures described +below. + +@deffn {Scheme Procedure} open-bytevector-input-port bv [transcoder] +@deffnx {C Function} scm_open_bytevector_input_port (bv, transcoder) +Return an input port whose contents are drawn from bytevector @var{bv} +(@pxref{Bytevectors}). + +@c FIXME: Update description when implemented. +The @var{transcoder} argument is currently not supported. +@end deffn + +@cindex custom binary input ports + +@deffn {Scheme Procedure} make-custom-binary-input-port id read! get-position set-position! close +@deffnx {C Function} scm_make_custom_binary_input_port (id, read!, get-position, set-position!, close) +Return a new custom binary input port@footnote{This is similar in spirit +to Guile's @dfn{soft ports} (@pxref{Soft Ports}).} named @var{id} (a +string) whose input is drained by invoking @var{read!} and passing it a +bytevector, an index where bytes should be written, and the number of +bytes to read. The @code{read!} procedure must return an integer +indicating the number of bytes read, or @code{0} to indicate the +end-of-file. + +Optionally, if @var{get-position} is not @code{#f}, it must be a thunk +that will be called when @var{port-position} is invoked on the custom +binary port and should return an integer indicating the position within +the underlying data stream; if @var{get-position} was not supplied, the +returned port does not support @var{port-position}. + +Likewise, if @var{set-position!} is not @code{#f}, it should be a +one-argument procedure. When @var{set-port-position!} is invoked on the +custom binary input port, @var{set-position!} is passed an integer +indicating the position of the next byte is to read. + +Finally, if @var{close} is not @code{#f}, it must be a thunk. It is +invoked when the custom binary input port is closed. + +Using a custom binary input port, the @code{open-bytevector-input-port} +procedure could be implemented as follows: + +@lisp +(define (open-bytevector-input-port source) + (define position 0) + (define length (bytevector-length source)) + + (define (read! bv start count) + (let ((count (min count (- length position)))) + (bytevector-copy! source position + bv start count) + (set! position (+ position count)) + count)) + + (define (get-position) position) + + (define (set-position! new-position) + (set! position new-position)) + + (make-custom-binary-input-port "the port" read! + get-position + set-position!)) + +(read (open-bytevector-input-port (string->utf8 "hello"))) +@result{} hello +@end lisp +@end deffn + +@cindex binary input +Binary input is achieved using the procedures below: + +@deffn {Scheme Procedure} get-u8 port +@deffnx {C Function} scm_get_u8 (port) +Return an octet read from @var{port}, a binary input port, blocking as +necessary, or the end-of-file object. +@end deffn + +@deffn {Scheme Procedure} lookahead-u8 port +@deffnx {C Function} scm_lookahead_u8 (port) +Like @code{get-u8} but does not update @var{port}'s position to point +past the octet. +@end deffn + +@deffn {Scheme Procedure} get-bytevector-n port count +@deffnx {C Function} scm_get_bytevector_n (port, count) +Read @var{count} octets from @var{port}, blocking as necessary and +return a bytevector containing the octets read. If fewer bytes are +available, a bytevector smaller than @var{count} is returned. +@end deffn + +@deffn {Scheme Procedure} get-bytevector-n! port bv start count +@deffnx {C Function} scm_get_bytevector_n_x (port, bv, start, count) +Read @var{count} bytes from @var{port} and store them in @var{bv} +starting at index @var{start}. Return either the number of bytes +actually read or the end-of-file object. +@end deffn + +@deffn {Scheme Procedure} get-bytevector-some port +@deffnx {C Function} scm_get_bytevector_some (port) +Read from @var{port}, blocking as necessary, until data are available or +and end-of-file is reached. Return either a new bytevector containing +the data read or the end-of-file object. +@end deffn + +@deffn {Scheme Procedure} get-bytevector-all port +@deffnx {C Function} scm_get_bytevector_all (port) +Read from @var{port}, blocking as necessary, until the end-of-file is +reached. Return either a new bytevector containing the data read or the +end-of-file object (if no data were available). +@end deffn + +@node R6RS Binary Output +@subsubsection Binary Output + +Binary output ports can be created with the procedures below. + +@deffn {Scheme Procedure} open-bytevector-output-port [transcoder] +@deffnx {C Function} scm_open_bytevector_output_port (transcoder) +Return two values: a binary output port and a procedure. The latter +should be called with zero arguments to obtain a bytevector containing +the data accumulated by the port, as illustrated below. + +@lisp +(call-with-values + (lambda () + (open-bytevector-output-port)) + (lambda (port get-bytevector) + (display "hello" port) + (get-bytevector))) + +@result{} #vu8(104 101 108 108 111) +@end lisp + +@c FIXME: Update description when implemented. +The @var{transcoder} argument is currently not supported. +@end deffn + +@cindex custom binary output ports + +@deffn {Scheme Procedure} make-custom-binary-output-port id write! get-position set-position! close +@deffnx {C Function} scm_make_custom_binary_output_port (id, write!, get-position, set-position!, close) +Return a new custom binary output port named @var{id} (a string) whose +output is sunk by invoking @var{write!} and passing it a bytevector, an +index where bytes should be read from this bytevector, and the number of +bytes to be ``written''. The @code{write!} procedure must return an +integer indicating the number of bytes actually written; when it is +passed @code{0} as the number of bytes to write, it should behave as +though an end-of-file was sent to the byte sink. + +The other arguments are as for @code{make-custom-binary-input-port} +(@pxref{R6RS Binary Input, @code{make-custom-binary-input-port}}). +@end deffn + +@cindex binary output +Writing to a binary output port can be done using the following +procedures: + +@deffn {Scheme Procedure} put-u8 port octet +@deffnx {C Function} scm_put_u8 (port, octet) +Write @var{octet}, an integer in the 0--255 range, to @var{port}, a +binary output port. +@end deffn + +@deffn {Scheme Procedure} put-bytevector port bv [start [count]] +@deffnx {C Function} scm_put_bytevector (port, bv, start, count) +Write the contents of @var{bv} to @var{port}, optionally starting at +index @var{start} and limiting to @var{count} octets. +@end deffn + + @node I/O Extensions @subsection Using and Extending Ports in C @@ -1267,7 +1531,7 @@ implementations take care to avoid this problem. The procedure is set using -@deftypefun void scm_set_port_seek (scm_t_bits tc, off_t (*seek) (SCM port, off_t offset, int whence)) +@deftypefun void scm_set_port_seek (scm_t_bits tc, scm_t_off (*seek) (SCM port, scm_t_off offset, int whence)) @end deftypefun @item truncate @@ -1275,7 +1539,7 @@ Truncate the port data to be specified length. It can be assumed that the current state of @code{rw_active} is @code{SCM_PORT_NEITHER}. Set using -@deftypefun void scm_set_port_truncate (scm_t_bits tc, void (*truncate) (SCM port, off_t length)) +@deftypefun void scm_set_port_truncate (scm_t_bits tc, void (*truncate) (SCM port, scm_t_off length)) @end deftypefun @end table diff --git a/doc/ref/compiler.texi b/doc/ref/compiler.texi index 0d68abfc6..f8d0895d9 100644 --- a/doc/ref/compiler.texi +++ b/doc/ref/compiler.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 2008 +@c Copyright (C) 2008, 2009 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -26,6 +26,7 @@ know how to compile your .scm file. * GLIL:: * Assembly:: * Bytecode and Objcode:: +* Writing New High-Level Languages:: * Extending the Compiler:: @end menu @@ -712,6 +713,19 @@ module, and @var{externals} should be a list of external variables. @code{#f} is also a valid object code environment. @end deffn +@node Writing New High-Level Languages +@subsection Writing New High-Level Languages + +In order to integrate a new language @var{lang} into Guile's compiler +system, one has to create the module @code{(language @var{lang} spec)} +containing the language definition and referencing the parser, +compiler and other routines processing it. The module hierarchy in +@code{(language brainfuck)} defines a very basic Brainfuck +implementation meant to serve as easy-to-understand example on how to +do this. See for instance @url{http://en.wikipedia.org/wiki/Brainfuck} +for more information about the Brainfuck language itself. + + @node Extending the Compiler @subsection Extending the Compiler diff --git a/doc/ref/intro.texi b/doc/ref/intro.texi index a31fe30f8..b0c4c1263 100644 --- a/doc/ref/intro.texi +++ b/doc/ref/intro.texi @@ -470,12 +470,12 @@ You can get the version number by invoking the command @example $ guile --version -Guile 1.4.1 -Copyright (c) 1995, 1996, 1997, 2000, 2006 Free Software Foundation -Guile may be distributed under the terms of the GNU General Public License; -certain other uses are permitted as well. For details, see the file -`COPYING', which is included in the Guile distribution. -There is no warranty, to the extent permitted by law. +Guile 1.9.0 +Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation +Guile may be distributed under the terms of the GNU Lesser General +Public Licence. For details, see the files `COPYING.LESSER' and +`COPYING', which are included in the Guile distribution. There is no +warranty, to the extent permitted by law. @end example @item diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi index cb19a7af8..2d64919a5 100644 --- a/doc/ref/posix.texi +++ b/doc/ref/posix.texi @@ -1909,10 +1909,6 @@ for termination, not stopping. If a signal occurs while in a system call, deliver the signal then restart the system call (as opposed to returning an @code{EINTR} error from that call). - -Guile always enables this flag where available, no matter what -@var{flags} are specified. This avoids spurious error returns in low -level operations. @end defvar The return value is a pair with information about the old handler as diff --git a/doc/ref/preface.texi b/doc/ref/preface.texi index d6de77440..7fa85811b 100644 --- a/doc/ref/preface.texi +++ b/doc/ref/preface.texi @@ -159,12 +159,12 @@ person would want to do. @itemize @bullet @item The Guile library (libguile) and supporting files are published under -the terms of the GNU Lesser General Public License version 2.1. See -the file @file{COPYING.LIB}. +the terms of the GNU Lesser General Public License version 3 or later. +See the files @file{COPYING.LESSER} and @file{COPYING}. @item The Guile readline module is published under the terms of the GNU -General Public License version 2. See the file @file{COPYING}. +General Public License version 3 or later. See the file @file{COPYING}. @item The manual you're now reading is published under the terms of the GNU diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am index f49220da7..d359c4fed 100644 --- a/doc/tutorial/Makefile.am +++ b/doc/tutorial/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/emacs/Makefile.am b/emacs/Makefile.am index ad7a5c939..e18f30bf1 100644 --- a/emacs/Makefile.am +++ b/emacs/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/emacs/gds-scheme.el b/emacs/gds-scheme.el index b8a161b37..54c75a787 100755 --- a/emacs/gds-scheme.el +++ b/emacs/gds-scheme.el @@ -5,8 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later -;;;; version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/emacs/gds-server.el b/emacs/gds-server.el index 86defc07b..d4fe997c2 100644 --- a/emacs/gds-server.el +++ b/emacs/gds-server.el @@ -5,8 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later -;;;; version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/emacs/gds.el b/emacs/gds.el index 7a1486d8d..a9450d065 100644 --- a/emacs/gds.el +++ b/emacs/gds.el @@ -5,8 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later -;;;; version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/emacs/gud-guile.el b/emacs/gud-guile.el index bd1b0ff26..5d295268f 100644 --- a/emacs/gud-guile.el +++ b/emacs/gud-guile.el @@ -2,20 +2,20 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Author: Thien-Thi Nguyen ;;; Version: 1 diff --git a/emacs/guile-c.el b/emacs/guile-c.el index b23ddd30f..1ccfd4dbc 100644 --- a/emacs/guile-c.el +++ b/emacs/guile-c.el @@ -2,20 +2,20 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Commentary: diff --git a/emacs/guile-emacs.scm b/emacs/guile-emacs.scm index 000d0cc2e..4d99002b6 100644 --- a/emacs/guile-emacs.scm +++ b/emacs/guile-emacs.scm @@ -2,20 +2,20 @@ ;; Copyright (C) 2001 Keisuke Nishida -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Code: diff --git a/emacs/guile-scheme.el b/emacs/guile-scheme.el index a6d8b1f19..5e112a0dc 100644 --- a/emacs/guile-scheme.el +++ b/emacs/guile-scheme.el @@ -2,20 +2,20 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Commentary: diff --git a/emacs/guile.el b/emacs/guile.el index e85c81c29..25a9b9b8e 100644 --- a/emacs/guile.el +++ b/emacs/guile.el @@ -2,20 +2,20 @@ ;; Copyright (C) 2001 Keisuke Nishida -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Code: diff --git a/emacs/multistring.el b/emacs/multistring.el index ca17a8469..df8419542 100644 --- a/emacs/multistring.el +++ b/emacs/multistring.el @@ -2,22 +2,20 @@ ;; Copyright (C) 2000, 2006 Free Software Foundation, Inc. -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Author: Mikael Djurfeldt diff --git a/emacs/patch.el b/emacs/patch.el index 6bcb0876f..2fd20f579 100644 --- a/emacs/patch.el +++ b/emacs/patch.el @@ -2,20 +2,20 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Author: Thien-Thi Nguyen ;;; Version: 1 diff --git a/emacs/ppexpand.el b/emacs/ppexpand.el index 7ec3b1c45..f6c18765c 100644 --- a/emacs/ppexpand.el +++ b/emacs/ppexpand.el @@ -2,22 +2,20 @@ ;; Copyright (C) 2000, 2006 Free Software Foundation, Inc. -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Author: Mikael Djurfeldt diff --git a/emacs/update-changelog.el b/emacs/update-changelog.el index e0c0a4b11..c8dfa93a2 100644 --- a/emacs/update-changelog.el +++ b/emacs/update-changelog.el @@ -2,20 +2,20 @@ ;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +;;;; 02111-1307 USA ;;; Commentary: diff --git a/examples/Makefile.am b/examples/Makefile.am index 873f34ce0..5de528a21 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA EXTRA_DIST = README ChangeLog-2008 check.test \ \ @@ -38,8 +38,8 @@ EXTRA_DIST = README ChangeLog-2008 check.test \ \ safe/README safe/safe safe/untrusted.scm safe/evil.scm -AM_CFLAGS = `PKG_CONFIG_PATH=$(libdir)/pkgconfig $(bindir)/guile-config compile` -AM_LIBS = `PKG_CONFIG_PATH=$(libdir)/pkgconfig $(bindir)/guile-config link` +AM_CFLAGS = `PATH=$(bindir):$$PATH PKG_CONFIG_PATH=$(libdir)/pkgconfig $(bindir)/guile-config compile` +AM_LIBS = `PATH=$(bindir):$$PATH PKG_CONFIG_PATH=$(libdir)/pkgconfig $(bindir)/guile-config link` box/box: box/box.o @@ -81,6 +81,7 @@ installcheck: box/box box-module/box libbox.la libbox-module.la LTDL_LIBRARY_PATH="$(builddir):$$LTDL_LIBRARY_PATH" \ GUILE_LOAD_PATH="$(abs_top_srcdir):$$GUILE_LOAD_PATH" \ PATH="$(bindir):$$PATH" \ + GUILE_AUTO_COMPILE=0 \ srcdir="$(srcdir)" \ $(srcdir)/check.test diff --git a/examples/box-dynamic-module/box.c b/examples/box-dynamic-module/box.c index 7d6e2ce5d..e180565eb 100644 --- a/examples/box-dynamic-module/box.c +++ b/examples/box-dynamic-module/box.c @@ -2,20 +2,20 @@ * * Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Include all needed declarations. */ diff --git a/examples/box-dynamic/box.c b/examples/box-dynamic/box.c index bb9529650..e96c011ab 100644 --- a/examples/box-dynamic/box.c +++ b/examples/box-dynamic/box.c @@ -2,20 +2,20 @@ * * Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Include all needed declarations. */ diff --git a/examples/box-module/box.c b/examples/box-module/box.c index b589b262f..b69377e38 100644 --- a/examples/box-module/box.c +++ b/examples/box-module/box.c @@ -2,20 +2,20 @@ * * Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Include all needed declarations. */ diff --git a/examples/box/box.c b/examples/box/box.c index e36d650b3..0662c3d12 100644 --- a/examples/box/box.c +++ b/examples/box/box.c @@ -2,20 +2,20 @@ * * Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this software; see the file COPYING.LESSER. If + * not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Include all needed declarations. */ diff --git a/examples/compat/compat.h b/examples/compat/compat.h index 5ed11eff9..67f1b9bd0 100644 --- a/examples/compat/compat.h +++ b/examples/compat/compat.h @@ -5,9 +5,9 @@ /* Copyright (C) 2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,7 +16,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/gc-benchmarks/gc-profile.scm b/gc-benchmarks/gc-profile.scm index 002bfc595..3365832a0 100755 --- a/gc-benchmarks/gc-profile.scm +++ b/gc-benchmarks/gc-profile.scm @@ -5,20 +5,20 @@ exec ${GUILE-guile} --no-debug -q -l "$0" \ !# ;;; Copyright (C) 2008 Free Software Foundation, Inc. ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3, or +;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this software; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301 USA +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this software; see the file COPYING.LESSER. If +;;; not, write to the Free Software Foundation, Inc., 51 Franklin +;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (ice-9 format) (ice-9 rdelim) diff --git a/gc-benchmarks/run-benchmark.scm b/gc-benchmarks/run-benchmark.scm index a50fb48c2..915143f1d 100755 --- a/gc-benchmarks/run-benchmark.scm +++ b/gc-benchmarks/run-benchmark.scm @@ -6,20 +6,20 @@ exec ${GUILE-guile} -q -l "$0" \ !# ;;; Copyright (C) 2008 Free Software Foundation, Inc. ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3, or +;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this software; see the file COPYING. If not, write to -;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301 USA +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this software; see the file COPYING.LESSER. If +;;; not, write to the Free Software Foundation, Inc., 51 Franklin +;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (ice-9 rdelim) (ice-9 popen) diff --git a/guile-readline/Makefile.am b/guile-readline/Makefile.am index 94e6f9741..9df82bcb1 100644 --- a/guile-readline/Makefile.am +++ b/guile-readline/Makefile.am @@ -2,20 +2,20 @@ ## ## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. ## -## This file is part of GUILE. +## This file is part of guile-readline. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## guile-readline is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## -## GUILE is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## guile-readline is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write +## You should have received a copy of the GNU General Public License +## along with guile-readline; see the file COPYING. If not, write ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth ## Floor, Boston, MA 02110-1301 USA diff --git a/guile-readline/configure.in b/guile-readline/configure.in index 9098a31e6..f24fc9418 100644 --- a/guile-readline/configure.in +++ b/guile-readline/configure.in @@ -7,7 +7,7 @@ AC_INIT(guile-readline, ]), [bug-guile@gnu.org]) -AC_CONFIG_AUX_DIR([.]) +AC_CONFIG_AUX_DIR([../build-aux]) AC_CONFIG_SRCDIR(readline.c) AM_CONFIG_HEADER([guile-readline-config.h]) AM_INIT_AUTOMAKE([foreign no-define]) @@ -38,6 +38,7 @@ for termlib in ncurses curses termcap terminfo termlib ; do [LIBS="-l${termlib} $LIBS"; break]) done +AC_LIB_LINKFLAGS(readline) AC_CHECK_LIB(readline, readline) if test $ac_cv_lib_readline_readline = no; then AC_MSG_WARN([libreadline was not found on your system.]) @@ -53,77 +54,6 @@ dnl install paren matching on the Guile command line (when using dnl readline for input), so it's completely optional. AC_CHECK_FUNCS(rl_get_keymap) -dnl Check for rl_pre_input_hook. This is more complicated because on -dnl some systems (HP/UX), the linker wont let us treat -dnl rl_pre_input_hook as a function when it really is a function -dnl pointer. - -AC_MSG_CHECKING([for rl_pre_input_hook]) -AC_CACHE_VAL(ac_cv_var_rl_pre_input_hook, -[AC_TRY_LINK([ -#include -#include -], [ -rl_pre_input_hook = 0; -], -ac_cv_var_rl_pre_input_hook=yes, -ac_cv_var_rl_pre_input_hook=no)]) -AC_MSG_RESULT($ac_cv_var_rl_pre_input_hook) -if test $ac_cv_var_rl_pre_input_hook = yes; then - AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK,1, - [Define if rl_pre_input_hook is available.]) -fi - - -AC_MSG_CHECKING(if readline clears SA_RESTART flag for SIGWINCH) -AC_CACHE_VAL(guile_cv_sigwinch_sa_restart_cleared, -AC_TRY_RUN([#include -#include -#include - -int -hook () -{ - struct sigaction action; - - sigaction (SIGWINCH, NULL, &action); - rl_cleanup_after_signal(); - - /* exit with 0 if readline disabled SA_RESTART */ - exit (action.sa_flags & SA_RESTART); -} - -int -main () -{ - struct sigaction action; - - sigaction (SIGWINCH, NULL, &action); - action.sa_flags |= SA_RESTART; - sigaction (SIGWINCH, &action, NULL); - - /* Give readline something to read. Otherwise, it might hang, for - example when run as a background process with job control. - */ - rl_instream = fopen ("/dev/null", "r"); - if (rl_instream == NULL) - { - perror ("/dev/null"); - exit (1); - } - - rl_pre_input_hook = hook; - readline (""); -}], -guile_cv_sigwinch_sa_restart_cleared=yes, -guile_cv_sigwinch_sa_restart_cleared=no, -guile_cv_sigwinch_sa_restart_cleared=yes)) -AC_MSG_RESULT($guile_cv_sigwinch_sa_restart_cleared) -if test $guile_cv_sigwinch_sa_restart_cleared = yes; then - AC_DEFINE(GUILE_SIGWINCH_SA_RESTART_CLEARED, 1, - [Define if readline disables SA_RESTART.]) -fi - AC_CACHE_CHECK([for rl_getc_function pointer in readline], ac_cv_var_rl_getc_function, [AC_TRY_LINK([ diff --git a/guile-readline/ice-9/Makefile.am b/guile-readline/ice-9/Makefile.am index d1e7c8270..ffa767e99 100644 --- a/guile-readline/ice-9/Makefile.am +++ b/guile-readline/ice-9/Makefile.am @@ -2,20 +2,20 @@ ## ## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. ## -## This file is part of GUILE. +## This file is part of guile-readline. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## guile-readline is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## -## GUILE is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## guile-readline is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write +## You should have received a copy of the GNU General Public License +## along with guile-readline; see the file COPYING. If not, write ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth ## Floor, Boston, MA 02110-1301 USA diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm index 19dda94db..96af69e2f 100644 --- a/guile-readline/ice-9/readline.scm +++ b/guile-readline/ice-9/readline.scm @@ -4,7 +4,7 @@ ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) +;;;; the Free Software Foundation; either version 3, or (at your option) ;;;; any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, diff --git a/guile-readline/readline.c b/guile-readline/readline.c index 58599cacc..7f86ceb3d 100644 --- a/guile-readline/readline.c +++ b/guile-readline/readline.c @@ -4,7 +4,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -530,26 +530,6 @@ match_paren (int x, int k) } #endif /* HAVE_RL_GET_KEYMAP */ -#if defined (HAVE_RL_PRE_INPUT_HOOK) && defined (GUILE_SIGWINCH_SA_RESTART_CLEARED) -/* Readline disables SA_RESTART on SIGWINCH. - * This code turns it back on. - */ -static int -sigwinch_enable_restart (void) -{ -#ifdef HAVE_SIGINTERRUPT - siginterrupt (SIGWINCH, 0); -#else - struct sigaction action; - - sigaction (SIGWINCH, NULL, &action); - action.sa_flags |= SA_RESTART; - sigaction (SIGWINCH, &action, NULL); -#endif - return 0; -} -#endif - #endif /* HAVE_RL_GETC_FUNCTION */ void @@ -569,9 +549,6 @@ scm_init_readline () #endif rl_basic_word_break_characters = "\t\n\"'`;()"; rl_readline_name = "Guile"; -#if defined (HAVE_RL_PRE_INPUT_HOOK) && defined (GUILE_SIGWINCH_SA_RESTART_CLEARED) - rl_pre_input_hook = sigwinch_enable_restart; -#endif reentry_barrier_mutex = scm_permanent_object (scm_make_mutex ()); scm_init_opts (scm_readline_options, diff --git a/guile-readline/readline.h b/guile-readline/readline.h index 6242c5642..2bf5f8000 100644 --- a/guile-readline/readline.h +++ b/guile-readline/readline.h @@ -5,7 +5,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, diff --git a/lang/Makefile.am b/lang/Makefile.am index 97c440d75..adbe4d43c 100644 --- a/lang/Makefile.am +++ b/lang/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/lib/Makefile.am b/lib/Makefile.am index 6f2f5c5fa..f488fa188 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap count-one-bits environ extensions flock fpieee full-read full-write iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap canonicalize-lgpl count-one-bits environ extensions flock fpieee full-read full-write havelib iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects @@ -90,6 +90,15 @@ EXTRA_DIST += c-strcaseeq.h ## end gnulib module c-strcaseeq +## begin gnulib module canonicalize-lgpl + + +EXTRA_DIST += canonicalize-lgpl.c canonicalize.h + +EXTRA_libgnu_la_SOURCES += canonicalize-lgpl.c + +## end gnulib module canonicalize-lgpl + ## begin gnulib module configmake # Retrieve values of the variables through 'configure' followed by @@ -346,6 +355,14 @@ EXTRA_libgnu_la_SOURCES += malloc.c ## end gnulib module malloc-posix +## begin gnulib module malloca + +libgnu_la_SOURCES += malloca.c + +EXTRA_DIST += malloca.h malloca.valgrind + +## end gnulib module malloca + ## begin gnulib module mbrlen @@ -373,6 +390,13 @@ EXTRA_libgnu_la_SOURCES += mbsinit.c ## end gnulib module mbsinit +## begin gnulib module pathmax + + +EXTRA_DIST += pathmax.h + +## end gnulib module pathmax + ## begin gnulib module putenv @@ -382,6 +406,15 @@ EXTRA_libgnu_la_SOURCES += putenv.c ## end gnulib module putenv +## begin gnulib module readlink + + +EXTRA_DIST += readlink.c + +EXTRA_libgnu_la_SOURCES += readlink.c + +## end gnulib module readlink + ## begin gnulib module safe-read @@ -581,6 +614,7 @@ string.h: string.in.h -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ + -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ @@ -617,6 +651,7 @@ string.h: string.in.h -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c new file mode 100644 index 000000000..8bc24680f --- /dev/null +++ b/lib/canonicalize-lgpl.c @@ -0,0 +1,362 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-2003, 2005-2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Avoid a clash of our rpl_realpath() function with the prototype in + on Solaris 2.5.1. */ +#undef realpath + +#if !HAVE_CANONICALIZE_FILE_NAME || defined _LIBC + +#include + +/* Specification. */ +#include "canonicalize.h" + +#include +#include +#include + +#if HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include + +#if HAVE_SYS_PARAM_H || defined _LIBC +# include +#endif +#ifndef MAXSYMLINKS +# define MAXSYMLINKS 20 +#endif + +#include + +#include +#ifndef _LIBC +# define __set_errno(e) errno = (e) +# ifndef ENAMETOOLONG +# define ENAMETOOLONG EINVAL +# endif +#endif + +#ifdef _LIBC +# include +#else +# define SHLIB_COMPAT(lib, introduced, obsoleted) 0 +# define versioned_symbol(lib, local, symbol, version) +# define compat_symbol(lib, local, symbol, version) +# define weak_alias(local, symbol) +# define __canonicalize_file_name canonicalize_file_name +# define __realpath rpl_realpath +# include "pathmax.h" +# include "malloca.h" +# if HAVE_GETCWD +# ifdef VMS + /* We want the directory in Unix syntax, not in VMS syntax. */ +# define __getcwd(buf, max) getcwd (buf, max, 0) +# else +# define __getcwd getcwd +# endif +# else +# define __getcwd(buf, max) getwd (buf) +# endif +# define __readlink readlink + /* On systems without symbolic links, call stat() instead of lstat(). */ +# if !defined S_ISLNK && !HAVE_READLINK +# define lstat stat +# endif +#endif + +/* Return the canonical absolute name of file NAME. A canonical name + does not contain any `.', `..' components nor any repeated path + separators ('/') or symlinks. All path components must exist. If + RESOLVED is null, the result is malloc'd; otherwise, if the + canonical name is PATH_MAX chars or more, returns null with `errno' + set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, + returns the name in RESOLVED. If the name cannot be resolved and + RESOLVED is non-NULL, it contains the path of the first component + that cannot be resolved. If the path can be resolved, RESOLVED + holds the same value as the value returned. */ + +char * +__realpath (const char *name, char *resolved) +{ + char *rpath, *dest, *extra_buf = NULL; + const char *start, *end, *rpath_limit; + long int path_max; +#if HAVE_READLINK + int num_links = 0; +#endif + + if (name == NULL) + { + /* As per Single Unix Specification V2 we must return an error if + either parameter is a null pointer. We extend this to allow + the RESOLVED parameter to be NULL in case the we are expected to + allocate the room for the return value. */ + __set_errno (EINVAL); + return NULL; + } + + if (name[0] == '\0') + { + /* As per Single Unix Specification V2 we must return an error if + the name argument points to an empty string. */ + __set_errno (ENOENT); + return NULL; + } + +#ifdef PATH_MAX + path_max = PATH_MAX; +#else + path_max = pathconf (name, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 1024; +#endif + + if (resolved == NULL) + { + rpath = malloc (path_max); + if (rpath == NULL) + { + /* It's easier to set errno to ENOMEM than to rely on the + 'malloc-posix' gnulib module. */ + errno = ENOMEM; + return NULL; + } + } + else + rpath = resolved; + rpath_limit = rpath + path_max; + + if (name[0] != '/') + { + if (!__getcwd (rpath, path_max)) + { + rpath[0] = '\0'; + goto error; + } + dest = strchr (rpath, '\0'); + } + else + { + rpath[0] = '/'; + dest = rpath + 1; + } + + for (start = end = name; *start; start = end) + { +#ifdef _LIBC + struct stat64 st; +#else + struct stat st; +#endif + + /* Skip sequence of multiple path-separators. */ + while (*start == '/') + ++start; + + /* Find end of path component. */ + for (end = start; *end && *end != '/'; ++end) + /* Nothing. */; + + if (end - start == 0) + break; + else if (end - start == 1 && start[0] == '.') + /* nothing */; + else if (end - start == 2 && start[0] == '.' && start[1] == '.') + { + /* Back up to previous component, ignore if at root already. */ + if (dest > rpath + 1) + while ((--dest)[-1] != '/'); + } + else + { + size_t new_size; + + if (dest[-1] != '/') + *dest++ = '/'; + + if (dest + (end - start) >= rpath_limit) + { + ptrdiff_t dest_offset = dest - rpath; + char *new_rpath; + + if (resolved) + { + __set_errno (ENAMETOOLONG); + if (dest > rpath + 1) + dest--; + *dest = '\0'; + goto error; + } + new_size = rpath_limit - rpath; + if (end - start + 1 > path_max) + new_size += end - start + 1; + else + new_size += path_max; + new_rpath = (char *) realloc (rpath, new_size); + if (new_rpath == NULL) + { + /* It's easier to set errno to ENOMEM than to rely on the + 'realloc-posix' gnulib module. */ + errno = ENOMEM; + goto error; + } + rpath = new_rpath; + rpath_limit = rpath + new_size; + + dest = rpath + dest_offset; + } + +#ifdef _LIBC + dest = __mempcpy (dest, start, end - start); +#else + memcpy (dest, start, end - start); + dest += end - start; +#endif + *dest = '\0'; + +#ifdef _LIBC + if (__lxstat64 (_STAT_VER, rpath, &st) < 0) +#else + if (lstat (rpath, &st) < 0) +#endif + goto error; + +#if HAVE_READLINK + if (S_ISLNK (st.st_mode)) + { + char *buf; + size_t len; + int n; + + if (++num_links > MAXSYMLINKS) + { + __set_errno (ELOOP); + goto error; + } + + buf = malloca (path_max); + if (!buf) + { + errno = ENOMEM; + goto error; + } + + n = __readlink (rpath, buf, path_max - 1); + if (n < 0) + { + int saved_errno = errno; + freea (buf); + errno = saved_errno; + goto error; + } + buf[n] = '\0'; + + if (!extra_buf) + { + extra_buf = malloca (path_max); + if (!extra_buf) + { + freea (buf); + errno = ENOMEM; + goto error; + } + } + + len = strlen (end); + if ((long int) (n + len) >= path_max) + { + freea (buf); + __set_errno (ENAMETOOLONG); + goto error; + } + + /* Careful here, end may be a pointer into extra_buf... */ + memmove (&extra_buf[n], end, len + 1); + name = end = memcpy (extra_buf, buf, n); + + if (buf[0] == '/') + dest = rpath + 1; /* It's an absolute symlink */ + else + /* Back up to previous component, ignore if at root already: */ + if (dest > rpath + 1) + while ((--dest)[-1] != '/'); + } +#endif + } + } + if (dest > rpath + 1 && dest[-1] == '/') + --dest; + *dest = '\0'; + + if (extra_buf) + freea (extra_buf); + + return resolved ? memcpy (resolved, rpath, dest - rpath + 1) : rpath; + +error: + { + int saved_errno = errno; + if (extra_buf) + freea (extra_buf); + if (resolved) + strcpy (resolved, rpath); + else + free (rpath); + errno = saved_errno; + } + return NULL; +} +#ifdef _LIBC +versioned_symbol (libc, __realpath, realpath, GLIBC_2_3); +#endif + + +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3) +char * +__old_realpath (const char *name, char *resolved) +{ + if (resolved == NULL) + { + __set_errno (EINVAL); + return NULL; + } + + return __realpath (name, resolved); +} +compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0); +#endif + + +char * +__canonicalize_file_name (const char *name) +{ + return __realpath (name, NULL); +} +weak_alias (__canonicalize_file_name, canonicalize_file_name) + +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + +#endif diff --git a/lib/canonicalize.h b/lib/canonicalize.h new file mode 100644 index 000000000..184cf1637 --- /dev/null +++ b/lib/canonicalize.h @@ -0,0 +1,52 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-2007 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef CANONICALIZE_H_ +# define CANONICALIZE_H_ + +# if GNULIB_CANONICALIZE +enum canonicalize_mode_t + { + /* All components must exist. */ + CAN_EXISTING = 0, + + /* All components excluding last one must exist. */ + CAN_ALL_BUT_LAST = 1, + + /* No requirements on components existence. */ + CAN_MISSING = 2 + }; +typedef enum canonicalize_mode_t canonicalize_mode_t; + +/* Return a malloc'd string containing the canonical absolute name of + the named file. This acts like canonicalize_file_name, except that + whether components must exist depends on the canonicalize_mode_t + argument. */ +char *canonicalize_filename_mode (const char *, canonicalize_mode_t); +# endif + +# if HAVE_DECL_CANONICALIZE_FILE_NAME +# include +# else +/* Return a malloc'd string containing the canonical absolute name of + the named file. If any file name component does not exist or is a + symlink to a nonexistent file, return NULL. A canonical name does + not contain any `.', `..' components nor any repeated file name + separators ('/') or symlinks. */ +char *canonicalize_file_name (const char *); +# endif + +#endif /* !CANONICALIZE_H_ */ diff --git a/lib/malloca.c b/lib/malloca.c new file mode 100644 index 000000000..7905e6152 --- /dev/null +++ b/lib/malloca.c @@ -0,0 +1,137 @@ +/* Safe automatic memory allocation. + Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "malloca.h" + +/* The speed critical point in this file is freea() applied to an alloca() + result: it must be fast, to match the speed of alloca(). The speed of + mmalloca() and freea() in the other case are not critical, because they + are only invoked for big memory sizes. */ + +#if HAVE_ALLOCA + +/* Store the mmalloca() results in a hash table. This is needed to reliably + distinguish a mmalloca() result and an alloca() result. + + Although it is possible that the same pointer is returned by alloca() and + by mmalloca() at different times in the same application, it does not lead + to a bug in freea(), because: + - Before a pointer returned by alloca() can point into malloc()ed memory, + the function must return, and once this has happened the programmer must + not call freea() on it anyway. + - Before a pointer returned by mmalloca() can point into the stack, it + must be freed. The only function that can free it is freea(), and + when freea() frees it, it also removes it from the hash table. */ + +#define MAGIC_NUMBER 0x1415fb4a +#define MAGIC_SIZE sizeof (int) +/* This is how the header info would look like without any alignment + considerations. */ +struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; +/* But the header's size must be a multiple of sa_alignment_max. */ +#define HEADER_SIZE \ + (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) +struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; +/* Verify that HEADER_SIZE == sizeof (struct header). */ +typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1]; +/* We make the hash table quite big, so that during lookups the probability + of empty hash buckets is quite high. There is no need to make the hash + table resizable, because when the hash table gets filled so much that the + lookup becomes slow, it means that the application has memory leaks. */ +#define HASH_TABLE_SIZE 257 +static void * mmalloca_results[HASH_TABLE_SIZE]; + +#endif + +void * +mmalloca (size_t n) +{ +#if HAVE_ALLOCA + /* Allocate one more word, that serves as an indicator for malloc()ed + memory, so that freea() of an alloca() result is fast. */ + size_t nplus = n + HEADER_SIZE; + + if (nplus >= n) + { + char *p = (char *) malloc (nplus); + + if (p != NULL) + { + size_t slot; + + p += HEADER_SIZE; + + /* Put a magic number into the indicator word. */ + ((int *) p)[-1] = MAGIC_NUMBER; + + /* Enter p into the hash table. */ + slot = (unsigned long) p % HASH_TABLE_SIZE; + ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; + mmalloca_results[slot] = p; + + return p; + } + } + /* Out of memory. */ + return NULL; +#else +# if !MALLOC_0_IS_NONNULL + if (n == 0) + n = 1; +# endif + return malloc (n); +#endif +} + +#if HAVE_ALLOCA +void +freea (void *p) +{ + /* mmalloca() may have returned NULL. */ + if (p != NULL) + { + /* Attempt to quickly distinguish the mmalloca() result - which has + a magic indicator word - and the alloca() result - which has an + uninitialized indicator word. It is for this test that sa_increment + additional bytes are allocated in the alloca() case. */ + if (((int *) p)[-1] == MAGIC_NUMBER) + { + /* Looks like a mmalloca() result. To see whether it really is one, + perform a lookup in the hash table. */ + size_t slot = (unsigned long) p % HASH_TABLE_SIZE; + void **chain = &mmalloca_results[slot]; + for (; *chain != NULL;) + { + if (*chain == p) + { + /* Found it. Remove it from the hash table and free it. */ + char *p_begin = (char *) p - HEADER_SIZE; + *chain = ((struct header *) p_begin)->next; + free (p_begin); + return; + } + chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; + } + } + /* At this point, we know it was not a mmalloca() result. */ + } +} +#endif diff --git a/lib/malloca.h b/lib/malloca.h new file mode 100644 index 000000000..7d92b0af5 --- /dev/null +++ b/lib/malloca.h @@ -0,0 +1,134 @@ +/* Safe automatic memory allocation. + Copyright (C) 2003-2007 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _MALLOCA_H +#define _MALLOCA_H + +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call + alloca(N); otherwise it returns NULL. It either returns N bytes of + memory allocated on the stack, that lasts until the function returns, + or NULL. + Use of safe_alloca should be avoided: + - inside arguments of function calls - undefined behaviour, + - in inline functions - the allocation may actually last until the + calling function returns. +*/ +#if HAVE_ALLOCA +/* The OS usually guarantees only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + allocate anything larger than 4096 bytes. Also care for the possibility + of a few compiler-allocated temporary stack slots. + This must be a macro, not an inline function. */ +# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) +#else +# define safe_alloca(N) ((void) (N), NULL) +#endif + +/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of + memory allocated on the stack, that must be freed using freea() before + the function returns. Upon failure, it returns NULL. */ +#if HAVE_ALLOCA +# define malloca(N) \ + ((N) < 4032 - sa_increment \ + ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ + : mmalloca (N)) +#else +# define malloca(N) \ + mmalloca (N) +#endif +extern void * mmalloca (size_t n); + +/* Free a block of memory allocated through malloca(). */ +#if HAVE_ALLOCA +extern void freea (void *p); +#else +# define freea free +#endif + +/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). + It allocates an array of N objects, each with S bytes of memory, + on the stack. S must be positive and N must be nonnegative. + The array must be freed using freea() before the function returns. */ +#if 1 +/* Cf. the definition of xalloc_oversized. */ +# define nmalloca(n, s) \ + ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ + ? NULL \ + : malloca ((n) * (s))) +#else +extern void * nmalloca (size_t n, size_t s); +#endif + + +#ifdef __cplusplus +} +#endif + + +/* ------------------- Auxiliary, non-public definitions ------------------- */ + +/* Determine the alignment of a type at compile time. */ +#if defined __GNUC__ +# define sa_alignof __alignof__ +#elif defined __cplusplus + template struct sa_alignof_helper { char __slot1; type __slot2; }; +# define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) +#elif defined __hpux + /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof + values. */ +# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) +#elif defined _AIX + /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof + values. */ +# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) +#else +# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) +#endif + +enum +{ +/* The desired alignment of memory allocations is the maximum alignment + among all elementary types. */ + sa_alignment_long = sa_alignof (long), + sa_alignment_double = sa_alignof (double), +#if HAVE_LONG_LONG_INT + sa_alignment_longlong = sa_alignof (long long), +#endif + sa_alignment_longdouble = sa_alignof (long double), + sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) +#if HAVE_LONG_LONG_INT + | (sa_alignment_longlong - 1) +#endif + | (sa_alignment_longdouble - 1) + ) + 1, +/* The increment that guarantees room for a magic word must be >= sizeof (int) + and a multiple of sa_alignment_max. */ + sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max +}; + +#endif /* _MALLOCA_H */ diff --git a/lib/malloca.valgrind b/lib/malloca.valgrind new file mode 100644 index 000000000..52f0a50f5 --- /dev/null +++ b/lib/malloca.valgrind @@ -0,0 +1,7 @@ +# Suppress a valgrind message about use of uninitialized memory in freea(). +# This use is OK because it provides only a speedup. +{ + freea + Memcheck:Cond + fun:freea +} diff --git a/lib/pathmax.h b/lib/pathmax.h new file mode 100644 index 000000000..a5d433560 --- /dev/null +++ b/lib/pathmax.h @@ -0,0 +1,47 @@ +/* Define PATH_MAX somehow. Requires sys/types.h. + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _PATHMAX_H +# define _PATHMAX_H + +# include + +# include + +# ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 256 +# endif + +# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ + : pathconf ("/", _PC_PATH_MAX)) +# endif + +/* Don't include sys/param.h if it already has been. */ +# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +# endif + +# if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# endif + +# ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +# endif + +#endif /* _PATHMAX_H */ diff --git a/lib/readlink.c b/lib/readlink.c new file mode 100644 index 000000000..c9f49f815 --- /dev/null +++ b/lib/readlink.c @@ -0,0 +1,49 @@ +/* Stub for readlink(). + Copyright (C) 2003-2007 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include + +#if !HAVE_READLINK + +/* readlink() substitute for systems that don't have a readlink() function, + such as DJGPP 2.03 and mingw32. */ + +/* The official POSIX return type of readlink() is ssize_t, but since here + we have no declaration in a public header file, we use 'int' as return + type. */ + +int +readlink (const char *path, char *buf, size_t bufsize) +{ + struct stat statbuf; + + /* In general we should use lstat() here, not stat(). But on platforms + without symbolic links lstat() - if it exists - would be equivalent to + stat(), therefore we can use stat(). This saves us a configure check. */ + if (stat (path, &statbuf) >= 0) + errno = EINVAL; + return -1; +} + +#endif diff --git a/lib/string.in.h b/lib/string.in.h index ca029d7c0..fe1142562 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2008 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -49,6 +49,21 @@ extern "C" { #endif +/* Return the first instance of C within N bytes of S, or NULL. */ +#if @GNULIB_MEMCHR@ +# if @REPLACE_MEMCHR@ +# define memchr rpl_memchr +extern void *memchr (void const *__s, int __c, size_t __n) + __attribute__ ((__pure__)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memchr +# define memchr(s,c,n) \ + (GL_LINK_WARNING ("memchr has platform-specific bugs - " \ + "use gnulib module memchr for portability" ), \ + memchr (s, c, n)) +#endif + /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ diff --git a/libguile.h b/libguile.h index 6a6d232f9..7b5649b8f 100644 --- a/libguile.h +++ b/libguile.h @@ -4,18 +4,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 46bc998af..8c9c598bf 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/libguile/__scm.h b/libguile/__scm.h index 07d7b4d3d..29b371d16 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/_scm.h b/libguile/_scm.h index e40f29bb0..429e87b7d 100644 --- a/libguile/_scm.h +++ b/libguile/_scm.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -78,20 +79,6 @@ #include "libguile/modules.h" #include "libguile/inline.h" -/* SCM_SYSCALL retries system calls that have been interrupted (EINTR). - However this can be avoided if the operating system can restart - system calls automatically. We assume this is the case if - sigaction is available and SA_RESTART is defined; they will be used - when installing signal handlers. - */ - -#ifdef HAVE_RESTARTABLE_SYSCALLS -#if ! SCM_USE_PTHREAD_THREADS /* However, don't assume SA_RESTART - works with pthreads... */ -#define SCM_SYSCALL(line) line -#endif -#endif - #ifndef SCM_SYSCALL #ifdef vms # ifndef __GNUC__ diff --git a/libguile/alist.c b/libguile/alist.c index ca55b082c..919bd224e 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/alist.h b/libguile/alist.h index 76cccba2b..77c565608 100644 --- a/libguile/alist.h +++ b/libguile/alist.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/arbiters.c b/libguile/arbiters.c index a341ed6db..cc68c85c4 100644 --- a/libguile/arbiters.c +++ b/libguile/arbiters.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/arbiters.h b/libguile/arbiters.h index 7a7dfd3fa..214e92a34 100644 --- a/libguile/arbiters.h +++ b/libguile/arbiters.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/async.c b/libguile/async.c index 4dc5ea475..d3fb0121b 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/async.h b/libguile/async.h index c01bde031..427d9b4c8 100644 --- a/libguile/async.h +++ b/libguile/async.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/backtrace.c b/libguile/backtrace.c index a8afcdf34..83579055f 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -2,18 +2,19 @@ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/backtrace.h b/libguile/backtrace.h index e11cb85de..c0651667c 100644 --- a/libguile/backtrace.h +++ b/libguile/backtrace.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,1998,1999,2000,2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/boolean.c b/libguile/boolean.c index 4b06e04e2..d79bf7979 100644 --- a/libguile/boolean.c +++ b/libguile/boolean.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995, 1996, 2000, 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/boolean.h b/libguile/boolean.h index 1388c2fdc..5a8379713 100644 --- a/libguile/boolean.h +++ b/libguile/boolean.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index 1de4db065..24afd2414 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -1,18 +1,19 @@ /* Copyright (C) 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -25,6 +26,7 @@ #include #include "libguile/_scm.h" +#include "libguile/extensions.h" #include "libguile/bytevectors.h" #include "libguile/strings.h" #include "libguile/validate.h" @@ -73,7 +75,7 @@ #define INTEGER_ACCESSOR_PROLOGUE(_len, _sign) \ - unsigned c_len, c_index; \ + size_t c_len, c_index; \ _sign char *c_bv; \ \ SCM_VALIDATE_BYTEVECTOR (1, bv); \ @@ -86,22 +88,22 @@ scm_out_of_range (FUNC_NAME, index); /* Template for fixed-size integer access (only 8, 16 or 32-bit). */ -#define INTEGER_REF(_len, _sign) \ - SCM result; \ - \ - INTEGER_ACCESSOR_PROLOGUE (_len, _sign); \ - SCM_VALIDATE_SYMBOL (3, endianness); \ - \ - { \ - INT_TYPE (_len, _sign) c_result; \ - \ - memcpy (&c_result, &c_bv[c_index], (_len) / 8); \ - if (!scm_is_eq (endianness, native_endianness)) \ - c_result = INT_SWAP (_len) (c_result); \ - \ - result = SCM_I_MAKINUM (c_result); \ - } \ - \ +#define INTEGER_REF(_len, _sign) \ + SCM result; \ + \ + INTEGER_ACCESSOR_PROLOGUE (_len, _sign); \ + SCM_VALIDATE_SYMBOL (3, endianness); \ + \ + { \ + INT_TYPE (_len, _sign) c_result; \ + \ + memcpy (&c_result, &c_bv[c_index], (_len) / 8); \ + if (!scm_is_eq (endianness, scm_i_native_endianness)) \ + c_result = INT_SWAP (_len) (c_result); \ + \ + result = SCM_I_MAKINUM (c_result); \ + } \ + \ return result; /* Template for fixed-size integer access using the native endianness. */ @@ -136,7 +138,7 @@ scm_out_of_range (FUNC_NAME, value); \ \ c_value_short = (INT_TYPE (_len, _sign)) c_value; \ - if (!scm_is_eq (endianness, native_endianness)) \ + if (!scm_is_eq (endianness, scm_i_native_endianness)) \ c_value_short = INT_SWAP (_len) (c_value_short); \ \ memcpy (&c_bv[c_index], &c_value_short, (_len) / 8); \ @@ -171,7 +173,7 @@ /* Bytevector type. */ -SCM_GLOBAL_SMOB (scm_tc16_bytevector, "r6rs-bytevector", 0); +scm_t_bits scm_tc16_bytevector; #define SCM_BYTEVECTOR_SET_LENGTH(_bv, _len) \ SCM_SET_SMOB_DATA ((_bv), (scm_t_bits) (_len)) @@ -183,14 +185,14 @@ SCM scm_null_bytevector = SCM_UNSPECIFIED; static inline SCM -make_bytevector_from_buffer (unsigned len, signed char *contents) +make_bytevector_from_buffer (size_t len, signed char *contents) { /* Assuming LEN > SCM_BYTEVECTOR_INLINE_THRESHOLD. */ SCM_RETURN_NEWSMOB2 (scm_tc16_bytevector, len, contents); } static inline SCM -make_bytevector (unsigned len) +make_bytevector (size_t len) { SCM bv; @@ -211,7 +213,7 @@ make_bytevector (unsigned len) /* Return a new bytevector of size LEN octets. */ SCM -scm_c_make_bytevector (unsigned len) +scm_c_make_bytevector (size_t len) { return (make_bytevector (len)); } @@ -219,7 +221,7 @@ scm_c_make_bytevector (unsigned len) /* Return a bytevector of size LEN made up of CONTENTS. The area pointed to by CONTENTS must have been allocated using `scm_gc_malloc ()'. */ SCM -scm_c_take_bytevector (signed char *contents, unsigned len) +scm_c_take_bytevector (signed char *contents, size_t len) { SCM bv; @@ -242,11 +244,11 @@ scm_c_take_bytevector (signed char *contents, unsigned len) /* Shrink BV to C_NEW_LEN (which is assumed to be smaller than its current size) and return BV. */ SCM -scm_i_shrink_bytevector (SCM bv, unsigned c_new_len) +scm_i_shrink_bytevector (SCM bv, size_t c_new_len) { if (!SCM_BYTEVECTOR_INLINE_P (bv)) { - unsigned c_len; + size_t c_len; signed char *c_bv, *c_new_bv; c_len = SCM_BYTEVECTOR_LENGTH (bv); @@ -273,8 +275,71 @@ scm_i_shrink_bytevector (SCM bv, unsigned c_new_len) return bv; } -SCM_SMOB_PRINT (scm_tc16_bytevector, print_bytevector, - bv, port, pstate) +int +scm_is_bytevector (SCM obj) +{ + return SCM_SMOB_PREDICATE (scm_tc16_bytevector, obj); +} + +size_t +scm_c_bytevector_length (SCM bv) +#define FUNC_NAME "scm_c_bytevector_length" +{ + SCM_VALIDATE_BYTEVECTOR (1, bv); + + return SCM_BYTEVECTOR_LENGTH (bv); +} +#undef FUNC_NAME + +scm_t_uint8 +scm_c_bytevector_ref (SCM bv, size_t index) +#define FUNC_NAME "scm_c_bytevector_ref" +{ + size_t c_len; + const scm_t_uint8 *c_bv; + + SCM_VALIDATE_BYTEVECTOR (1, bv); + + c_len = SCM_BYTEVECTOR_LENGTH (bv); + c_bv = (scm_t_uint8 *) SCM_BYTEVECTOR_CONTENTS (bv); + + if (SCM_UNLIKELY (index >= c_len)) + scm_out_of_range (FUNC_NAME, scm_from_size_t (index)); + + return c_bv[index]; +} +#undef FUNC_NAME + +void +scm_c_bytevector_set_x (SCM bv, size_t index, scm_t_uint8 value) +#define FUNC_NAME "scm_c_bytevector_set_x" +{ + size_t c_len; + scm_t_uint8 *c_bv; + + SCM_VALIDATE_BYTEVECTOR (1, bv); + + c_len = SCM_BYTEVECTOR_LENGTH (bv); + c_bv = (scm_t_uint8 *) SCM_BYTEVECTOR_CONTENTS (bv); + + if (SCM_UNLIKELY (index >= c_len)) + scm_out_of_range (FUNC_NAME, scm_from_size_t (index)); + + c_bv[index] = value; +} +#undef FUNC_NAME + +/* This procedure is used by `scm_c_generalized_vector_set_x ()'. */ +void +scm_i_bytevector_generalized_set_x (SCM bv, size_t index, SCM value) +#define FUNC_NAME "scm_i_bytevector_generalized_set_x" +{ + scm_c_bytevector_set_x (bv, index, scm_to_uint8 (value)); +} +#undef FUNC_NAME + +static int +print_bytevector (SCM bv, SCM port, scm_print_state *pstate) { unsigned c_len, i; unsigned char *c_bv; @@ -299,7 +364,14 @@ SCM_SMOB_PRINT (scm_tc16_bytevector, print_bytevector, return 1; } -SCM_SMOB_FREE (scm_tc16_bytevector, free_bytevector, bv) +static SCM +bytevector_equal_p (SCM bv1, SCM bv2) +{ + return scm_bytevector_eq_p (bv1, bv2); +} + +static size_t +free_bytevector (SCM bv) { if (!SCM_BYTEVECTOR_INLINE_P (bv)) @@ -326,7 +398,7 @@ SCM_SYMBOL (scm_sym_little, "little"); SCM scm_endianness_big, scm_endianness_little; /* Host endianness (a symbol). */ -static SCM native_endianness = SCM_UNSPECIFIED; +SCM scm_i_native_endianness = SCM_UNSPECIFIED; /* Byte-swapping. */ #ifndef bswap_24 @@ -342,7 +414,7 @@ SCM_DEFINE (scm_native_endianness, "native-endianness", 0, 0, 0, "Return a symbol denoting the machine's native endianness.") #define FUNC_NAME s_scm_native_endianness { - return native_endianness; + return scm_i_native_endianness; } #undef FUNC_NAME @@ -351,8 +423,7 @@ SCM_DEFINE (scm_bytevector_p, "bytevector?", 1, 0, 0, "Return true if @var{obj} is a bytevector.") #define FUNC_NAME s_scm_bytevector_p { - return (scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_bytevector, - obj))); + return scm_from_bool (scm_is_bytevector (obj)); } #undef FUNC_NAME @@ -397,9 +468,7 @@ SCM_DEFINE (scm_bytevector_length, "bytevector-length", 1, 0, 0, "Return the length (in bytes) of @var{bv}.") #define FUNC_NAME s_scm_bytevector_length { - SCM_VALIDATE_BYTEVECTOR (1, bv); - - return (scm_from_uint (SCM_BYTEVECTOR_LENGTH (bv))); + return scm_from_uint (scm_c_bytevector_length (bv)); } #undef FUNC_NAME @@ -799,7 +868,7 @@ bytevector_large_set (char *c_bv, size_t c_size, int signed_p, int swap; \ _sign int value; \ \ - swap = !scm_is_eq (endianness, native_endianness); \ + swap = !scm_is_eq (endianness, scm_i_native_endianness); \ switch (c_size) \ { \ case 1: \ @@ -874,7 +943,7 @@ bytevector_unsigned_ref (const char *c_bv, size_t c_size, SCM endianness) int swap; \ INT_TYPE (16, _sign) c_value16; \ \ - swap = !scm_is_eq (endianness, native_endianness); \ + swap = !scm_is_eq (endianness, scm_i_native_endianness); \ \ if (swap) \ c_value16 = (INT_TYPE (16, _sign)) bswap_16 (c_value); \ @@ -1224,7 +1293,7 @@ SCM_DEFINE (scm_bytevector_s16_native_set_x, "bytevector-s16-native-set!", #define LARGE_INTEGER_NATIVE_REF(_len, _sign) \ INTEGER_ACCESSOR_PROLOGUE(_len, _sign); \ return (bytevector_large_ref ((char *) c_bv + c_index, _len / 8, \ - SIGNEDNESS (_sign), native_endianness)); + SIGNEDNESS (_sign), scm_i_native_endianness)); #define LARGE_INTEGER_NATIVE_SET(_len, _sign) \ int err; \ @@ -1232,7 +1301,7 @@ SCM_DEFINE (scm_bytevector_s16_native_set_x, "bytevector-s16-native-set!", \ err = bytevector_large_set ((char *) c_bv + c_index, _len / 8, \ SIGNEDNESS (_sign), value, \ - native_endianness); \ + scm_i_native_endianness); \ if (SCM_UNLIKELY (err)) \ scm_out_of_range (FUNC_NAME, value); \ \ @@ -1571,7 +1640,7 @@ double_from_foreign_endianness (const union scm_ieee754_double *source) IEEE754_ACCESSOR_PROLOGUE (_type); \ SCM_VALIDATE_SYMBOL (3, endianness); \ \ - if (scm_is_eq (endianness, native_endianness)) \ + if (scm_is_eq (endianness, scm_i_native_endianness)) \ memcpy (&c_result, &c_bv[c_index], sizeof (c_result)); \ else \ { \ @@ -1600,7 +1669,7 @@ double_from_foreign_endianness (const union scm_ieee754_double *source) SCM_VALIDATE_SYMBOL (4, endianness); \ c_value = IEEE754_FROM_SCM (_type) (value); \ \ - if (scm_is_eq (endianness, native_endianness)) \ + if (scm_is_eq (endianness, scm_i_native_endianness)) \ memcpy (&c_bv[c_index], &c_value, sizeof (c_value)); \ else \ { \ @@ -1992,20 +2061,36 @@ SCM_DEFINE (scm_utf32_to_string, "utf32->string", /* Initialization. */ +void +scm_bootstrap_bytevectors (void) +{ + /* The SMOB type must be instantiated here because the + generalized-vector API may want to access bytevectors even though + `(rnrs bytevector)' hasn't been loaded. */ + scm_tc16_bytevector = scm_make_smob_type ("bytevector", 0); + scm_set_smob_free (scm_tc16_bytevector, free_bytevector); + scm_set_smob_print (scm_tc16_bytevector, print_bytevector); + scm_set_smob_equalp (scm_tc16_bytevector, bytevector_equal_p); + + scm_null_bytevector = + scm_gc_protect_object (make_bytevector_from_buffer (0, NULL)); + +#ifdef WORDS_BIGENDIAN + scm_i_native_endianness = scm_permanent_object (scm_from_locale_symbol ("big")); +#else + scm_i_native_endianness = scm_permanent_object (scm_from_locale_symbol ("little")); +#endif + + scm_c_register_extension ("libguile", "scm_init_bytevectors", + (scm_t_extension_init_func) scm_init_bytevectors, + NULL); +} + void scm_init_bytevectors (void) { #include "libguile/bytevectors.x" -#ifdef WORDS_BIGENDIAN - native_endianness = scm_sym_big; -#else - native_endianness = scm_sym_little; -#endif - scm_endianness_big = scm_sym_big; scm_endianness_little = scm_sym_little; - - scm_null_bytevector = - scm_gc_protect_object (make_bytevector_from_buffer (0, NULL)); } diff --git a/libguile/bytevectors.h b/libguile/bytevectors.h index b01116ce6..cb2726251 100644 --- a/libguile/bytevectors.h +++ b/libguile/bytevectors.h @@ -4,18 +4,19 @@ /* Copyright (C) 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -26,7 +27,7 @@ /* R6RS bytevectors. */ #define SCM_BYTEVECTOR_LENGTH(_bv) \ - ((unsigned) SCM_SMOB_DATA (_bv)) + ((size_t) SCM_SMOB_DATA (_bv)) #define SCM_BYTEVECTOR_CONTENTS(_bv) \ (SCM_BYTEVECTOR_INLINE_P (_bv) \ ? (signed char *) SCM_SMOB_OBJECT_2_LOC (_bv) \ @@ -36,8 +37,13 @@ SCM_API SCM scm_endianness_big; SCM_API SCM scm_endianness_little; +SCM_API SCM scm_c_make_bytevector (size_t); +SCM_API int scm_is_bytevector (SCM); +SCM_API size_t scm_c_bytevector_length (SCM); +SCM_API scm_t_uint8 scm_c_bytevector_ref (SCM, size_t); +SCM_API void scm_c_bytevector_set_x (SCM, size_t, scm_t_uint8); + SCM_API SCM scm_make_bytevector (SCM, SCM); -SCM_API SCM scm_c_make_bytevector (unsigned); SCM_API SCM scm_native_endianness (void); SCM_API SCM scm_bytevector_p (SCM); SCM_API SCM scm_bytevector_length (SCM); @@ -110,6 +116,8 @@ SCM_API SCM scm_utf32_to_string (SCM, SCM); i.e., without allocating memory beside the SMOB itself (a double cell). This optimization is necessary since small bytevectors are expected to be common. */ +#define SCM_BYTEVECTOR_P(_bv) \ + SCM_SMOB_PREDICATE (scm_tc16_bytevector, _bv) #define SCM_BYTEVECTOR_INLINE_THRESHOLD (2 * sizeof (SCM)) #define SCM_BYTEVECTOR_INLINEABLE_SIZE_P(_size) \ ((_size) <= SCM_BYTEVECTOR_INLINE_THRESHOLD) @@ -119,17 +127,20 @@ SCM_API SCM scm_utf32_to_string (SCM, SCM); /* Hint that is passed to `scm_gc_malloc ()' and friends. */ #define SCM_GC_BYTEVECTOR "bytevector" -SCM_API void scm_init_bytevectors (void); +SCM_INTERNAL void scm_bootstrap_bytevectors (void); +SCM_INTERNAL void scm_init_bytevectors (void); SCM_INTERNAL scm_t_bits scm_tc16_bytevector; -SCM_INTERNAL SCM scm_c_take_bytevector (signed char *, unsigned); +SCM_INTERNAL SCM scm_i_native_endianness; +SCM_INTERNAL SCM scm_c_take_bytevector (signed char *, size_t); #define scm_c_shrink_bytevector(_bv, _len) \ (SCM_BYTEVECTOR_INLINE_P (_bv) \ ? (_bv) \ : scm_i_shrink_bytevector ((_bv), (_len))) -SCM_INTERNAL SCM scm_i_shrink_bytevector (SCM, unsigned); +SCM_INTERNAL SCM scm_i_shrink_bytevector (SCM, size_t); +SCM_INTERNAL void scm_i_bytevector_generalized_set_x (SCM, size_t, SCM); SCM_INTERNAL SCM scm_null_bytevector; #endif /* SCM_BYTEVECTORS_H */ diff --git a/libguile/chars.c b/libguile/chars.c index 909e11d57..ca47c0d82 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998, 2000, 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/chars.h b/libguile/chars.h index 97c611af4..88dde4bd9 100644 --- a/libguile/chars.h +++ b/libguile/chars.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001,2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/continuations.c b/libguile/continuations.c index dc1456985..f85647684 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001,2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/continuations.h b/libguile/continuations.h index e5fd91f2e..08eec8f54 100644 --- a/libguile/continuations.h +++ b/libguile/continuations.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/convert.c b/libguile/convert.c index 700deaa87..d87d72464 100644 --- a/libguile/convert.c +++ b/libguile/convert.c @@ -1,18 +1,19 @@ /* Copyright (C) 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/convert.h b/libguile/convert.h index f834a6b1d..6ce7c2274 100644 --- a/libguile/convert.h +++ b/libguile/convert.h @@ -6,18 +6,19 @@ /* Copyright (C) 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/debug-malloc.c b/libguile/debug-malloc.c index 4d04df5db..fa3612de2 100644 --- a/libguile/debug-malloc.c +++ b/libguile/debug-malloc.c @@ -1,18 +1,19 @@ /* Copyright (C) 2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/debug-malloc.h b/libguile/debug-malloc.h index 1aa5221c6..7830adbac 100644 --- a/libguile/debug-malloc.h +++ b/libguile/debug-malloc.h @@ -6,18 +6,19 @@ /* Copyright (C) 2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/debug.c b/libguile/debug.c index 5042fbb73..71278c5e4 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -2,18 +2,19 @@ * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006, 2008, 2009 Free Software Foundation * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -308,7 +309,7 @@ SCM_DEFINE (scm_procedure_name, "procedure-name", 1, 0, 0, SCM_VALIDATE_PROC (1, proc); switch (SCM_TYP7 (proc)) { case scm_tcs_subrs: - return SCM_SNAME (proc); + return SCM_SUBR_NAME (proc); default: { SCM name = scm_procedure_property (proc, scm_sym_name); diff --git a/libguile/debug.h b/libguile/debug.h index 4d16fd83a..20febdb71 100644 --- a/libguile/debug.h +++ b/libguile/debug.h @@ -7,18 +7,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/deprecated.c b/libguile/deprecated.c index 979de84e1..57a2f0657 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -5,18 +5,19 @@ /* Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/deprecated.h b/libguile/deprecated.h index 9a0862c3e..5b443c761 100644 --- a/libguile/deprecated.h +++ b/libguile/deprecated.h @@ -8,18 +8,19 @@ /* Copyright (C) 2003,2004, 2005, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include "libguile/__scm.h" diff --git a/libguile/deprecation.c b/libguile/deprecation.c index 780e246f0..af8b93610 100644 --- a/libguile/deprecation.c +++ b/libguile/deprecation.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -171,4 +172,5 @@ scm_init_deprecation () /* Local Variables: c-file-style: "gnu" - End: */ + End: + */ diff --git a/libguile/deprecation.h b/libguile/deprecation.h index 9752d9b16..06027c694 100644 --- a/libguile/deprecation.h +++ b/libguile/deprecation.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/discouraged.c b/libguile/discouraged.c index 9efd92a00..357cac875 100644 --- a/libguile/discouraged.c +++ b/libguile/discouraged.c @@ -5,18 +5,19 @@ /* Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/discouraged.h b/libguile/discouraged.h index 6e537bf1e..1be05f0bc 100644 --- a/libguile/discouraged.h +++ b/libguile/discouraged.h @@ -16,18 +16,19 @@ /* Copyright (C) 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include "libguile/__scm.h" diff --git a/libguile/dynl.c b/libguile/dynl.c index b2f0fb9ed..9ac4d4f53 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -4,18 +4,19 @@ * 2003, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/dynl.h b/libguile/dynl.h index 72dc92ea4..eb318ae98 100644 --- a/libguile/dynl.h +++ b/libguile/dynl.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/dynwind.c b/libguile/dynwind.c index 999ba23e0..a45c5b5a3 100644 --- a/libguile/dynwind.c +++ b/libguile/dynwind.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/dynwind.h b/libguile/dynwind.h index dd39dae5a..b178bc429 100644 --- a/libguile/dynwind.h +++ b/libguile/dynwind.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2003,2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/environments.c b/libguile/environments.c index b81527eef..fae936a6e 100644 --- a/libguile/environments.c +++ b/libguile/environments.c @@ -1,18 +1,19 @@ /* Copyright (C) 1999,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/environments.h b/libguile/environments.h index 10d42a704..5680662b5 100644 --- a/libguile/environments.h +++ b/libguile/environments.h @@ -6,18 +6,19 @@ /* Copyright (C) 1999,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/eq.c b/libguile/eq.c index b54a7043a..255c381a0 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001,2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/eq.h b/libguile/eq.h index af6959fe8..1aeb1c496 100644 --- a/libguile/eq.h +++ b/libguile/eq.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/error.c b/libguile/error.c index e18db9e82..eb513a74a 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/error.h b/libguile/error.h index 042fb4d14..c777a7f44 100644 --- a/libguile/error.h +++ b/libguile/error.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/eval.c b/libguile/eval.c index 05af5a1c5..f7f3f27df 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -2,18 +2,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -3028,8 +3029,19 @@ scm_t_option scm_debug_opts[] = { { SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." }, { SCM_OPTION_BOOLEAN, "backtrace", 0, "Show backtrace on error." }, { SCM_OPTION_BOOLEAN, "debug", 0, "Use the debugging evaluator." }, + /* This default stack limit will be overridden by debug.c:init_stack_limit(), + if we have getrlimit() and the stack limit is not INFINITY. But it is still + important, as some systems have both the soft and the hard limits set to + INFINITY; in that case we fall back to this value. - { SCM_OPTION_INTEGER, "stack", 40000, "Stack size limit (measured in words; 0 = no check)." }, + The situation is aggravated by certain compilers, which can consume + "beaucoup de stack", as they say in France. + + See http://thread.gmane.org/gmane.lisp.guile.devel/8599/focus=8662 for + more discussion. This setting is 640 KB on 32-bit arches (should be enough + for anyone!) or a whoppin' 1280 KB on 64-bit arches. + */ + { SCM_OPTION_INTEGER, "stack", 160000, "Stack size limit (measured in words; 0 = no check)." }, { SCM_OPTION_SCM, "show-file-name", (unsigned long)SCM_BOOL_T, "Show file names and line numbers " "in backtraces when not `#f'. A value of `base' " @@ -3385,7 +3397,7 @@ call_dsubr_1 (SCM proc, SCM arg1) return (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1)))); } SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1, - SCM_ARG1, scm_i_symbol_chars (SCM_SNAME (proc))); + SCM_ARG1, scm_i_symbol_chars (SCM_SUBR_NAME (proc))); } static SCM diff --git a/libguile/eval.h b/libguile/eval.h index b017f2e02..0d4223837 100644 --- a/libguile/eval.h +++ b/libguile/eval.h @@ -7,18 +7,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/eval.i.c b/libguile/eval.i.c index 573a7b5fb..99aa265de 100644 --- a/libguile/eval.i.c +++ b/libguile/eval.i.c @@ -4,18 +4,19 @@ * Copyright (C) 2002, 03, 04, 05, 06, 07, 09 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #undef RETURN @@ -1237,7 +1238,7 @@ dispatch: } SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1, SCM_ARG1, - scm_i_symbol_chars (SCM_SNAME (proc))); + scm_i_symbol_chars (SCM_SUBR_NAME (proc))); case scm_tc7_cxr: RETURN (scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc))); case scm_tc7_rpsubr: @@ -1764,7 +1765,7 @@ tail: RETURN (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1)))); } SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1, - SCM_ARG1, scm_i_symbol_chars (SCM_SNAME (proc))); + SCM_ARG1, scm_i_symbol_chars (SCM_SUBR_NAME (proc))); case scm_tc7_cxr: if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args))) scm_wrong_num_args (proc); diff --git a/libguile/evalext.c b/libguile/evalext.c index 5ca78066d..56f74e213 100644 --- a/libguile/evalext.c +++ b/libguile/evalext.c @@ -1,18 +1,19 @@ /* Copyright (C) 1998,1999,2000,2001,2002,2003, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/evalext.h b/libguile/evalext.h index a6a4a9fdc..fc3f1e617 100644 --- a/libguile/evalext.h +++ b/libguile/evalext.h @@ -6,18 +6,19 @@ /* Copyright (C) 1998,1999,2000, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/extensions.c b/libguile/extensions.c index 29cb58cbe..54351dd9c 100644 --- a/libguile/extensions.c +++ b/libguile/extensions.c @@ -3,18 +3,19 @@ * Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/extensions.h b/libguile/extensions.h index 260567e51..765f9bee1 100644 --- a/libguile/extensions.h +++ b/libguile/extensions.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/feature.c b/libguile/feature.c index 8283cd6f5..9ef4b658e 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/feature.h b/libguile/feature.h index 8c6371e94..d373bc773 100644 --- a/libguile/feature.h +++ b/libguile/feature.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1999,2000,2001, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/filesys.c b/libguile/filesys.c index 4799dd4b1..a2db6996f 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1,18 +1,19 @@ /* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -29,6 +30,7 @@ #endif #include +#include #include #include @@ -1660,6 +1662,27 @@ SCM_DEFINE (scm_basename, "basename", 1, 1, 0, } #undef FUNC_NAME +SCM_DEFINE (scm_canonicalize_path, "canonicalize-path", 1, 0, 0, + (SCM path), + "Return the canonical path of @var{path}. A canonical path has\n" + "no @code{.} or @code{..} components, nor any repeated path\n" + "separators (@code{/}) nor symlinks.\n\n" + "Raises an error if any component of @var{path} does not exist.") +#define FUNC_NAME s_scm_canonicalize_path +{ char *str, *canon; + + SCM_VALIDATE_STRING (1, path); + + str = scm_to_locale_string (path); + canon = canonicalize_file_name (str); + free (str); + + if (canon) + return scm_take_locale_string (canon); + else + SCM_SYSERROR; +} +#undef FUNC_NAME diff --git a/libguile/filesys.h b/libguile/filesys.h index cf0a6acf2..b9a6ca8a6 100644 --- a/libguile/filesys.h +++ b/libguile/filesys.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1997,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -64,6 +65,7 @@ SCM_API SCM scm_lstat (SCM str); SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile); SCM_API SCM scm_dirname (SCM filename); SCM_API SCM scm_basename (SCM filename, SCM suffix); +SCM_API SCM scm_canonicalize_path (SCM path); SCM_INTERNAL void scm_init_filesys (void); diff --git a/libguile/fluids.c b/libguile/fluids.c index 4311a4967..bcd04c43d 100644 --- a/libguile/fluids.c +++ b/libguile/fluids.c @@ -1,18 +1,19 @@ /* Copyright (C) 1996,1997,2000,2001, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/fluids.h b/libguile/fluids.h index c48a8c332..cf424fa6e 100644 --- a/libguile/fluids.h +++ b/libguile/fluids.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/fports.c b/libguile/fports.c index fd825c852..f6e05566b 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -1,18 +1,19 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -670,8 +671,8 @@ fport_seek_or_seek64 (SCM port, off_t_or_off64_t offset, int whence) fport_seek already. */ #if GUILE_USE_64_CALLS && HAVE_STAT64 && SIZEOF_OFF_T != SIZEOF_OFF64_T -static off_t -fport_seek (SCM port, off_t offset, int whence) +static scm_t_off +fport_seek (SCM port, scm_t_off offset, int whence) { off64_t rv = fport_seek_or_seek64 (port, (off64_t) offset, whence); if (rv > OFF_T_MAX || rv < OFF_T_MIN) @@ -679,7 +680,7 @@ fport_seek (SCM port, off_t offset, int whence) errno = EOVERFLOW; scm_syserror ("fport_seek"); } - return (off_t) rv; + return (scm_t_off) rv; } #else @@ -695,7 +696,7 @@ scm_i_fport_seek (SCM port, SCM offset, int how) } static void -fport_truncate (SCM port, off_t length) +fport_truncate (SCM port, scm_t_off length) { scm_t_fport *fp = SCM_FSTREAM (port); @@ -747,7 +748,7 @@ fport_write (SCM port, const void *data, size_t size) } { - off_t space = pt->write_end - pt->write_pos; + scm_t_off space = pt->write_end - pt->write_pos; if (size <= space) { diff --git a/libguile/fports.h b/libguile/fports.h index c737b1eaa..2687504bb 100644 --- a/libguile/fports.h +++ b/libguile/fports.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/frames.c b/libguile/frames.c index c08fd3134..76552f54f 100644 --- a/libguile/frames.c +++ b/libguile/frames.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H diff --git a/libguile/frames.h b/libguile/frames.h index d74476ac8..99623fb16 100644 --- a/libguile/frames.h +++ b/libguile/frames.h @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SCM_FRAMES_H_ diff --git a/libguile/futures.c b/libguile/futures.c index 5b1a3fb7e..ad70f7fab 100644 --- a/libguile/futures.c +++ b/libguile/futures.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/futures.h b/libguile/futures.h index 95916f33b..5d7712e1a 100644 --- a/libguile/futures.h +++ b/libguile/futures.h @@ -6,18 +6,19 @@ /* Copyright (C) 2002, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gc-card.c b/libguile/gc-card.c index 0629da078..85520f8e4 100644 --- a/libguile/gc-card.c +++ b/libguile/gc-card.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/gc-freelist.c b/libguile/gc-freelist.c index 4dd77aa0d..54a10e7b2 100644 --- a/libguile/gc-freelist.c +++ b/libguile/gc-freelist.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c index cdc985e37..d6973d3ac 100644 --- a/libguile/gc-malloc.c +++ b/libguile/gc-malloc.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gc-mark.c b/libguile/gc-mark.c index 88bea8052..84714507b 100644 --- a/libguile/gc-mark.c +++ b/libguile/gc-mark.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gc-segment-table.c b/libguile/gc-segment-table.c index 3e92c8c5c..75d109c85 100644 --- a/libguile/gc-segment-table.c +++ b/libguile/gc-segment-table.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/gc-segment.c b/libguile/gc-segment.c index 4f98cbcde..7a937e6de 100644 --- a/libguile/gc-segment.c +++ b/libguile/gc-segment.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/gc.c b/libguile/gc.c index ce8c8af73..b7a3bf091 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* #define DEBUGINFO */ diff --git a/libguile/gc.h b/libguile/gc.h index 58ac77241..8db76e310 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gdb_interface.h b/libguile/gdb_interface.h index 5be4d0786..2278fc2c2 100644 --- a/libguile/gdb_interface.h +++ b/libguile/gdb_interface.h @@ -5,19 +5,20 @@ /* Simple interpreter interface for GDB, the GNU debugger. Copyright (C) 1996, 2000, 2001, 2006 Free Software Foundation - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA The author can be reached at djurfeldt@nada.kth.se Mikael Djurfeldt, SANS/NADA KTH, 10044 STOCKHOLM, SWEDEN */ diff --git a/libguile/gdbint.c b/libguile/gdbint.c index b9c25c9cd..0f74ce116 100644 --- a/libguile/gdbint.c +++ b/libguile/gdbint.c @@ -3,18 +3,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/gdbint.h b/libguile/gdbint.h index 64b9559c9..d7c6cf31e 100644 --- a/libguile/gdbint.h +++ b/libguile/gdbint.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c index 85ebfaed7..98fcc885e 100644 --- a/libguile/gen-scmconfig.c +++ b/libguile/gen-scmconfig.c @@ -400,6 +400,24 @@ main (int argc, char *argv[]) pf ("#define SCM_HAVE_READDIR64_R 0 /* 0 or 1 */\n"); #endif + /* Arrange so that we have a file offset type that reflects the one + used when compiling Guile, regardless of what the application's + `_FILE_OFFSET_BITS' says. See + http://lists.gnu.org/archive/html/bug-guile/2009-06/msg00018.html + for the original bug report. + + Note that we can't define `scm_t_off' in terms of `off_t' or + `off64_t' because they may or may not be available depending on + how the application that uses Guile is compiled. */ + +#if defined GUILE_USE_64_CALLS && defined HAVE_STAT64 + pf ("typedef scm_t_int64 scm_t_off;\n"); +#elif SIZEOF_OFF_T == SIZEOF_INT + pf ("typedef int scm_t_off;\n"); +#else + pf ("typedef long int scm_t_off;\n"); +#endif + #if USE_DLL_IMPORT pf ("\n"); pf ("/* Define some additional CPP macros on Win32 platforms. */\n"); diff --git a/libguile/gettext.c b/libguile/gettext.c index e74f9f351..2ae3ae5e4 100644 --- a/libguile/gettext.c +++ b/libguile/gettext.c @@ -1,18 +1,19 @@ /* Copyright (C) 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gettext.h b/libguile/gettext.h index 8a13307d5..d4576bd6a 100644 --- a/libguile/gettext.h +++ b/libguile/gettext.h @@ -6,18 +6,19 @@ /* Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include "libguile/__scm.h" diff --git a/libguile/goops.c b/libguile/goops.c index b623212ad..1548472cb 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -2,18 +2,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -1861,7 +1862,7 @@ SCM_DEFINE (scm_enable_primitive_generic_x, "enable-primitive-generic!", 0, 0, 1 *SCM_SUBR_GENERIC (subr) = scm_make (scm_list_3 (scm_class_generic, k_name, - SCM_SNAME (subr))); + SCM_SUBR_NAME (subr))); subrs = SCM_CDR (subrs); } return SCM_UNSPECIFIED; @@ -1904,7 +1905,7 @@ scm_c_extend_primitive_generic (SCM extended, SCM extension) gf = *SCM_SUBR_GENERIC (extended); gext = scm_call_2 (SCM_VARIABLE_REF (scm_var_make_extended_generic), gf, - SCM_SNAME (extension)); + SCM_SUBR_NAME (extension)); SCM_SET_SUBR_GENERIC (extension, gext); } else diff --git a/libguile/goops.h b/libguile/goops.h index d43d73642..8d138237a 100644 --- a/libguile/goops.h +++ b/libguile/goops.h @@ -6,18 +6,19 @@ /* Copyright (C) 1998,1999,2000,2001,2002,2003, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/gsubr.c b/libguile/gsubr.c index 5e5b4c10e..3b7315565 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -93,7 +94,7 @@ create_gsubr (int define, const char *name, } if (define) - scm_define (SCM_SNAME (subr), subr); + scm_define (SCM_SUBR_NAME (subr), subr); return subr; } @@ -148,7 +149,7 @@ create_gsubr_with_generic (int define, subr = scm_c_make_subr_with_generic (name, scm_tc7_lsubr_2, fcn, gf); create_subr: if (define) - scm_define (SCM_SNAME (subr), subr); + scm_define (SCM_SUBR_NAME (subr), subr); return subr; default: ; @@ -195,7 +196,7 @@ gsubr_apply_raw (SCM proc, unsigned int argc, const SCM *argv) if (SCM_UNLIKELY (argc != argc_max)) /* We expect the exact argument count. */ - scm_wrong_num_args (SCM_SNAME (proc)); + scm_wrong_num_args (SCM_SUBR_NAME (proc)); fcn = SCM_SUBRF (proc); @@ -228,7 +229,7 @@ gsubr_apply_raw (SCM proc, unsigned int argc, const SCM *argv) return (*fcn) (argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); default: - scm_misc_error ((char *) SCM_SNAME (proc), + scm_misc_error ((char *) SCM_SUBR_NAME (proc), "gsubr invocation with more than 10 arguments not implemented", SCM_EOL); } @@ -257,7 +258,7 @@ scm_i_gsubr_apply (SCM proc, SCM arg, ...) argv[argc] = arg; if (SCM_UNLIKELY (argc < SCM_GSUBR_REQ (type))) - scm_wrong_num_args (SCM_SNAME (proc)); + scm_wrong_num_args (SCM_SUBR_NAME (proc)); /* Fill in optional arguments that were not passed. */ while (argc < argc_max) @@ -295,7 +296,7 @@ scm_i_gsubr_apply_list (SCM self, SCM args) for (i = 0; i < SCM_GSUBR_REQ (typ); i++) { if (scm_is_null (args)) - scm_wrong_num_args (SCM_SNAME (self)); + scm_wrong_num_args (SCM_SUBR_NAME (self)); v[i] = SCM_CAR(args); args = SCM_CDR(args); } @@ -310,7 +311,7 @@ scm_i_gsubr_apply_list (SCM self, SCM args) if (SCM_GSUBR_REST(typ)) v[i] = args; else if (!scm_is_null (args)) - scm_wrong_num_args (SCM_SNAME (self)); + scm_wrong_num_args (SCM_SUBR_NAME (self)); return gsubr_apply_raw (self, n, v); } diff --git a/libguile/gsubr.h b/libguile/gsubr.h index 65680a02c..298181b15 100644 --- a/libguile/gsubr.h +++ b/libguile/gsubr.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/guardians.c b/libguile/guardians.c index e2af7840d..f7bbb4b02 100644 --- a/libguile/guardians.c +++ b/libguile/guardians.c @@ -1,18 +1,19 @@ /* Copyright (C) 1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/guardians.h b/libguile/guardians.h index 295092edf..a23026d6c 100644 --- a/libguile/guardians.h +++ b/libguile/guardians.h @@ -6,18 +6,19 @@ /* Copyright (C) 1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/guile-doc-snarf.in b/libguile/guile-doc-snarf.in index 49be29185..a787d5a46 100755 --- a/libguile/guile-doc-snarf.in +++ b/libguile/guile-doc-snarf.in @@ -4,19 +4,19 @@ # Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this software; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this software; see the file COPYING.LESSER. If +# not, write to the Free Software Foundation, Inc., 51 Franklin +# Street, Fifth Floor, Boston, MA 02110-1301 USA fullfilename=$1 diff --git a/libguile/guile-func-name-check.in b/libguile/guile-func-name-check.in index 7f0114e0b..8b4924e91 100644 --- a/libguile/guile-func-name-check.in +++ b/libguile/guile-func-name-check.in @@ -3,19 +3,19 @@ # Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or (at +# your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this software; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this software; see the file COPYING.LESSER. If +# not, write to the Free Software Foundation, Inc., 51 Franklin +# Street, Fifth Floor, Boston, MA 02110-1301 USA # # Written by Greg J. Badros, # 11-Jan-2000 diff --git a/libguile/guile-snarf-docs.in b/libguile/guile-snarf-docs.in index 9cba3dc56..1e57f2624 100755 --- a/libguile/guile-snarf-docs.in +++ b/libguile/guile-snarf-docs.in @@ -4,19 +4,19 @@ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or (at +# your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this software; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this software; see the file COPYING.LESSER. If +# not, write to the Free Software Foundation, Inc., 51 Franklin +# Street, Fifth Floor, Boston, MA 02110-1301 USA bindir=`dirname $0` diff --git a/libguile/guile-snarf.awk.in b/libguile/guile-snarf.awk.in index be3b1236d..8a720a002 100644 --- a/libguile/guile-snarf.awk.in +++ b/libguile/guile-snarf.awk.in @@ -1,19 +1,19 @@ # Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or (at +# your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this software; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this software; see the file COPYING.LESSER. If +# not, write to the Free Software Foundation, Inc., 51 Franklin +# Street, Fifth Floor, Boston, MA 02110-1301 USA # # Written by Greg J. Badros, # 12-Dec-1999 diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index 617bad822..6a72dd5d5 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -4,19 +4,19 @@ # Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this software; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this software; see the file COPYING.LESSER. If +# not, write to the Free Software Foundation, Inc., 51 Franklin +# Street, Fifth Floor, Boston, MA 02110-1301 USA # Commentary: diff --git a/libguile/guile.c b/libguile/guile.c index c8341c24f..6da547b75 100644 --- a/libguile/guile.c +++ b/libguile/guile.c @@ -1,18 +1,19 @@ /* Copyright (C) 1996,1997,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* This is the 'main' function for the `guile' executable. It is not diff --git a/libguile/hash.c b/libguile/hash.c index 7a49de6b4..d2fe17706 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997, 2000, 2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/hash.h b/libguile/hash.h index bbf9b2562..789595b42 100644 --- a/libguile/hash.h +++ b/libguile/hash.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 79e635fc4..e3a6c431c 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/hashtab.h b/libguile/hashtab.h index 4220b8668..13100f0a4 100644 --- a/libguile/hashtab.h +++ b/libguile/hashtab.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/hooks.c b/libguile/hooks.c index 5ca8580df..d6b8981d5 100644 --- a/libguile/hooks.c +++ b/libguile/hooks.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/hooks.h b/libguile/hooks.h index 49ea55350..15b57fabb 100644 --- a/libguile/hooks.h +++ b/libguile/hooks.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/i18n.c b/libguile/i18n.c index 8cacf5f8d..7dcfa5a1e 100644 --- a/libguile/i18n.c +++ b/libguile/i18n.c @@ -1,18 +1,19 @@ /* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/i18n.h b/libguile/i18n.h index 57f1654a3..df2970b4e 100644 --- a/libguile/i18n.h +++ b/libguile/i18n.h @@ -6,18 +6,19 @@ /* Copyright (C) 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include "libguile/__scm.h" diff --git a/libguile/init.c b/libguile/init.c index c72aeff4c..5ece01fb0 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -37,6 +38,7 @@ #include "libguile/async.h" #include "libguile/backtrace.h" #include "libguile/boolean.h" +#include "libguile/bytevectors.h" #include "libguile/chars.h" #include "libguile/continuations.h" #include "libguile/debug.h" @@ -572,6 +574,7 @@ scm_i_init_guile (SCM_STACKITEM *base) scm_init_rw (); scm_init_extensions (); + scm_bootstrap_bytevectors (); scm_bootstrap_vm (); atexit (cleanup_for_exit); diff --git a/libguile/init.h b/libguile/init.h index 3ae27d8cc..7cfae76d5 100644 --- a/libguile/init.h +++ b/libguile/init.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/inline.c b/libguile/inline.c index a0c25003f..79728ff13 100644 --- a/libguile/inline.c +++ b/libguile/inline.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/inline.h b/libguile/inline.h index 6fbde7910..cb908581d 100644 --- a/libguile/inline.h +++ b/libguile/inline.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* This file is for inline functions. On platforms that don't support diff --git a/libguile/instructions.c b/libguile/instructions.c index f0f52e422..8e6d16993 100644 --- a/libguile/instructions.c +++ b/libguile/instructions.c @@ -1,18 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H @@ -108,10 +109,11 @@ SCM_DEFINE (scm_instruction_list, "instruction-list", 0, 0, 0, #define FUNC_NAME s_scm_instruction_list { SCM list = SCM_EOL; - struct scm_instruction *ip; - for (ip = fetch_instruction_table (); ip->opcode != scm_op_last; ip++) - if (ip->name) - list = scm_cons (ip->symname, list); + int i; + struct scm_instruction *ip = fetch_instruction_table (); + for (i = 0; i < scm_op_last; i++) + if (ip[i].name) + list = scm_cons (ip[i].symname, list); return scm_reverse_x (list, SCM_EOL); } #undef FUNC_NAME diff --git a/libguile/instructions.h b/libguile/instructions.h index f4f45b371..d081b3efb 100644 --- a/libguile/instructions.h +++ b/libguile/instructions.h @@ -1,18 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SCM_INSTRUCTIONS_H_ @@ -20,7 +21,7 @@ #include -#define SCM_VM_NUM_INSTRUCTIONS (1<<7) +#define SCM_VM_NUM_INSTRUCTIONS (1<<8) #define SCM_VM_INSTRUCTION_MASK (SCM_VM_NUM_INSTRUCTIONS-1) enum scm_opcode { diff --git a/libguile/ioext.c b/libguile/ioext.c index b542664eb..6b0c9b88c 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/ioext.h b/libguile/ioext.h index 18289ea3c..1b7b93aaf 100644 --- a/libguile/ioext.h +++ b/libguile/ioext.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/iselect.h b/libguile/iselect.h index 5a4b30da6..760d959d8 100644 --- a/libguile/iselect.h +++ b/libguile/iselect.h @@ -6,18 +6,19 @@ /* Copyright (C) 1997,1998,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/keywords.c b/libguile/keywords.c index 0f9f13e9b..ee4c3ff42 100644 --- a/libguile/keywords.c +++ b/libguile/keywords.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/keywords.h b/libguile/keywords.h index a80e31bff..bfffe5923 100644 --- a/libguile/keywords.h +++ b/libguile/keywords.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/lang.c b/libguile/lang.c index 7f3986cec..85da68034 100644 --- a/libguile/lang.c +++ b/libguile/lang.c @@ -1,18 +1,19 @@ /* Copyright (C) 1999, 2000, 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/lang.h b/libguile/lang.h index 991e9ca76..47128de57 100644 --- a/libguile/lang.h +++ b/libguile/lang.h @@ -6,18 +6,19 @@ /* Copyright (C) 1998, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/list.c b/libguile/list.c index 07b96f5a7..70f527755 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -2,18 +2,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/list.h b/libguile/list.h index 733432d76..427dcb84d 100644 --- a/libguile/list.h +++ b/libguile/list.h @@ -7,18 +7,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/load.c b/libguile/load.c index 9656359e5..890b0f824 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -1,18 +1,19 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -246,24 +247,28 @@ scm_init_load_path () #endif /* SCM_LIBRARY_DIR */ { - char *home; - - home = getenv ("HOME"); + char cachedir[1024]; + char *e; #ifdef HAVE_GETPWENT - if (!home) - { - struct passwd *pwd; - pwd = getpwuid (getuid ()); - if (pwd) - home = pwd->pw_dir; - } + struct passwd *pwd; +#endif + +#define FALLBACK_DIR "guile/ccache/"SCM_EFFECTIVE_VERSION + + if ((e = getenv ("XDG_CACHE_HOME"))) + snprintf (cachedir, sizeof(cachedir), "%s" FALLBACK_DIR, e); + else if ((e = getenv ("HOME"))) + snprintf (cachedir, sizeof(cachedir), "%s/.cache/" FALLBACK_DIR, e); +#ifdef HAVE_GETPWENT + else if ((pwd = getpwuid (getuid ())) && pwd->pw_dir) + snprintf (cachedir, sizeof(cachedir), "%s/.cache/" FALLBACK_DIR, + pwd->pw_dir); #endif /* HAVE_GETPWENT */ - if (home) - { char buf[1024]; - snprintf (buf, sizeof(buf), - "%s/.guile-ccache/" SCM_EFFECTIVE_VERSION, home); - *scm_loc_compile_fallback_path = scm_from_locale_string (buf); - } + else + cachedir[0] = 0; + + if (cachedir[0]) + *scm_loc_compile_fallback_path = scm_from_locale_string (cachedir); } env = getenv ("GUILE_LOAD_PATH"); diff --git a/libguile/load.h b/libguile/load.h index 021987329..d5bc1b066 100644 --- a/libguile/load.h +++ b/libguile/load.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/locale-categories.h b/libguile/locale-categories.h index cbe9684a3..26b030dc5 100644 --- a/libguile/locale-categories.h +++ b/libguile/locale-categories.h @@ -1,18 +1,19 @@ /* Copyright (C) 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* A list of all available locale categories, not including `ALL'. */ diff --git a/libguile/macros.c b/libguile/macros.c index ca3e83e29..a6a4c3eb6 100644 --- a/libguile/macros.c +++ b/libguile/macros.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/macros.h b/libguile/macros.h index 5e3d64a55..8ff41c4a4 100644 --- a/libguile/macros.h +++ b/libguile/macros.h @@ -6,18 +6,19 @@ /* Copyright (C) 1998,2000,2001,2002,2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/mallocs.c b/libguile/mallocs.c index c11a51fac..296b3126b 100644 --- a/libguile/mallocs.c +++ b/libguile/mallocs.c @@ -2,18 +2,19 @@ * Copyright (C) 1995,1997,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/mallocs.h b/libguile/mallocs.h index f711ddb94..9c797e9f8 100644 --- a/libguile/mallocs.h +++ b/libguile/mallocs.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/modules.c b/libguile/modules.c index 689510ce6..ecd136d2b 100644 --- a/libguile/modules.c +++ b/libguile/modules.c @@ -1,18 +1,19 @@ /* Copyright (C) 1998,2000,2001,2002,2003,2004,2006,2007,2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/modules.h b/libguile/modules.h index 3cd090476..8108ac3e1 100644 --- a/libguile/modules.h +++ b/libguile/modules.h @@ -6,18 +6,19 @@ /* Copyright (C) 1998, 2000, 2001, 2002, 2003, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/net_db.c b/libguile/net_db.c index af6e3d5f4..4307091f7 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -2,18 +2,19 @@ * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/net_db.h b/libguile/net_db.h index df1f03067..4b6327f27 100644 --- a/libguile/net_db.h +++ b/libguile/net_db.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/null-threads.c b/libguile/null-threads.c index 814017564..28eff2c61 100644 --- a/libguile/null-threads.c +++ b/libguile/null-threads.c @@ -1,18 +1,19 @@ /* Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/null-threads.h b/libguile/null-threads.h index 5a61dbf50..ec83ab798 100644 --- a/libguile/null-threads.h +++ b/libguile/null-threads.h @@ -6,18 +6,19 @@ /* Copyright (C) 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/numbers.c b/libguile/numbers.c index 37435b50b..83b3f7cb1 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -5,18 +5,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/numbers.h b/libguile/numbers.h index e139dac7b..5bad4478b 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/objcodes.c b/libguile/objcodes.c index 6a0a11b29..03ea0b8d8 100644 --- a/libguile/objcodes.c +++ b/libguile/objcodes.c @@ -1,18 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H @@ -33,7 +34,7 @@ #include "objcodes.h" /* nb, the length of the header should be a multiple of 8 bytes */ -#define OBJCODE_COOKIE "GOOF-0.5" +#define OBJCODE_COOKIE "GOOF-0.6" /* @@ -62,17 +63,31 @@ make_objcode_by_mmap (int fd) addr = mmap (0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); if (addr == MAP_FAILED) - SCM_SYSERROR; + { + (void) close (fd); + SCM_SYSERROR; + } if (memcmp (addr, OBJCODE_COOKIE, strlen (OBJCODE_COOKIE))) - SCM_SYSERROR; + { + (void) close (fd); + (void) munmap (addr, st.st_size); + scm_misc_error (FUNC_NAME, "bad header on object file: ~s", + scm_list_1 (scm_from_locale_stringn + (addr, strlen (OBJCODE_COOKIE)))); + } data = (struct scm_objcode*)(addr + strlen (OBJCODE_COOKIE)); if (data->len + data->metalen != (st.st_size - sizeof (*data) - strlen (OBJCODE_COOKIE))) - scm_misc_error (FUNC_NAME, "bad length header (~a, ~a)", - scm_list_2 (scm_from_size_t (st.st_size), - scm_from_uint32 (sizeof (*data) + data->len + data->metalen))); + { + (void) close (fd); + (void) munmap (addr, st.st_size); + scm_misc_error (FUNC_NAME, "bad length header (~a, ~a)", + scm_list_2 (scm_from_size_t (st.st_size), + scm_from_uint32 (sizeof (*data) + data->len + + data->metalen))); + } SCM_NEWSMOB3 (sret, scm_tc16_objcode, addr + strlen (OBJCODE_COOKIE), SCM_PACK (SCM_BOOL_F), fd); diff --git a/libguile/objcodes.h b/libguile/objcodes.h index acd43a600..21e4add89 100644 --- a/libguile/objcodes.h +++ b/libguile/objcodes.h @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. - * * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SCM_OBJCODES_H_ diff --git a/libguile/objects.c b/libguile/objects.c index e68ed37ef..e82fb9d51 100644 --- a/libguile/objects.c +++ b/libguile/objects.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1999,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/objects.h b/libguile/objects.h index 9b2a0ed5a..914a7ea74 100644 --- a/libguile/objects.h +++ b/libguile/objects.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,1999,2000,2001, 2003, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/objprop.c b/libguile/objprop.c index 8e9486f54..6dd1da631 100644 --- a/libguile/objprop.c +++ b/libguile/objprop.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996, 2000, 2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/objprop.h b/libguile/objprop.h index 7e5365a74..f9a2e945d 100644 --- a/libguile/objprop.h +++ b/libguile/objprop.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/options.c b/libguile/options.c index cc3d452e6..ee7001a8c 100644 --- a/libguile/options.c +++ b/libguile/options.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008 Free Software Foundation * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/options.h b/libguile/options.h index 4facdce01..8ea960b3c 100644 --- a/libguile/options.h +++ b/libguile/options.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/pairs.c b/libguile/pairs.c index cb2d64260..aaaeb110f 100644 --- a/libguile/pairs.c +++ b/libguile/pairs.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/pairs.h b/libguile/pairs.h index 61af24efe..a6d44d289 100644 --- a/libguile/pairs.h +++ b/libguile/pairs.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/ports.c b/libguile/ports.c index 1f49708c8..98207b0dc 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -221,15 +222,14 @@ scm_set_port_close (scm_t_bits tc, int (*close) (SCM)) } void -scm_set_port_seek (scm_t_bits tc, off_t (*seek) (SCM port, - off_t OFFSET, - int WHENCE)) +scm_set_port_seek (scm_t_bits tc, + scm_t_off (*seek) (SCM, scm_t_off, int)) { scm_ptobs[SCM_TC2PTOBNUM (tc)].seek = seek; } void -scm_set_port_truncate (scm_t_bits tc, void (*truncate) (SCM port, off_t length)) +scm_set_port_truncate (scm_t_bits tc, void (*truncate) (SCM, scm_t_off)) { scm_ptobs[SCM_TC2PTOBNUM (tc)].truncate = truncate; } @@ -1398,15 +1398,15 @@ SCM_DEFINE (scm_seek, "seek", 3, 0, 0, else if (SCM_OPPORTP (fd_port)) { scm_t_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (fd_port); - off_t off = scm_to_off_t (offset); - off_t rv; + off_t_or_off64_t off = scm_to_off_t_or_off64_t (offset); + off_t_or_off64_t rv; if (!ptob->seek) SCM_MISC_ERROR ("port is not seekable", scm_cons (fd_port, SCM_EOL)); else rv = ptob->seek (fd_port, off, how); - return scm_from_off_t (rv); + return scm_from_off_t_or_off64_t (rv); } else /* file descriptor?. */ { @@ -1495,7 +1495,7 @@ SCM_DEFINE (scm_truncate_file, "truncate-file", 1, 1, 0, } else if (SCM_OPOUTPORTP (object)) { - off_t c_length = scm_to_off_t (length); + off_t_or_off64_t c_length = scm_to_off_t_or_off64_t (length); scm_t_port *pt = SCM_PTAB_ENTRY (object); scm_t_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (object); diff --git a/libguile/ports.h b/libguile/ports.h index cb9d9d2d5..8a21b09f9 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -28,8 +29,6 @@ #include "libguile/struct.h" #include "libguile/threads.h" -/* Not sure if this is a good idea. We need it for off_t. */ -#include @@ -69,7 +68,7 @@ typedef struct unsigned char *read_buf; /* buffer start. */ const unsigned char *read_pos;/* the next unread char. */ unsigned char *read_end; /* pointer to last buffered char + 1. */ - off_t read_buf_size; /* size of the buffer. */ + scm_t_off read_buf_size; /* size of the buffer. */ /* when chars are put back into the buffer, e.g., using peek-char or unread-string, the read-buffer pointers are switched to cbuf. @@ -78,7 +77,7 @@ typedef struct unsigned char *saved_read_buf; const unsigned char *saved_read_pos; unsigned char *saved_read_end; - off_t saved_read_buf_size; + scm_t_off saved_read_buf_size; /* write requests are saved into this buffer at write_pos until it reaches write_buf + write_buf_size, then the ptob flush is @@ -87,7 +86,7 @@ typedef struct unsigned char *write_buf; /* buffer start. */ unsigned char *write_pos; /* pointer to last buffered char + 1. */ unsigned char *write_end; /* pointer to end of buffer + 1. */ - off_t write_buf_size; /* size of the buffer. */ + scm_t_off write_buf_size; /* size of the buffer. */ unsigned char shortbuf; /* buffer for "unbuffered" streams. */ @@ -184,8 +183,8 @@ typedef struct scm_t_ptob_descriptor int (*fill_input) (SCM port); int (*input_waiting) (SCM port); - off_t (*seek) (SCM port, off_t OFFSET, int WHENCE); - void (*truncate) (SCM port, off_t length); + scm_t_off (*seek) (SCM port, scm_t_off OFFSET, int WHENCE); + void (*truncate) (SCM port, scm_t_off length); } scm_t_ptob_descriptor; @@ -223,12 +222,12 @@ SCM_API void scm_set_port_end_input (scm_t_bits tc, void (*end_input) (SCM port, int offset)); SCM_API void scm_set_port_seek (scm_t_bits tc, - off_t (*seek) (SCM port, - off_t OFFSET, - int WHENCE)); + scm_t_off (*seek) (SCM port, + scm_t_off OFFSET, + int WHENCE)); SCM_API void scm_set_port_truncate (scm_t_bits tc, void (*truncate) (SCM port, - off_t length)); + scm_t_off length)); SCM_API void scm_set_port_input_waiting (scm_t_bits tc, int (*input_waiting) (SCM)); SCM_API SCM scm_char_ready_p (SCM port); size_t scm_take_from_input_buffers (SCM port, char *dest, size_t read_len); diff --git a/libguile/posix.c b/libguile/posix.c index 5e6f05fb7..dafc5e996 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/posix.h b/libguile/posix.h index 6d282e0bf..4d057643c 100644 --- a/libguile/posix.h +++ b/libguile/posix.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/print.c b/libguile/print.c index fa4cb1e28..6c44d59db 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995-1999,2000,2001, 2002, 2003, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -654,7 +655,7 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate) ? "#', port); break; diff --git a/libguile/print.h b/libguile/print.h index 8974a7554..d817a6fc3 100644 --- a/libguile/print.h +++ b/libguile/print.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/private-gc.h b/libguile/private-gc.h index 125ef3a23..ac22de58b 100644 --- a/libguile/private-gc.h +++ b/libguile/private-gc.h @@ -4,18 +4,19 @@ * Copyright (C) 2002, 03, 04, 05, 06, 07, 08, 09 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef PRIVATE_GC diff --git a/libguile/private-options.h b/libguile/private-options.h index eeaf0c17b..ffb699bee 100644 --- a/libguile/private-options.h +++ b/libguile/private-options.h @@ -7,18 +7,19 @@ * Copyright (C) 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef PRIVATE_OPTIONS diff --git a/libguile/procprop.c b/libguile/procprop.c index db16834c5..df96eaad4 100644 --- a/libguile/procprop.c +++ b/libguile/procprop.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001,2003,2004, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/procprop.h b/libguile/procprop.h index bf27dba0a..04cd38442 100644 --- a/libguile/procprop.h +++ b/libguile/procprop.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/procs.c b/libguile/procs.c index b3a0d3215..93e35ab6c 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1999,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -65,7 +66,7 @@ SCM scm_c_define_subr (const char *name, long type, SCM (*fcn) ()) { SCM subr = scm_c_make_subr (name, type, fcn); - scm_define (SCM_SNAME (subr), subr); + scm_define (SCM_SUBR_NAME (subr), subr); return subr; } @@ -92,7 +93,7 @@ scm_c_define_subr_with_generic (const char *name, long type, SCM (*fcn) (), SCM *gf) { SCM subr = scm_c_make_subr_with_generic (name, type, fcn, gf); - scm_define (SCM_SNAME (subr), subr); + scm_define (SCM_SUBR_NAME (subr), subr); return subr; } @@ -236,7 +237,7 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0, lookup */ switch (SCM_TYP7 (procedure)) { case scm_tcs_subrs: - name = SCM_SNAME (procedure); + name = SCM_SUBR_NAME (procedure); break; default: name = scm_procedure_property (procedure, scm_sym_name); diff --git a/libguile/procs.h b/libguile/procs.h index b7ab61497..ed4ac200a 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -31,7 +32,7 @@ */ #define SCM_SUBR_META_INFO(x) ((SCM *) SCM_CELL_WORD_3 (x)) -#define SCM_SNAME(x) (SCM_SUBR_META_INFO (x) [0]) +#define SCM_SUBR_NAME(x) (SCM_SUBR_META_INFO (x) [0]) #define SCM_SUBRF(x) ((SCM (*)()) SCM_CELL_WORD_1 (x)) #define SCM_SET_SUBRF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) #define SCM_DSUBRF(x) ((double (*)()) SCM_CELL_WORD_1 (x)) diff --git a/libguile/programs.c b/libguile/programs.c index 68e0b8541..892b6770f 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H diff --git a/libguile/programs.h b/libguile/programs.h index ae819ef85..16a15500f 100644 --- a/libguile/programs.h +++ b/libguile/programs.h @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SCM_PROGRAMS_H_ diff --git a/libguile/properties.c b/libguile/properties.c index 321dc9ec4..60ff2ff65 100644 --- a/libguile/properties.c +++ b/libguile/properties.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/properties.h b/libguile/properties.h index 54feb01d9..efeaf3a59 100644 --- a/libguile/properties.h +++ b/libguile/properties.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/pthread-threads.h b/libguile/pthread-threads.h index 608a00b85..d5d838b4a 100644 --- a/libguile/pthread-threads.h +++ b/libguile/pthread-threads.h @@ -6,18 +6,19 @@ /* Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/putenv.c b/libguile/putenv.c index 0ff33592a..cdc05dd7e 100644 --- a/libguile/putenv.c +++ b/libguile/putenv.c @@ -1,18 +1,19 @@ /* Copyright (C) 1991, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c index a07636fce..e3aa99e16 100644 --- a/libguile/r6rs-ports.c +++ b/libguile/r6rs-ports.c @@ -1,18 +1,19 @@ /* Copyright (C) 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H @@ -124,11 +125,11 @@ bip_fill_input (SCM port) return result; } -static off_t -bip_seek (SCM port, off_t offset, int whence) +static scm_t_off +bip_seek (SCM port, scm_t_off offset, int whence) #define FUNC_NAME "bip_seek" { - off_t c_result = 0; + scm_t_off c_result = 0; scm_t_port *c_port = SCM_PTAB_ENTRY (port); switch (whence) @@ -210,15 +211,18 @@ static SCM cbp_mark (SCM port) { /* Mark the underlying method and object vector. */ - return (SCM_PACK (SCM_STREAM (port))); + if (SCM_OPENP (port)) + return SCM_PACK (SCM_STREAM (port)); + else + return SCM_BOOL_F; } -static off_t -cbp_seek (SCM port, off_t offset, int whence) +static scm_t_off +cbp_seek (SCM port, scm_t_off offset, int whence) #define FUNC_NAME "cbp_seek" { SCM result; - off_t c_result = 0; + scm_t_off c_result = 0; switch (whence) { @@ -881,8 +885,8 @@ bop_write (SCM port, const void *data, size_t size) buf->len = (buf->len > buf->pos) ? buf->len : buf->pos; } -static off_t -bop_seek (SCM port, off_t offset, int whence) +static scm_t_off +bop_seek (SCM port, scm_t_off offset, int whence) #define FUNC_NAME "bop_seek" { scm_t_bop_buffer *buf; @@ -891,7 +895,7 @@ bop_seek (SCM port, off_t offset, int whence) switch (whence) { case SEEK_CUR: - offset += (off_t) buf->pos; + offset += (scm_t_off) buf->pos; /* Fall through. */ case SEEK_SET: @@ -1109,7 +1113,7 @@ initialize_custom_binary_output_ports (void) void scm_init_r6rs_ports (void) { -#include "r6rs-ports.x" +#include "libguile/r6rs-ports.x" initialize_bytevector_input_ports (); initialize_custom_binary_input_ports (); diff --git a/libguile/r6rs-ports.h b/libguile/r6rs-ports.h index e29d96200..5e1707a88 100644 --- a/libguile/r6rs-ports.h +++ b/libguile/r6rs-ports.h @@ -4,18 +4,19 @@ /* Copyright (C) 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/ramap.c b/libguile/ramap.c index 1bc4fdd38..e141c18b7 100644 --- a/libguile/ramap.c +++ b/libguile/ramap.c @@ -1,18 +1,19 @@ /* Copyright (C) 1996,1998,2000,2001,2004,2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/ramap.h b/libguile/ramap.h index 9d870389a..d6cb19166 100644 --- a/libguile/ramap.h +++ b/libguile/ramap.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/random.c b/libguile/random.c index 8d2ff03b5..d7a1ffb11 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -1,17 +1,18 @@ /* Copyright (C) 1999,2000,2001, 2003, 2005, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/random.h b/libguile/random.h index ae44092ab..6cf404f8d 100644 --- a/libguile/random.h +++ b/libguile/random.h @@ -6,18 +6,19 @@ /* Copyright (C) 1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/rdelim.c b/libguile/rdelim.c index c9cc0164d..04a0944f4 100644 --- a/libguile/rdelim.c +++ b/libguile/rdelim.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/rdelim.h b/libguile/rdelim.h index 17efb4fe5..2e401e4fe 100644 --- a/libguile/rdelim.h +++ b/libguile/rdelim.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/read.c b/libguile/read.c index 3493ba03f..bd028ea52 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -1,19 +1,20 @@ -/* Copyright (C) 1995,1996,1997,1999,2000,2001,2003, 2004, 2006, 2007, 2008 Free Software +/* Copyright (C) 1995,1996,1997,1999,2000,2001,2003, 2004, 2006, 2007, 2008, 2009 Free Software * Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -28,6 +29,7 @@ #include #include "libguile/_scm.h" +#include "libguile/bytevectors.h" #include "libguile/chars.h" #include "libguile/eval.h" #include "libguile/unif.h" @@ -881,6 +883,30 @@ scm_read_srfi4_vector (int chr, SCM port) return scm_i_read_array (port, chr); } +static SCM +scm_read_bytevector (int chr, SCM port) +{ + chr = scm_getc (port); + if (chr != 'u') + goto syntax; + + chr = scm_getc (port); + if (chr != '8') + goto syntax; + + chr = scm_getc (port); + if (chr != '(') + goto syntax; + + return scm_u8_list_to_bytevector (scm_read_sexp (chr, port)); + + syntax: + scm_i_input_error ("read_bytevector", port, + "invalid bytevector prefix", + SCM_MAKE_CHAR (chr)); + return SCM_UNSPECIFIED; +} + static SCM scm_read_guile_bit_vector (int chr, SCM port) { @@ -1049,6 +1075,8 @@ scm_read_sharp (int chr, SCM port) case 'f': /* This one may return either a boolean or an SRFI-4 vector. */ return (scm_read_srfi4_vector (chr, port)); + case 'v': + return (scm_read_bytevector (chr, port)); case '*': return (scm_read_guile_bit_vector (chr, port)); case 't': diff --git a/libguile/read.h b/libguile/read.h index 4253622da..20d3f4bf7 100644 --- a/libguile/read.h +++ b/libguile/read.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 008917a86..a95cfb82e 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -1,18 +1,19 @@ /* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/regex-posix.h b/libguile/regex-posix.h index 2863b0562..8060fe3b7 100644 --- a/libguile/regex-posix.h +++ b/libguile/regex-posix.h @@ -6,18 +6,19 @@ /* Copyright (C) 1997,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/root.c b/libguile/root.c index 0d4ab29e5..83960b5d8 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/root.h b/libguile/root.h index 11f6b4f3a..cbf710d90 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,1998,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/rw.c b/libguile/rw.c index 3e814740a..cb62b79b9 100644 --- a/libguile/rw.c +++ b/libguile/rw.c @@ -1,18 +1,19 @@ -/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -206,7 +207,7 @@ SCM_DEFINE (scm_write_string_partial, "write-string/partial", 1, 3, 0, #define FUNC_NAME s_scm_write_string_partial { const char *src; - long write_len; + scm_t_off write_len; int fdes; { @@ -231,7 +232,7 @@ SCM_DEFINE (scm_write_string_partial, "write-string/partial", 1, 3, 0, SCM port = (SCM_UNBNDP (port_or_fdes)? scm_current_output_port () : port_or_fdes); scm_t_port *pt; - off_t space; + scm_t_off space; SCM_VALIDATE_OPFPORT (2, port); SCM_VALIDATE_OUTPUT_PORT (2, port); diff --git a/libguile/rw.h b/libguile/rw.h index b526051fc..d54f1b3ef 100644 --- a/libguile/rw.h +++ b/libguile/rw.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/scmconfig.h.top b/libguile/scmconfig.h.top index dfc7ba99c..b84660b6c 100644 --- a/libguile/scmconfig.h.top +++ b/libguile/scmconfig.h.top @@ -1,16 +1,17 @@ /* Copyright (C) 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index eb7cec67b..f4772b7a2 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -305,10 +306,8 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0, "a scheme procedure has been specified, that procedure will run\n" "in the given @var{thread}. When no thread has been given, the\n" "thread that made this call to @code{sigaction} is used.\n" - "Flags can " - "optionally be specified for the new handler (@code{SA_RESTART} will\n" - "always be added if it's available and the system is using restartable\n" - "system calls.) The return value is a pair with information about the\n" + "Flags can optionally be specified for the new handler.\n" + "The return value is a pair with information about the\n" "old handler as described above.\n\n" "This interface does not provide access to the \"signal blocking\"\n" "facility. Maybe this is not needed, since the thread support may\n" @@ -332,14 +331,7 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0, csig = scm_to_signed_integer (signum, 0, NSIG-1); #if defined(HAVE_SIGACTION) -#if defined(SA_RESTART) && defined(HAVE_RESTARTABLE_SYSCALLS) - /* don't allow SA_RESTART to be omitted if HAVE_RESTARTABLE_SYSCALLS - is defined, since libguile would be likely to produce spurious - EINTR errors. */ - action.sa_flags = SA_RESTART; -#else action.sa_flags = 0; -#endif if (!SCM_UNBNDP (flags)) action.sa_flags |= scm_to_int (flags); sigemptyset (&action.sa_mask); @@ -712,29 +704,6 @@ scm_init_scmsigs () #else orig_handlers[i] = SIG_ERR; #endif - -#ifdef HAVE_RESTARTABLE_SYSCALLS - /* If HAVE_RESTARTABLE_SYSCALLS is defined, it's important that - signals really are restartable. don't rely on the same - run-time that configure got: reset the default for every signal. - */ -#ifdef HAVE_SIGINTERRUPT - siginterrupt (i, 0); -#elif defined(SA_RESTART) - { - struct sigaction action; - - sigaction (i, NULL, &action); - if (!(action.sa_flags & SA_RESTART)) - { - action.sa_flags |= SA_RESTART; - sigaction (i, &action, NULL); - } - } -#endif - /* if neither siginterrupt nor SA_RESTART are available we may - as well assume that signals are always restartable. */ -#endif } scm_c_define ("NSIG", scm_from_long (NSIG)); diff --git a/libguile/scmsigs.h b/libguile/scmsigs.h index bcbf825d4..fce372849 100644 --- a/libguile/scmsigs.h +++ b/libguile/scmsigs.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000, 2002, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/script.c b/libguile/script.c index c61e85a8d..8c4e8ef55 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -1,17 +1,18 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* "script.c" argv tricks for `#!' scripts. diff --git a/libguile/script.h b/libguile/script.h index 6c02f8d8d..7e3828aa3 100644 --- a/libguile/script.h +++ b/libguile/script.h @@ -6,18 +6,19 @@ /* Copyright (C) 1997,1998,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/simpos.c b/libguile/simpos.c index 402e4dc88..60a592235 100644 --- a/libguile/simpos.c +++ b/libguile/simpos.c @@ -2,18 +2,19 @@ * Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/simpos.h b/libguile/simpos.h index 6df8bb1d2..b391a28d8 100644 --- a/libguile/simpos.h +++ b/libguile/simpos.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/smob.c b/libguile/smob.c index 899197901..2d7a9701e 100644 --- a/libguile/smob.c +++ b/libguile/smob.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/smob.h b/libguile/smob.h index 7aab3e74f..b712f8692 100644 --- a/libguile/smob.h +++ b/libguile/smob.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/snarf.h b/libguile/snarf.h index 5c2f18774..03a3edd47 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/socket.c b/libguile/socket.c index f34b6d49d..553a1a185 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -1,18 +1,19 @@ /* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/socket.h b/libguile/socket.h index 133dbf7c6..fcddd780d 100644 --- a/libguile/socket.h +++ b/libguile/socket.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,2000,2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/sort.c b/libguile/sort.c index 2a7317663..644526eac 100644 --- a/libguile/sort.c +++ b/libguile/sort.c @@ -1,17 +1,18 @@ /* Copyright (C) 1999,2000,2001,2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/sort.h b/libguile/sort.h index 51f292a5c..3ae86c2f3 100644 --- a/libguile/sort.h +++ b/libguile/sort.h @@ -6,18 +6,19 @@ /* Copyright (C) 1999,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/srcprop.c b/libguile/srcprop.c index 055ae32d3..efa0b7f30 100644 --- a/libguile/srcprop.c +++ b/libguile/srcprop.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2006, 2008 Free Software Foundation * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/srcprop.h b/libguile/srcprop.h index a467aa34e..2a27e0409 100644 --- a/libguile/srcprop.h +++ b/libguile/srcprop.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c index c8ca78027..f3863d355 100644 --- a/libguile/srfi-13.c +++ b/libguile/srfi-13.c @@ -3,18 +3,19 @@ * Copyright (C) 2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/srfi-13.h b/libguile/srfi-13.h index f8221ddc6..478a55d64 100644 --- a/libguile/srfi-13.h +++ b/libguile/srfi-13.h @@ -6,18 +6,19 @@ * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c index 908e0c8ff..3b4a5ff7f 100644 --- a/libguile/srfi-14.c +++ b/libguile/srfi-14.c @@ -3,18 +3,19 @@ * Copyright (C) 2001, 2004, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/srfi-14.h b/libguile/srfi-14.h index ea8027aac..54e0d329c 100644 --- a/libguile/srfi-14.h +++ b/libguile/srfi-14.h @@ -6,18 +6,19 @@ * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c index b0e052ac3..da571b0b8 100644 --- a/libguile/srfi-4.c +++ b/libguile/srfi-4.c @@ -1,20 +1,21 @@ /* srfi-4.c --- Uniform numeric vector datatypes. * - * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H @@ -28,6 +29,7 @@ #include "libguile/_scm.h" #include "libguile/__scm.h" #include "libguile/srfi-4.h" +#include "libguile/bytevectors.h" #include "libguile/error.h" #include "libguile/read.h" #include "libguile/ports.h" @@ -608,6 +610,8 @@ scm_i_generalized_vector_type (SCM v) return scm_sym_b; else if (scm_is_uniform_vector (v)) return scm_from_locale_symbol (uvec_tags[SCM_UVEC_TYPE(v)]); + else if (scm_is_bytevector (v)) + return scm_from_locale_symbol ("vu8"); else return SCM_BOOL_F; } @@ -749,6 +753,8 @@ scm_array_handle_uniform_element_size (scm_t_array_handle *h) vec = SCM_I_ARRAY_V (vec); if (scm_is_uniform_vector (vec)) return uvec_sizes[SCM_UVEC_TYPE(vec)]; + if (scm_is_bytevector (vec)) + return 1U; scm_wrong_type_arg_msg (NULL, 0, h->array, "uniform array"); } @@ -789,6 +795,8 @@ scm_array_handle_uniform_writable_elements (scm_t_array_handle *h) char *elts = SCM_UVEC_BASE (vec); return (void *) (elts + size*h->base); } + if (scm_is_bytevector (vec)) + return SCM_BYTEVECTOR_CONTENTS (vec); scm_wrong_type_arg_msg (NULL, 0, h->array, "uniform array"); } diff --git a/libguile/srfi-4.h b/libguile/srfi-4.h index 3c340d91e..a1a9bafc0 100644 --- a/libguile/srfi-4.h +++ b/libguile/srfi-4.h @@ -5,18 +5,19 @@ * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/stackchk.c b/libguile/stackchk.c index a53e67629..b14a71259 100644 --- a/libguile/stackchk.c +++ b/libguile/stackchk.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997, 2000, 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/stackchk.h b/libguile/stackchk.h index 8681f5d46..6aa0fec18 100644 --- a/libguile/stackchk.h +++ b/libguile/stackchk.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/stacks.c b/libguile/stacks.c index 69fb3406a..45566cafa 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -2,18 +2,19 @@ * Copyright (C) 1996,1997,2000,2001, 2006, 2007, 2008, 2009 Free Software Foundation * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/stacks.h b/libguile/stacks.h index 53633bc14..20735eff5 100644 --- a/libguile/stacks.h +++ b/libguile/stacks.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/stime.c b/libguile/stime.c index 5384783e3..a6843377b 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/stime.h b/libguile/stime.h index c64c60ea9..8b70cee62 100644 --- a/libguile/stime.h +++ b/libguile/stime.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/strerror.c b/libguile/strerror.c index c2f20f0c2..0e0e94ee8 100644 --- a/libguile/strerror.c +++ b/libguile/strerror.c @@ -1,19 +1,20 @@ /* Turning errno values into English error messages. Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 2000, 2001, 2006 Free Software Foundation, Inc. - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 3 of + the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA */ char * diff --git a/libguile/strings.c b/libguile/strings.c index 012e08b6e..4e21f3e28 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/strings.h b/libguile/strings.h index ca5f52cd2..9e028d82e 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/strorder.c b/libguile/strorder.c index d3ccfcb06..e0a218389 100644 --- a/libguile/strorder.c +++ b/libguile/strorder.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995, 1996, 1999, 2000, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/strorder.h b/libguile/strorder.h index 17118634e..2c004e48a 100644 --- a/libguile/strorder.h +++ b/libguile/strorder.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/strports.c b/libguile/strports.c index bc3fd7014..5c67bf9a8 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -1,18 +1,19 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2005, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -107,7 +108,7 @@ stfill_buffer (SCM port) /* change the size of a port's string to new_size. this doesn't change read_buf_size. */ static void -st_resize_port (scm_t_port *pt, off_t new_size) +st_resize_port (scm_t_port *pt, scm_t_off new_size) { SCM old_stream = SCM_PACK (pt->stream); const char *src = scm_i_string_chars (old_stream); @@ -117,7 +118,7 @@ st_resize_port (scm_t_port *pt, off_t new_size) unsigned long int min_size = min (old_size, new_size); unsigned long int i; - off_t index = pt->write_pos - pt->write_buf; + scm_t_off index = pt->write_pos - pt->write_buf; pt->write_buf_size = new_size; @@ -198,11 +199,11 @@ st_end_input (SCM port, int offset) pt->rw_active = SCM_PORT_NEITHER; } -static off_t -st_seek (SCM port, off_t offset, int whence) +static scm_t_off +st_seek (SCM port, scm_t_off offset, int whence) { scm_t_port *pt = SCM_PTAB_ENTRY (port); - off_t target; + scm_t_off target; if (pt->rw_active == SCM_PORT_READ && offset == 0 && whence == SEEK_CUR) /* special case to avoid disturbing the unread-char buffer. */ @@ -271,7 +272,7 @@ st_seek (SCM port, off_t offset, int whence) } static void -st_truncate (SCM port, off_t length) +st_truncate (SCM port, scm_t_off length) { scm_t_port *pt = SCM_PTAB_ENTRY (port); diff --git a/libguile/strports.h b/libguile/strports.h index 58ca71f57..3129c03e2 100644 --- a/libguile/strports.h +++ b/libguile/strports.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001,2002, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/struct.c b/libguile/struct.c index cae0f31d0..9cb165e2f 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -1,18 +1,19 @@ /* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/struct.h b/libguile/struct.h index 10c0d65c3..d53e59d95 100644 --- a/libguile/struct.h +++ b/libguile/struct.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1997,1999,2000,2001, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/symbols.c b/libguile/symbols.c index e208e5a6a..c0ba2a8b4 100644 --- a/libguile/symbols.c +++ b/libguile/symbols.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/symbols.h b/libguile/symbols.h index c2dc18363..e4bc33391 100644 --- a/libguile/symbols.h +++ b/libguile/symbols.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/tags.h b/libguile/tags.h index 2f30369d9..329453341 100644 --- a/libguile/tags.h +++ b/libguile/tags.h @@ -7,18 +7,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/threads.c b/libguile/threads.c index d63c6197e..9589336c1 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/threads.h b/libguile/threads.h index 5542ac30e..32b0ea66a 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -6,18 +6,19 @@ /* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/throw.c b/libguile/throw.c index e0dda27cf..b48bea1d1 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/throw.h b/libguile/throw.h index 3cd557285..1ed6ba6b1 100644 --- a/libguile/throw.h +++ b/libguile/throw.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/unif.c b/libguile/unif.c index 4013f29b8..84b532347 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -1,18 +1,19 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -46,6 +47,7 @@ #include "libguile/srfi-13.h" #include "libguile/srfi-4.h" #include "libguile/vectors.h" +#include "libguile/bytevectors.h" #include "libguile/list.h" #include "libguile/deprecation.h" #include "libguile/dynwind.h" @@ -108,6 +110,7 @@ struct { { "f64", SCM_UNSPECIFIED, scm_make_f64vector }, { "c32", SCM_UNSPECIFIED, scm_make_c32vector }, { "c64", SCM_UNSPECIFIED, scm_make_c64vector }, + { "vu8", SCM_UNSPECIFIED, scm_make_bytevector }, { NULL } }; @@ -312,6 +315,12 @@ bitvector_ref (scm_t_array_handle *h, ssize_t pos) scm_from_bool (((scm_t_uint32 *)h->elements)[pos/32] & (1l << (pos % 32))); } +static SCM +bytevector_ref (scm_t_array_handle *h, ssize_t pos) +{ + return scm_from_uint8 (((scm_t_uint8 *) h->elements)[pos]); +} + static SCM memoize_ref (scm_t_array_handle *h, ssize_t pos) { @@ -345,6 +354,11 @@ memoize_ref (scm_t_array_handle *h, ssize_t pos) h->elements = scm_array_handle_bit_elements (h); h->ref = bitvector_ref; } + else if (scm_is_bytevector (v)) + { + h->elements = scm_array_handle_uniform_elements (h); + h->ref = bytevector_ref; + } else scm_misc_error (NULL, "unknown array type: ~a", scm_list_1 (h->array)); @@ -385,6 +399,17 @@ bitvector_set (scm_t_array_handle *h, ssize_t pos, SCM val) ((scm_t_uint32 *)h->writable_elements)[pos/32] &= ~mask; } +static void +bytevector_set (scm_t_array_handle *h, ssize_t pos, SCM val) +{ + scm_t_uint8 c_value; + scm_t_uint8 *elements; + + c_value = scm_to_uint8 (val); + elements = (scm_t_uint8 *) h->elements; + elements[pos] = (scm_t_uint8) c_value; +} + static void memoize_set (scm_t_array_handle *h, ssize_t pos, SCM val) { @@ -419,6 +444,11 @@ memoize_set (scm_t_array_handle *h, ssize_t pos, SCM val) h->writable_elements = scm_array_handle_bit_writable_elements (h); h->set = bitvector_set; } + else if (scm_is_bytevector (v)) + { + h->elements = scm_array_handle_uniform_writable_elements (h); + h->set = bytevector_set; + } else scm_misc_error (NULL, "unknown array type: ~a", scm_list_1 (h->array)); diff --git a/libguile/unif.h b/libguile/unif.h index 1d01f807d..91d26c861 100644 --- a/libguile/unif.h +++ b/libguile/unif.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/validate.h b/libguile/validate.h index c362c02f3..b48bec758 100644 --- a/libguile/validate.h +++ b/libguile/validate.h @@ -6,18 +6,19 @@ /* Copyright (C) 1999,2000,2001, 2002, 2004, 2006, 2007, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* Written by Greg J. Badros , Dec-1999 */ diff --git a/libguile/values.c b/libguile/values.c index e766edba1..81fdcf851 100644 --- a/libguile/values.c +++ b/libguile/values.c @@ -1,18 +1,19 @@ /* Copyright (C) 2000, 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/values.h b/libguile/values.h index f05ce9f8f..0750aecdc 100644 --- a/libguile/values.h +++ b/libguile/values.h @@ -6,18 +6,19 @@ /* Copyright (C) 2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/variable.c b/libguile/variable.c index 6c39b30ac..a97444c0b 100644 --- a/libguile/variable.c +++ b/libguile/variable.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/variable.h b/libguile/variable.h index 3f6398b9c..8faced4ec 100644 --- a/libguile/variable.h +++ b/libguile/variable.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/vectors.c b/libguile/vectors.c index eeb856995..6dc994f55 100644 --- a/libguile/vectors.c +++ b/libguile/vectors.c @@ -1,18 +1,19 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ @@ -30,6 +31,7 @@ #include "libguile/validate.h" #include "libguile/vectors.h" #include "libguile/unif.h" +#include "libguile/bytevectors.h" #include "libguile/ramap.h" #include "libguile/srfi-4.h" #include "libguile/strings.h" @@ -522,7 +524,7 @@ SCM_DEFINE (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0, } #undef FUNC_NAME - + /* Generalized vectors. */ int @@ -531,7 +533,8 @@ scm_is_generalized_vector (SCM obj) return (scm_is_vector (obj) || scm_is_string (obj) || scm_is_bitvector (obj) - || scm_is_uniform_vector (obj)); + || scm_is_uniform_vector (obj) + || scm_is_bytevector (obj)); } SCM_DEFINE (scm_generalized_vector_p, "generalized-vector?", 1, 0, 0, @@ -563,6 +566,8 @@ scm_c_generalized_vector_length (SCM v) return scm_c_bitvector_length (v); else if (scm_is_uniform_vector (v)) return scm_c_uniform_vector_length (v); + else if (scm_is_bytevector (v)) + return scm_c_bytevector_length (v); else scm_wrong_type_arg_msg (NULL, 0, v, "generalized vector"); } @@ -587,6 +592,8 @@ scm_c_generalized_vector_ref (SCM v, size_t idx) return scm_c_bitvector_ref (v, idx); else if (scm_is_uniform_vector (v)) return scm_c_uniform_vector_ref (v, idx); + else if (scm_is_bytevector (v)) + return scm_from_uint8 (scm_c_bytevector_ref (v, idx)); else scm_wrong_type_arg_msg (NULL, 0, v, "generalized vector"); } @@ -612,6 +619,8 @@ scm_c_generalized_vector_set_x (SCM v, size_t idx, SCM val) scm_c_bitvector_set_x (v, idx, val); else if (scm_is_uniform_vector (v)) scm_c_uniform_vector_set_x (v, idx, val); + else if (scm_is_bytevector (v)) + scm_i_bytevector_generalized_set_x (v, idx, val); else scm_wrong_type_arg_msg (NULL, 0, v, "generalized vector"); } diff --git a/libguile/vectors.h b/libguile/vectors.h index 28a576c5c..902e15a63 100644 --- a/libguile/vectors.h +++ b/libguile/vectors.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001,2002,2004,2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/version.c b/libguile/version.c index 99c649b00..3d5dc1976 100644 --- a/libguile/version.c +++ b/libguile/version.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996, 1999, 2000, 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/version.h.in b/libguile/version.h.in index b565efd96..394bbdb86 100644 --- a/libguile/version.h.in +++ b/libguile/version.h.in @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/vm-bootstrap.h b/libguile/vm-bootstrap.h index 587766a67..7ba1a93ba 100644 --- a/libguile/vm-bootstrap.h +++ b/libguile/vm-bootstrap.h @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SCM_VM_BOOTSTRAP_H_ diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 34764c659..90cf697f8 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -1,18 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* This file is included in vm.c multiple times */ @@ -202,6 +203,12 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs) /* shouldn't get here */ goto vm_error; + vm_error_not_a_bytevector: + SYNC_ALL (); + scm_wrong_type_arg_msg (FUNC_NAME, 1, finish_args, "bytevector"); + /* shouldn't get here */ + goto vm_error; + vm_error_no_values: err_msg = scm_from_locale_string ("VM: 0-valued return"); finish_args = SCM_EOL; diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h index 8c919f630..d6849799c 100644 --- a/libguile/vm-engine.h +++ b/libguile/vm-engine.h @@ -1,18 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* This file is included in vm_engine.c */ @@ -53,13 +54,9 @@ #endif #endif #ifdef __i386__ -/* gcc on lenny actually crashes if we allocate these variables in registers. - hopefully this is the only one of these. */ -#if !(__GNUC__==4 && __GNUC_MINOR__==1 && __GNUC_PATCHLEVEL__==2) -#define IP_REG asm("%esi") -#define SP_REG asm("%edi") -#define FP_REG -#endif +/* too few registers! because of register allocation errors with various gcs, + just punt on explicit assignments on i386, hoping that the "register" + declaration will be sufficient. */ #endif #if defined(PPC) || defined(_POWER) || defined(_IBMR2) #define IP_REG asm("26") diff --git a/libguile/vm-expand.h b/libguile/vm-expand.h index 02dfbc4d0..787223d07 100644 --- a/libguile/vm-expand.h +++ b/libguile/vm-expand.h @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef VM_LABEL diff --git a/libguile/vm-i-loader.c b/libguile/vm-i-loader.c index e5bb35e6e..86d0fc443 100644 --- a/libguile/vm-i-loader.c +++ b/libguile/vm-i-loader.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001,2008,2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* FIXME! Need to check that the fetch is within the current program */ diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c index 3742135a6..5de39a23d 100644 --- a/libguile/vm-i-scheme.c +++ b/libguile/vm-i-scheme.c @@ -1,18 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* This file is included in vm_engine.c */ @@ -130,20 +131,24 @@ VM_DEFINE_FUNCTION (92, cdr, "cdr", 1) RETURN (SCM_CDR (x)); } -VM_DEFINE_FUNCTION (93, set_car, "set-car!", 2) +VM_DEFINE_INSTRUCTION (93, set_car, "set-car!", 0, 2, 0) { - ARGS2 (x, y); + SCM x, y; + POP (y); + POP (x); VM_VALIDATE_CONS (x); SCM_SETCAR (x, y); - RETURN (SCM_UNSPECIFIED); + NEXT; } -VM_DEFINE_FUNCTION (94, set_cdr, "set-cdr!", 2) +VM_DEFINE_INSTRUCTION (94, set_cdr, "set-cdr!", 0, 2, 0) { - ARGS2 (x, y); + SCM x, y; + POP (y); + POP (x); VM_VALIDATE_CONS (x); SCM_SETCDR (x, y); - RETURN (SCM_UNSPECIFIED); + NEXT; } @@ -262,15 +267,265 @@ VM_DEFINE_FUNCTION (107, slot_ref, "slot-ref", 2) RETURN (SCM_PACK (SCM_STRUCT_DATA (instance) [slot])); } -VM_DEFINE_FUNCTION (108, slot_set, "slot-set", 3) +VM_DEFINE_INSTRUCTION (108, slot_set, "slot-set", 0, 3, 0) { + SCM instance, idx, val; size_t slot; - ARGS3 (instance, idx, val); + POP (val); + POP (idx); + POP (instance); slot = SCM_I_INUM (idx); SCM_STRUCT_DATA (instance) [slot] = SCM_UNPACK (val); - RETURN (SCM_UNSPECIFIED); + NEXT; } +VM_DEFINE_FUNCTION (109, vector_ref, "vector-ref", 2) +{ + long i; + ARGS2 (vect, idx); + if (SCM_LIKELY (SCM_I_IS_VECTOR (vect) + && SCM_I_INUMP (idx) + && ((i = SCM_I_INUM (idx)) >= 0) + && i < SCM_I_VECTOR_LENGTH (vect))) + RETURN (SCM_I_VECTOR_ELTS (vect)[i]); + else + RETURN (scm_vector_ref (vect, idx)); +} + +VM_DEFINE_INSTRUCTION (110, vector_set, "vector-set", 0, 3, 0) +{ + long i; + SCM vect, idx, val; + POP (val); POP (idx); POP (vect); + if (SCM_LIKELY (SCM_I_IS_VECTOR (vect) + && SCM_I_INUMP (idx) + && ((i = SCM_I_INUM (idx)) >= 0) + && i < SCM_I_VECTOR_LENGTH (vect))) + SCM_I_VECTOR_WELTS (vect)[i] = val; + else + scm_vector_set_x (vect, idx, val); + NEXT; +} + +#define VM_VALIDATE_BYTEVECTOR(x) \ + if (SCM_UNLIKELY (!SCM_BYTEVECTOR_P (x))) \ + { finish_args = x; \ + goto vm_error_not_a_bytevector; \ + } + +#define BV_REF_WITH_ENDIANNESS(stem, fn_stem) \ +{ \ + SCM endianness; \ + POP (endianness); \ + if (scm_is_eq (endianness, scm_i_native_endianness)) \ + goto VM_LABEL (bv_##stem##_native_ref); \ + { \ + ARGS2 (bv, idx); \ + RETURN (scm_bytevector_##fn_stem##_ref (bv, idx, endianness)); \ + } \ +} + +VM_DEFINE_FUNCTION (111, bv_u16_ref, "bv-u16-ref", 3) +BV_REF_WITH_ENDIANNESS (u16, u16) +VM_DEFINE_FUNCTION (112, bv_s16_ref, "bv-s16-ref", 3) +BV_REF_WITH_ENDIANNESS (s16, s16) +VM_DEFINE_FUNCTION (113, bv_u32_ref, "bv-u32-ref", 3) +BV_REF_WITH_ENDIANNESS (u32, u32) +VM_DEFINE_FUNCTION (114, bv_s32_ref, "bv-s32-ref", 3) +BV_REF_WITH_ENDIANNESS (s32, s32) +VM_DEFINE_FUNCTION (115, bv_u64_ref, "bv-u64-ref", 3) +BV_REF_WITH_ENDIANNESS (u64, u64) +VM_DEFINE_FUNCTION (116, bv_s64_ref, "bv-s64-ref", 3) +BV_REF_WITH_ENDIANNESS (s64, s64) +VM_DEFINE_FUNCTION (117, bv_f32_ref, "bv-f32-ref", 3) +BV_REF_WITH_ENDIANNESS (f32, ieee_single) +VM_DEFINE_FUNCTION (118, bv_f64_ref, "bv-f64-ref", 3) +BV_REF_WITH_ENDIANNESS (f64, ieee_double) + +#undef BV_REF_WITH_ENDIANNESS + +#define BV_FIXABLE_INT_REF(stem, fn_stem, type, size) \ +{ \ + long i; \ + ARGS2 (bv, idx); \ + VM_VALIDATE_BYTEVECTOR (bv); \ + if (SCM_LIKELY (SCM_I_INUMP (idx) \ + && ((i = SCM_I_INUM (idx)) >= 0) \ + && (i < SCM_BYTEVECTOR_LENGTH (bv)) \ + && (i % size == 0))) \ + RETURN (SCM_I_MAKINUM (*(scm_t_##type*) \ + (SCM_BYTEVECTOR_CONTENTS (bv) + i))); \ + else \ + RETURN (scm_bytevector_##fn_stem##_ref (bv, idx)); \ +} + +#define BV_INT_REF(stem, type, size) \ +{ \ + long i; \ + ARGS2 (bv, idx); \ + VM_VALIDATE_BYTEVECTOR (bv); \ + if (SCM_LIKELY (SCM_I_INUMP (idx) \ + && ((i = SCM_I_INUM (idx)) >= 0) \ + && (i < SCM_BYTEVECTOR_LENGTH (bv)) \ + && (i % size == 0))) \ + { scm_t_##type x = (*(scm_t_##type*)(SCM_BYTEVECTOR_CONTENTS (bv) + i)); \ + if (SCM_FIXABLE (x)) \ + RETURN (SCM_I_MAKINUM (x)); \ + else \ + RETURN (scm_from_##type (x)); \ + } \ + else \ + RETURN (scm_bytevector_##stem##_native_ref (bv, idx)); \ +} + +#define BV_FLOAT_REF(stem, fn_stem, type, size) \ +{ \ + long i; \ + ARGS2 (bv, idx); \ + VM_VALIDATE_BYTEVECTOR (bv); \ + if (SCM_LIKELY (SCM_I_INUMP (idx) \ + && ((i = SCM_I_INUM (idx)) >= 0) \ + && (i < SCM_BYTEVECTOR_LENGTH (bv)) \ + && (i % size == 0))) \ + RETURN (scm_from_double ((*(type*)(SCM_BYTEVECTOR_CONTENTS (bv) + i)))); \ + else \ + RETURN (scm_bytevector_##fn_stem##_native_ref (bv, idx)); \ +} + +VM_DEFINE_FUNCTION (119, bv_u8_ref, "bv-u8-ref", 2) +BV_FIXABLE_INT_REF (u8, u8, uint8, 1) +VM_DEFINE_FUNCTION (120, bv_s8_ref, "bv-s8-ref", 2) +BV_FIXABLE_INT_REF (s8, s8, int8, 1) +VM_DEFINE_FUNCTION (121, bv_u16_native_ref, "bv-u16-native-ref", 2) +BV_FIXABLE_INT_REF (u16, u16_native, uint16, 2) +VM_DEFINE_FUNCTION (122, bv_s16_native_ref, "bv-s16-native-ref", 2) +BV_FIXABLE_INT_REF (s16, s16_native, int16, 2) +VM_DEFINE_FUNCTION (123, bv_u32_native_ref, "bv-u32-native-ref", 2) +/* FIXME: u32 is always a fixnum on 64-bit builds */ +BV_INT_REF (u32, uint32, 4) +VM_DEFINE_FUNCTION (124, bv_s32_native_ref, "bv-s32-native-ref", 2) +BV_INT_REF (s32, int32, 4) +VM_DEFINE_FUNCTION (125, bv_u64_native_ref, "bv-u64-native-ref", 2) +BV_INT_REF (u64, uint64, 8) +VM_DEFINE_FUNCTION (126, bv_s64_native_ref, "bv-s64-native-ref", 2) +BV_INT_REF (s64, int64, 8) +VM_DEFINE_FUNCTION (127, bv_f32_native_ref, "bv-f32-native-ref", 2) +BV_FLOAT_REF (f32, ieee_single, float, 4) +VM_DEFINE_FUNCTION (128, bv_f64_native_ref, "bv-f64-native-ref", 2) +BV_FLOAT_REF (f64, ieee_double, double, 8) + +#undef BV_FIXABLE_INT_REF +#undef BV_INT_REF +#undef BV_FLOAT_REF + + + +#define BV_SET_WITH_ENDIANNESS(stem, fn_stem) \ +{ \ + SCM endianness; \ + POP (endianness); \ + if (scm_is_eq (endianness, scm_i_native_endianness)) \ + goto VM_LABEL (bv_##stem##_native_set); \ + { \ + SCM bv, idx, val; POP (val); POP (idx); POP (bv); \ + scm_bytevector_##fn_stem##_set_x (bv, idx, val, endianness); \ + NEXT; \ + } \ +} + +VM_DEFINE_INSTRUCTION (129, bv_u16_set, "bv-u16-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (u16, u16) +VM_DEFINE_INSTRUCTION (130, bv_s16_set, "bv-s16-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (s16, s16) +VM_DEFINE_INSTRUCTION (131, bv_u32_set, "bv-u32-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (u32, u32) +VM_DEFINE_INSTRUCTION (132, bv_s32_set, "bv-s32-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (s32, s32) +VM_DEFINE_INSTRUCTION (133, bv_u64_set, "bv-u64-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (u64, u64) +VM_DEFINE_INSTRUCTION (134, bv_s64_set, "bv-s64-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (s64, s64) +VM_DEFINE_INSTRUCTION (135, bv_f32_set, "bv-f32-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (f32, ieee_single) +VM_DEFINE_INSTRUCTION (136, bv_f64_set, "bv-f64-set", 0, 4, 0) +BV_SET_WITH_ENDIANNESS (f64, ieee_double) + +#undef BV_SET_WITH_ENDIANNESS + +#define BV_FIXABLE_INT_SET(stem, fn_stem, type, min, max, size) \ +{ \ + long i, j; \ + SCM bv, idx, val; POP (val); POP (idx); POP (bv); \ + VM_VALIDATE_BYTEVECTOR (bv); \ + if (SCM_LIKELY (SCM_I_INUMP (idx) \ + && ((i = SCM_I_INUM (idx)) >= 0) \ + && (i < SCM_BYTEVECTOR_LENGTH (bv)) \ + && (i % size == 0) \ + && (SCM_I_INUMP (val)) \ + && ((j = SCM_I_INUM (val)) >= min) \ + && (j <= max))) \ + *(scm_t_##type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = (scm_t_##type)j; \ + else \ + scm_bytevector_##fn_stem##_set_x (bv, idx, val); \ + NEXT; \ +} + +#define BV_INT_SET(stem, type, size) \ +{ \ + long i; \ + SCM bv, idx, val; POP (val); POP (idx); POP (bv); \ + VM_VALIDATE_BYTEVECTOR (bv); \ + if (SCM_LIKELY (SCM_I_INUMP (idx) \ + && ((i = SCM_I_INUM (idx)) >= 0) \ + && (i < SCM_BYTEVECTOR_LENGTH (bv)) \ + && (i % size == 0))) \ + *(scm_t_##type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = scm_to_##type (val); \ + else \ + scm_bytevector_##stem##_native_set_x (bv, idx, val); \ + NEXT; \ +} + +#define BV_FLOAT_SET(stem, fn_stem, type, size) \ +{ \ + long i; \ + SCM bv, idx, val; POP (val); POP (idx); POP (bv); \ + VM_VALIDATE_BYTEVECTOR (bv); \ + if (SCM_LIKELY (SCM_I_INUMP (idx) \ + && ((i = SCM_I_INUM (idx)) >= 0) \ + && (i < SCM_BYTEVECTOR_LENGTH (bv)) \ + && (i % size == 0))) \ + *(type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = scm_to_double (val); \ + else \ + scm_bytevector_##fn_stem##_native_set_x (bv, idx, val); \ + NEXT; \ +} + +VM_DEFINE_INSTRUCTION (137, bv_u8_set, "bv-u8-set", 0, 3, 0) +BV_FIXABLE_INT_SET (u8, u8, uint8, 0, SCM_T_UINT8_MAX, 1) +VM_DEFINE_INSTRUCTION (138, bv_s8_set, "bv-s8-set", 0, 3, 0) +BV_FIXABLE_INT_SET (s8, s8, int8, SCM_T_INT8_MIN, SCM_T_INT8_MAX, 1) +VM_DEFINE_INSTRUCTION (139, bv_u16_native_set, "bv-u16-native-set", 0, 3, 0) +BV_FIXABLE_INT_SET (u16, u16_native, uint16, 0, SCM_T_UINT16_MAX, 2) +VM_DEFINE_INSTRUCTION (140, bv_s16_native_set, "bv-s16-native-set", 0, 3, 0) +BV_FIXABLE_INT_SET (s16, s16_native, int16, SCM_T_INT16_MIN, SCM_T_INT16_MAX, 2) +VM_DEFINE_INSTRUCTION (141, bv_u32_native_set, "bv-u32-native-set", 0, 3, 0) +/* FIXME: u32 is always a fixnum on 64-bit builds */ +BV_INT_SET (u32, uint32, 4) +VM_DEFINE_INSTRUCTION (142, bv_s32_native_set, "bv-s32-native-set", 0, 3, 0) +BV_INT_SET (s32, int32, 4) +VM_DEFINE_INSTRUCTION (143, bv_u64_native_set, "bv-u64-native-set", 0, 3, 0) +BV_INT_SET (u64, uint64, 8) +VM_DEFINE_INSTRUCTION (144, bv_s64_native_set, "bv-s64-native-set", 0, 3, 0) +BV_INT_SET (s64, int64, 8) +VM_DEFINE_INSTRUCTION (145, bv_f32_native_set, "bv-f32-native-set", 0, 3, 0) +BV_FLOAT_SET (f32, ieee_single, float, 4) +VM_DEFINE_INSTRUCTION (146, bv_f64_native_set, "bv-f64-native-set", 0, 3, 0) +BV_FLOAT_SET (f64, ieee_double, double, 8) + +#undef BV_FIXABLE_INT_SET +#undef BV_INT_SET +#undef BV_FLOAT_SET + /* (defun renumber-ops () "start from top of buffer and renumber 'VM_DEFINE_FOO (\n' sequences" diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index 6b130e7e1..d55d6e218 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001,2008,2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/vm.c b/libguile/vm.c index f708b2108..514ff8d4e 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H diff --git a/libguile/vm.h b/libguile/vm.h index 2f2b617ce..b079c7aa0 100644 --- a/libguile/vm.h +++ b/libguile/vm.h @@ -1,18 +1,19 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SCM_VM_H_ diff --git a/libguile/vports.c b/libguile/vports.c index 564f0e73f..cea11c61d 100644 --- a/libguile/vports.c +++ b/libguile/vports.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/vports.h b/libguile/vports.h index 365303bc1..ae64dd438 100644 --- a/libguile/vports.h +++ b/libguile/vports.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/weaks.c b/libguile/weaks.c index 1d58b5dd3..64aa536b8 100644 --- a/libguile/weaks.c +++ b/libguile/weaks.c @@ -1,18 +1,19 @@ /* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/weaks.h b/libguile/weaks.h index 34c44a97a..46afd830c 100644 --- a/libguile/weaks.h +++ b/libguile/weaks.h @@ -6,18 +6,19 @@ /* Copyright (C) 1995,1996,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/win32-dirent.c b/libguile/win32-dirent.c index cd7e8bac6..de170c70b 100644 --- a/libguile/win32-dirent.c +++ b/libguile/win32-dirent.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/win32-dirent.h b/libguile/win32-dirent.h index 30bc118ea..578db49b9 100644 --- a/libguile/win32-dirent.h +++ b/libguile/win32-dirent.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* Directory stream type. diff --git a/libguile/win32-socket.c b/libguile/win32-socket.c index 54f80a764..e845d886a 100644 --- a/libguile/win32-socket.c +++ b/libguile/win32-socket.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/libguile/win32-socket.h b/libguile/win32-socket.h index 51856051d..4ab9b942a 100644 --- a/libguile/win32-socket.h +++ b/libguile/win32-socket.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include "libguile/__scm.h" diff --git a/libguile/win32-uname.c b/libguile/win32-uname.c index d4d737f49..5349f1410 100644 --- a/libguile/win32-uname.c +++ b/libguile/win32-uname.c @@ -1,18 +1,19 @@ /* Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/libguile/win32-uname.h b/libguile/win32-uname.h index 8593dc7d9..4b7498133 100644 --- a/libguile/win32-uname.h +++ b/libguile/win32-uname.h @@ -6,18 +6,19 @@ /* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #define _UTSNAME_LENGTH 65 diff --git a/m4/canonicalize-lgpl.m4 b/m4/canonicalize-lgpl.m4 new file mode 100644 index 000000000..3a8ee2f95 --- /dev/null +++ b/m4/canonicalize-lgpl.m4 @@ -0,0 +1,35 @@ +# canonicalize-lgpl.m4 serial 5 +dnl Copyright (C) 2003, 2006-2007, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_CANONICALIZE_LGPL], +[ + dnl Do this replacement check manually because the file name is shorter + dnl than the function name. + AC_CHECK_DECLS_ONCE([canonicalize_file_name]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) + if test $ac_cv_func_canonicalize_file_name = no; then + AC_LIBOBJ([canonicalize-lgpl]) + AC_DEFINE([realpath], [rpl_realpath], + [Define to a replacement function name for realpath().]) + gl_PREREQ_CANONICALIZE_LGPL + fi +]) + +# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation +# (no AC_LIBOBJ). +AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], +[ + AC_CHECK_DECLS_ONCE([canonicalize_file_name]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) + gl_PREREQ_CANONICALIZE_LGPL +]) + +# Prerequisites of lib/canonicalize-lgpl.c. +AC_DEFUN([gl_PREREQ_CANONICALIZE_LGPL], +[ + AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h]) + AC_CHECK_FUNCS_ONCE([getcwd readlink]) +]) diff --git a/m4/eealloc.m4 b/m4/eealloc.m4 new file mode 100644 index 000000000..3c9c0b52a --- /dev/null +++ b/m4/eealloc.m4 @@ -0,0 +1,32 @@ +# eealloc.m4 serial 2 +dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_EEALLOC], +[ + AC_REQUIRE([gl_EEMALLOC]) + AC_REQUIRE([gl_EEREALLOC]) + AC_REQUIRE([AC_C_INLINE]) +]) + +AC_DEFUN([gl_EEMALLOC], +[ + _AC_FUNC_MALLOC_IF( + [gl_cv_func_malloc_0_nonnull=1], + [gl_cv_func_malloc_0_nonnull=0]) + AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], + [If malloc(0) is != NULL, define this to 1. Otherwise define this + to 0.]) +]) + +AC_DEFUN([gl_EEREALLOC], +[ + _AC_FUNC_REALLOC_IF( + [gl_cv_func_realloc_0_nonnull=1], + [gl_cv_func_realloc_0_nonnull=0]) + AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], + [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this + to 0.]) +]) diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index 0fbe11969..e70283f41 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap count-one-bits environ extensions flock fpieee full-read full-write iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string +# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap canonicalize-lgpl count-one-bits environ extensions flock fpieee full-read full-write havelib iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) @@ -23,6 +23,7 @@ gl_MODULES([ alloca-opt autobuild byteswap + canonicalize-lgpl count-one-bits environ extensions @@ -30,6 +31,7 @@ gl_MODULES([ fpieee full-read full-write + havelib iconv_open-utf lib-symbol-visibility libunistring diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 8f775107e..ef0534ef8 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -46,6 +46,8 @@ AC_DEFUN([gl_INIT], gl_source_base='lib' gl_FUNC_ALLOCA gl_BYTESWAP + gl_CANONICALIZE_LGPL + gl_MODULE_INDICATOR([canonicalize-lgpl]) gl_COUNT_ONE_BITS gl_ENVIRON gl_UNISTD_MODULE_INDICATOR([environ]) @@ -63,6 +65,7 @@ AC_DEFUN([gl_INIT], AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_FUNC_MALLOC_POSIX gl_STDLIB_MODULE_INDICATOR([malloc-posix]) + gl_MALLOCA gl_FUNC_MBRLEN gl_WCHAR_MODULE_INDICATOR([mbrlen]) gl_FUNC_MBRTOWC @@ -70,8 +73,11 @@ AC_DEFUN([gl_INIT], gl_FUNC_MBSINIT gl_WCHAR_MODULE_INDICATOR([mbsinit]) gl_MULTIARCH + gl_PATHMAX gl_FUNC_PUTENV gl_STDLIB_MODULE_INDICATOR([putenv]) + gl_FUNC_READLINK + gl_UNISTD_MODULE_INDICATOR([readlink]) gl_SAFE_READ gl_SAFE_WRITE gt_TYPE_SSIZE_T @@ -236,6 +242,8 @@ AC_DEFUN([gl_FILE_LIST], [ lib/c-strcasecmp.c lib/c-strcaseeq.h lib/c-strncasecmp.c + lib/canonicalize-lgpl.c + lib/canonicalize.h lib/config.charset lib/count-one-bits.h lib/flock.c @@ -255,10 +263,15 @@ AC_DEFUN([gl_FILE_LIST], [ lib/localcharset.c lib/localcharset.h lib/malloc.c + lib/malloca.c + lib/malloca.h + lib/malloca.valgrind lib/mbrlen.c lib/mbrtowc.c lib/mbsinit.c + lib/pathmax.h lib/putenv.c + lib/readlink.c lib/ref-add.sin lib/ref-del.sin lib/safe-read.c @@ -298,8 +311,10 @@ AC_DEFUN([gl_FILE_LIST], [ m4/alloca.m4 m4/autobuild.m4 m4/byteswap.m4 + m4/canonicalize-lgpl.m4 m4/codeset.m4 m4/count-one-bits.m4 + m4/eealloc.m4 m4/environ.m4 m4/extensions.m4 m4/flock.m4 @@ -321,12 +336,15 @@ AC_DEFUN([gl_FILE_LIST], [ m4/locale-zh.m4 m4/longlong.m4 m4/malloc.m4 + m4/malloca.m4 m4/mbrlen.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbstate_t.m4 m4/multiarch.m4 + m4/pathmax.m4 m4/putenv.m4 + m4/readlink.m4 m4/safe-read.m4 m4/safe-write.m4 m4/ssize_t.m4 diff --git a/m4/malloca.m4 b/m4/malloca.m4 new file mode 100644 index 000000000..2841ae83a --- /dev/null +++ b/m4/malloca.m4 @@ -0,0 +1,14 @@ +# malloca.m4 serial 1 +dnl Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_MALLOCA], +[ + dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables + dnl @ALLOCA@ and @LTALLOCA@. + dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. + AC_REQUIRE([gl_EEMALLOC]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) +]) diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 new file mode 100644 index 000000000..465180161 --- /dev/null +++ b/m4/pathmax.m4 @@ -0,0 +1,12 @@ +# pathmax.m4 serial 8 +dnl Copyright (C) 2002, 2003, 2005, 2006, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_PATHMAX], +[ + dnl Prerequisites of lib/pathmax.h. + AC_CHECK_FUNCS_ONCE([pathconf]) + AC_CHECK_HEADERS_ONCE([sys/param.h]) +]) diff --git a/m4/readlink.m4 b/m4/readlink.m4 new file mode 100644 index 000000000..ff3f1f587 --- /dev/null +++ b/m4/readlink.m4 @@ -0,0 +1,29 @@ +# readlink.m4 serial 5 +dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_READLINK], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([readlink]) + if test $ac_cv_func_readlink = no; then + HAVE_READLINK=0 + AC_LIBOBJ([readlink]) + gl_PREREQ_READLINK + fi +]) + +# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ). +AC_DEFUN([gl_FUNC_READLINK_SEPARATE], +[ + AC_CHECK_FUNCS_ONCE([readlink]) + gl_PREREQ_READLINK +]) + +# Prerequisites of lib/readlink.c. +AC_DEFUN([gl_PREREQ_READLINK], +[ + : +]) diff --git a/m4/string_h.m4 b/m4/string_h.m4 index 2d5553c37..11f09c8b8 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -1,11 +1,11 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 +# serial 7 # Written by Paul Eggert. @@ -32,6 +32,7 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR], AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ + GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) @@ -83,6 +84,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) + REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) diff --git a/meta/Makefile.am b/meta/Makefile.am index 7f655e535..e047038aa 100644 --- a/meta/Makefile.am +++ b/meta/Makefile.am @@ -5,20 +5,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA bin_SCRIPTS=guile-config guile-tools EXTRA_DIST= $(bin_SCRIPTS) \ diff --git a/meta/gdb-uninstalled-guile.in b/meta/gdb-uninstalled-guile.in index aa33e0799..1151dbc3a 100644 --- a/meta/gdb-uninstalled-guile.in +++ b/meta/gdb-uninstalled-guile.in @@ -4,20 +4,20 @@ # # This file is part of GUILE. # -# GUILE is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2, or +# GUILE is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or # (at your option) any later version. # # GUILE is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public -# License along with GUILE; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -# Floor, Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with GUILE; see the file COPYING.LESSER. If not, +# write to the Free Software Foundation, Inc., 51 Franklin Street, +# Fifth Floor, Boston, MA 02110-1301 USA # Commentary: diff --git a/meta/guile-config b/meta/guile-config index 815414a38..7304ae2a8 100755 --- a/meta/guile-config +++ b/meta/guile-config @@ -9,7 +9,7 @@ exec guile -e main -s $0 "$@" ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,8 +17,9 @@ exec guile -e main -s $0 "$@" ;;;; Lesser General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU Lesser General Public -;;;; License along with this library; if not, write to the Free Software -;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;;;; Boston, MA 02110-1301 USA ;;; This script has been deprecated. Just use pkg-config. diff --git a/meta/guile-tools b/meta/guile-tools index 6fb93c13a..0c66c7200 100755 --- a/meta/guile-tools +++ b/meta/guile-tools @@ -4,14 +4,14 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@" !# ;;;; guile-tools --- running scripts bundled with Guile -;;;; Jim Blandy --- September 1997 +;;;; Andy Wingo --- April 2009 ;;;; -;;;; Copyright (C) 1998, 2001, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +;;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,8 +19,9 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@" ;;;; Lesser General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU Lesser General Public -;;;; License along with this library; if not, write to the Free Software -;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; License along with this library; if not, write to the Free +;;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;;;; Boston, MA 02110-1301 USA (define-module (guile-tools)) diff --git a/meta/guile.in b/meta/guile.in index d7bc893e6..ab1fe3706 100644 --- a/meta/guile.in +++ b/meta/guile.in @@ -4,20 +4,20 @@ # # This file is part of GUILE. # -# GUILE is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2, or +# GUILE is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3, or # (at your option) any later version. # # GUILE is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public -# License along with GUILE; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -# Floor, Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with GUILE; see the file COPYING.LESSER. If not, +# write to the Free Software Foundation, Inc., 51 Franklin Street, +# Fifth Floor, Boston, MA 02110-1301 USA # Commentary: diff --git a/meta/guile.m4 b/meta/guile.m4 index 1e30d508a..5ba725f51 100644 --- a/meta/guile.m4 +++ b/meta/guile.m4 @@ -3,9 +3,9 @@ ## Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc. ## ## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. +## modify it under the terms of the GNU Lesser General Public License +## as published by the Free Software Foundation; either version 3 of +## the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,7 +14,8 @@ ## ## You should have received a copy of the GNU Lesser General Public ## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +## 02110-1301 USA # serial 9 diff --git a/meta/uninstalled-env.in b/meta/uninstalled-env.in index b15237c4b..8ee690ccf 100644 --- a/meta/uninstalled-env.in +++ b/meta/uninstalled-env.in @@ -4,10 +4,10 @@ # # This file is part of GUILE. # -# This script is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. +# This script is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3 of the +# License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,7 +16,8 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA # NOTE: If you update this file, please update uninstalled.in as # well, if appropriate. diff --git a/module/Makefile.am b/module/Makefile.am index ca7785212..a904a8f8e 100644 --- a/module/Makefile.am +++ b/module/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA include $(top_srcdir)/am/guilec @@ -50,6 +50,7 @@ SOURCES = \ $(OOP_SOURCES) \ $(SYSTEM_SOURCES) \ $(ECMASCRIPT_LANG_SOURCES) \ + $(BRAINFUCK_LANG_SOURCES) \ $(SCRIPTS_SOURCES) ## test.scm is not currently installed. @@ -105,12 +106,18 @@ ECMASCRIPT_LANG_SOURCES = \ language/ecmascript/parse-lalr.scm \ language/ecmascript/tokenize.scm \ language/ecmascript/parse.scm \ - language/ecmascript/spec.scm \ language/ecmascript/impl.scm \ language/ecmascript/base.scm \ language/ecmascript/function.scm \ language/ecmascript/array.scm \ - language/ecmascript/compile-ghil.scm + language/ecmascript/compile-ghil.scm \ + language/ecmascript/spec.scm + +BRAINFUCK_LANG_SOURCES = \ + language/brainfuck/parse.scm \ + language/brainfuck/compile-scheme.scm \ + language/brainfuck/compile-tree-il.scm \ + language/brainfuck/spec.scm SCRIPTS_SOURCES = \ scripts/PROGRAM.scm \ diff --git a/module/ice-9/and-let-star.scm b/module/ice-9/and-let-star.scm index b8cb2a679..bfd597b1e 100644 --- a/module/ice-9/and-let-star.scm +++ b/module/ice-9/and-let-star.scm @@ -6,7 +6,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/arrays.scm b/module/ice-9/arrays.scm index 7ddcc8ab8..f7f9e5eed 100644 --- a/module/ice-9/arrays.scm +++ b/module/ice-9/arrays.scm @@ -2,20 +2,19 @@ ;;;; Copyright (C) 1999, 2001, 2004, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;;; (define (array-shape a) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index bb66ccfb6..36a463ad3 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -6,7 +6,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -382,8 +382,12 @@ (define (apply-to-args args fn) (apply fn args)) (defmacro false-if-exception (expr) - `(catch #t (lambda () ,expr) - (lambda args #f))) + `(catch #t + (lambda () + ;; avoid saving backtraces inside false-if-exception + (with-fluid* the-last-stack (fluid-ref the-last-stack) + (lambda () ,expr))) + (lambda args #f))) @@ -2320,9 +2324,9 @@ module '(ice-9 q) '(make-q q-length))}." ;;; (defmacro define-option-interface (option-group) - (let* ((option-name car) - (option-value cadr) - (option-documentation caddr) + (let* ((option-name 'car) + (option-value 'cadr) + (option-documentation 'caddr) ;; Below follow the macros defining the run-time option interfaces. @@ -2333,15 +2337,15 @@ module '(ice-9 q) '(make-q q-length))}." (,interface (car args)) (,interface)) (else (for-each (lambda (option) - (display (option-name option)) + (display (,option-name option)) (if (< (string-length - (symbol->string (option-name option))) + (symbol->string (,option-name option))) 8) (display #\tab)) (display #\tab) - (display (option-value option)) + (display (,option-value option)) (display #\tab) - (display (option-documentation option)) + (display (,option-documentation option)) (newline)) (,interface #t))))))) @@ -2927,8 +2931,6 @@ module '(ice-9 q) '(make-q q-length))}." (process-use-modules (list (list ,@(compile-interface-spec spec)))) *unspecified*)) -;; Dirk:FIXME:: This incorrect (according to R5RS) syntax needs to be changed -;; as soon as guile supports hygienic macros. (define-syntax define-private (syntax-rules () ((_ foo bar) @@ -3190,69 +3192,66 @@ module '(ice-9 q) '(make-q q-length))}." (append (hashq-ref %cond-expand-table mod '()) features))))) -(define cond-expand - (procedure->memoizing-macro - (lambda (exp env) - (let ((clauses (cdr exp)) - (syntax-error (lambda (cl) - (error "invalid clause in `cond-expand'" cl)))) - (letrec - ((test-clause - (lambda (clause) - (cond - ((symbol? clause) - (or (memq clause %cond-expand-features) - (let lp ((uses (module-uses (env-module env)))) - (if (pair? uses) - (or (memq clause - (hashq-ref %cond-expand-table - (car uses) '())) - (lp (cdr uses))) - #f)))) - ((pair? clause) - (cond - ((eq? 'and (car clause)) - (let lp ((l (cdr clause))) - (cond ((null? l) - #t) - ((pair? l) - (and (test-clause (car l)) (lp (cdr l)))) - (else - (syntax-error clause))))) - ((eq? 'or (car clause)) - (let lp ((l (cdr clause))) - (cond ((null? l) - #f) - ((pair? l) - (or (test-clause (car l)) (lp (cdr l)))) - (else - (syntax-error clause))))) - ((eq? 'not (car clause)) - (cond ((not (pair? (cdr clause))) - (syntax-error clause)) - ((pair? (cddr clause)) - ((syntax-error clause)))) - (not (test-clause (cadr clause)))) - (else - (syntax-error clause)))) - (else - (syntax-error clause)))))) - (let lp ((c clauses)) - (cond - ((null? c) - (error "Unfulfilled `cond-expand'")) - ((not (pair? c)) - (syntax-error c)) - ((not (pair? (car c))) - (syntax-error (car c))) - ((test-clause (caar c)) - `(begin ,@(cdar c))) - ((eq? (caar c) 'else) - (if (pair? (cdr c)) - (syntax-error c)) - `(begin ,@(cdar c))) - (else - (lp (cdr c)))))))))) +(define-macro (cond-expand . clauses) + (let ((syntax-error (lambda (cl) + (error "invalid clause in `cond-expand'" cl)))) + (letrec + ((test-clause + (lambda (clause) + (cond + ((symbol? clause) + (or (memq clause %cond-expand-features) + (let lp ((uses (module-uses (current-module)))) + (if (pair? uses) + (or (memq clause + (hashq-ref %cond-expand-table + (car uses) '())) + (lp (cdr uses))) + #f)))) + ((pair? clause) + (cond + ((eq? 'and (car clause)) + (let lp ((l (cdr clause))) + (cond ((null? l) + #t) + ((pair? l) + (and (test-clause (car l)) (lp (cdr l)))) + (else + (syntax-error clause))))) + ((eq? 'or (car clause)) + (let lp ((l (cdr clause))) + (cond ((null? l) + #f) + ((pair? l) + (or (test-clause (car l)) (lp (cdr l)))) + (else + (syntax-error clause))))) + ((eq? 'not (car clause)) + (cond ((not (pair? (cdr clause))) + (syntax-error clause)) + ((pair? (cddr clause)) + ((syntax-error clause)))) + (not (test-clause (cadr clause)))) + (else + (syntax-error clause)))) + (else + (syntax-error clause)))))) + (let lp ((c clauses)) + (cond + ((null? c) + (error "Unfulfilled `cond-expand'")) + ((not (pair? c)) + (syntax-error c)) + ((not (pair? (car c))) + (syntax-error (car c))) + ((test-clause (caar c)) + `(begin ,@(cdar c))) + ((eq? (caar c) 'else) + (if (pair? (cdr c)) + (syntax-error c)) + `(begin ,@(cdar c))) + (else + (lp (cdr c)))))))) ;; This procedure gets called from the startup code with a list of ;; numbers, which are the numbers of the SRFIs to be loaded on startup. diff --git a/module/ice-9/buffered-input.scm b/module/ice-9/buffered-input.scm index 11530e897..05e9255c0 100644 --- a/module/ice-9/buffered-input.scm +++ b/module/ice-9/buffered-input.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/calling.scm b/module/ice-9/calling.scm index 07f7a7805..f66bba27e 100644 --- a/module/ice-9/calling.scm +++ b/module/ice-9/calling.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/channel.scm b/module/ice-9/channel.scm index 8cbb00190..b9d470044 100644 --- a/module/ice-9/channel.scm +++ b/module/ice-9/channel.scm @@ -2,19 +2,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Commentary: diff --git a/module/ice-9/common-list.scm b/module/ice-9/common-list.scm index 7d62bc319..ea1b0f3de 100644 --- a/module/ice-9/common-list.scm +++ b/module/ice-9/common-list.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/debug.scm b/module/ice-9/debug.scm index 0e751590d..1fd5b66da 100644 --- a/module/ice-9/debug.scm +++ b/module/ice-9/debug.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/debugger.scm b/module/ice-9/debugger.scm index 3dddd9030..06f7ed230 100644 --- a/module/ice-9/debugger.scm +++ b/module/ice-9/debugger.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugger) #:use-module (ice-9 debugger command-loop) diff --git a/module/ice-9/debugger/command-loop.scm b/module/ice-9/debugger/command-loop.scm index 62a08ea65..c6628271c 100644 --- a/module/ice-9/debugger/command-loop.scm +++ b/module/ice-9/debugger/command-loop.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugger command-loop) #:use-module ((ice-9 debugger commands) :prefix debugger:) diff --git a/module/ice-9/debugger/commands.scm b/module/ice-9/debugger/commands.scm index ef6f79026..c254ce9e2 100644 --- a/module/ice-9/debugger/commands.scm +++ b/module/ice-9/debugger/commands.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugger commands) #:use-module (ice-9 debug) diff --git a/module/ice-9/debugger/state.scm b/module/ice-9/debugger/state.scm index 11b8ebbf0..0bda0fad5 100644 --- a/module/ice-9/debugger/state.scm +++ b/module/ice-9/debugger/state.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugger state) #:export (make-state diff --git a/module/ice-9/debugger/trc.scm b/module/ice-9/debugger/trc.scm index 49af2747d..3e7e2f359 100644 --- a/module/ice-9/debugger/trc.scm +++ b/module/ice-9/debugger/trc.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugger trc) #:export (trc trc-syms trc-all trc-none trc-add trc-remove trc-port)) diff --git a/module/ice-9/debugging/breakpoints.scm b/module/ice-9/debugging/breakpoints.scm index 132746f17..c839409ef 100644 --- a/module/ice-9/debugging/breakpoints.scm +++ b/module/ice-9/debugging/breakpoints.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2005 Neil Jerram ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; This module provides a practical interface for setting and ;;; manipulating breakpoints. diff --git a/module/ice-9/debugging/steps.scm b/module/ice-9/debugging/steps.scm index fedbc6a32..cd328bd7d 100644 --- a/module/ice-9/debugging/steps.scm +++ b/module/ice-9/debugging/steps.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugging steps) #:use-module (ice-9 debugging traps) diff --git a/module/ice-9/debugging/trace.scm b/module/ice-9/debugging/trace.scm index ad3015ddf..55b1f3965 100644 --- a/module/ice-9/debugging/trace.scm +++ b/module/ice-9/debugging/trace.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugging trace) #:use-module (ice-9 debug) diff --git a/module/ice-9/debugging/traps.scm b/module/ice-9/debugging/traps.scm index ae1673688..e13011e99 100755 --- a/module/ice-9/debugging/traps.scm +++ b/module/ice-9/debugging/traps.scm @@ -3,19 +3,19 @@ ;;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. ;;; Copyright (C) 2005 Neil Jerram ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; This module provides an abstraction around Guile's low level trap ;;; handler interface; its aim is to make the low level trap mechanism diff --git a/module/ice-9/debugging/trc.scm b/module/ice-9/debugging/trc.scm index 9e95d7e5c..face227d6 100644 --- a/module/ice-9/debugging/trc.scm +++ b/module/ice-9/debugging/trc.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 debugging trc) #:export (trc trc-syms trc-all trc-none trc-add trc-remove trc-port)) diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm index 6f2c2258b..53fc741c8 100644 --- a/module/ice-9/deprecated.scm +++ b/module/ice-9/deprecated.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/documentation.scm b/module/ice-9/documentation.scm index 92d31cabc..bbd6713f6 100644 --- a/module/ice-9/documentation.scm +++ b/module/ice-9/documentation.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/emacs.scm b/module/ice-9/emacs.scm index 12d8228ee..88035862f 100644 --- a/module/ice-9/emacs.scm +++ b/module/ice-9/emacs.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/expect.scm b/module/ice-9/expect.scm index a024e91e8..ffc2e1742 100644 --- a/module/ice-9/expect.scm +++ b/module/ice-9/expect.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/ftw.scm b/module/ice-9/ftw.scm index 23f341521..ce2fb165e 100644 --- a/module/ice-9/ftw.scm +++ b/module/ice-9/ftw.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/gap-buffer.scm b/module/ice-9/gap-buffer.scm index b6162e802..4533bb539 100644 --- a/module/ice-9/gap-buffer.scm +++ b/module/ice-9/gap-buffer.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; ;;; Author: Thien-Thi Nguyen diff --git a/module/ice-9/gds-server.scm b/module/ice-9/gds-server.scm index f59758729..b64e41161 100644 --- a/module/ice-9/gds-server.scm +++ b/module/ice-9/gds-server.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2003 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 gds-server) #:export (run-server)) diff --git a/module/ice-9/getopt-long.scm b/module/ice-9/getopt-long.scm index b16328ba8..891a2e3b3 100644 --- a/module/ice-9/getopt-long.scm +++ b/module/ice-9/getopt-long.scm @@ -1,18 +1,18 @@ ;;; Copyright (C) 1998, 2001, 2006, 2009 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Russ McManus (rewritten by Thien-Thi Nguyen) diff --git a/module/ice-9/hcons.scm b/module/ice-9/hcons.scm index 6323506d2..7275cf476 100644 --- a/module/ice-9/hcons.scm +++ b/module/ice-9/hcons.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/history.scm b/module/ice-9/history.scm index 921a25741..e9097c2cc 100644 --- a/module/ice-9/history.scm +++ b/module/ice-9/history.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/i18n.scm b/module/ice-9/i18n.scm index f33a9f258..dd14e6754 100644 --- a/module/ice-9/i18n.scm +++ b/module/ice-9/i18n.scm @@ -5,13 +5,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/module/ice-9/lineio.scm b/module/ice-9/lineio.scm index f122268df..055eb6eb4 100644 --- a/module/ice-9/lineio.scm +++ b/module/ice-9/lineio.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/list.scm b/module/ice-9/list.scm index af83d1742..1b898a368 100644 --- a/module/ice-9/list.scm +++ b/module/ice-9/list.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 list) :export (rassoc rassv rassq)) diff --git a/module/ice-9/ls.scm b/module/ice-9/ls.scm index e848be32a..f729d58ce 100644 --- a/module/ice-9/ls.scm +++ b/module/ice-9/ls.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/mapping.scm b/module/ice-9/mapping.scm index c4ef4fe99..2907a8d89 100644 --- a/module/ice-9/mapping.scm +++ b/module/ice-9/mapping.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/match.scm b/module/ice-9/match.scm index baa4d5aad..d7589239e 100644 --- a/module/ice-9/match.scm +++ b/module/ice-9/match.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/networking.scm b/module/ice-9/networking.scm index 9a30fc5b6..7e84f0969 100644 --- a/module/ice-9/networking.scm +++ b/module/ice-9/networking.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/null.scm b/module/ice-9/null.scm index 3f9f5b0a5..58b271e31 100644 --- a/module/ice-9/null.scm +++ b/module/ice-9/null.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/occam-channel.scm b/module/ice-9/occam-channel.scm index e04ecac5b..ea1154b52 100644 --- a/module/ice-9/occam-channel.scm +++ b/module/ice-9/occam-channel.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 occam-channel) #:use-module (oop goops) diff --git a/module/ice-9/optargs.scm b/module/ice-9/optargs.scm index 4dea92fd7..3093e15a4 100644 --- a/module/ice-9/optargs.scm +++ b/module/ice-9/optargs.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -410,15 +410,11 @@ ;; (defmacro* transmorgify (a #:optional b) (defmacro defmacro* (NAME ARGLIST . BODY) - (defmacro*-guts 'define NAME ARGLIST BODY)) + `(define-macro ,NAME #f (lambda* ,ARGLIST ,@BODY))) (defmacro defmacro*-public (NAME ARGLIST . BODY) - (defmacro*-guts 'define-public NAME ARGLIST BODY)) - -;; The guts of defmacro* and defmacro*-public -(define (defmacro*-guts DT NAME ARGLIST BODY) - `(,DT ,NAME - (,(lambda (transformer) (defmacro:transformer transformer)) - (lambda* ,ARGLIST ,@BODY)))) + `(begin + (defmacro* ,NAME ,ARGLIST ,@BODY) + (export-syntax ,NAME))) ;;; optargs.scm ends here diff --git a/module/ice-9/poe.scm b/module/ice-9/poe.scm index fe963db08..e7b6e3a75 100644 --- a/module/ice-9/poe.scm +++ b/module/ice-9/poe.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/popen.scm b/module/ice-9/popen.scm index 275faaa0c..1a1892851 100644 --- a/module/ice-9/popen.scm +++ b/module/ice-9/popen.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/posix.scm b/module/ice-9/posix.scm index dd1a12690..a1be33c19 100644 --- a/module/ice-9/posix.scm +++ b/module/ice-9/posix.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/pretty-print.scm b/module/ice-9/pretty-print.scm index bef76ddcb..0ce6a8003 100644 --- a/module/ice-9/pretty-print.scm +++ b/module/ice-9/pretty-print.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm index a6e35b098..113269b2e 100644 --- a/module/ice-9/psyntax-pp.scm +++ b/module/ice-9/psyntax-pp.scm @@ -27,64 +27,64 @@ (andmap63 first68 rest69) #f)))))) (andmap63 first56 rest55)))))))) - (letrec ((lambda-var-list162 - (lambda (vars286) - (letrec ((lvl287 - (lambda (vars288 ls289 w290) - (if (pair? vars288) - (lvl287 - (cdr vars288) - (cons (wrap142 (car vars288) w290 #f) ls289) - w290) - (if (id?114 vars288) - (cons (wrap142 vars288 w290 #f) ls289) - (if (null? vars288) - ls289 - (if (syntax-object?98 vars288) - (lvl287 - (syntax-object-expression99 vars288) - ls289 - (join-wraps133 - w290 - (syntax-object-wrap100 vars288))) - (cons vars288 ls289)))))))) - (lvl287 vars286 (quote ()) (quote (())))))) - (gen-var161 - (lambda (id291) - (let ((id292 (if (syntax-object?98 id291) - (syntax-object-expression99 id291) - id291))) - (gensym (symbol->string id292))))) - (strip160 - (lambda (x293 w294) - (if (memq (quote top) (wrap-marks117 w294)) - x293 - (letrec ((f295 (lambda (x296) - (if (syntax-object?98 x296) - (strip160 - (syntax-object-expression99 x296) - (syntax-object-wrap100 x296)) - (if (pair? x296) - (let ((a297 (f295 (car x296))) - (d298 (f295 (cdr x296)))) - (if (if (eq? a297 (car x296)) - (eq? d298 (cdr x296)) + (letrec ((lambda-var-list163 + (lambda (vars287) + (letrec ((lvl288 + (lambda (vars289 ls290 w291) + (if (pair? vars289) + (lvl288 + (cdr vars289) + (cons (wrap143 (car vars289) w291 #f) ls290) + w291) + (if (id?115 vars289) + (cons (wrap143 vars289 w291 #f) ls290) + (if (null? vars289) + ls290 + (if (syntax-object?99 vars289) + (lvl288 + (syntax-object-expression100 vars289) + ls290 + (join-wraps134 + w291 + (syntax-object-wrap101 vars289))) + (cons vars289 ls290)))))))) + (lvl288 vars287 (quote ()) (quote (())))))) + (gen-var162 + (lambda (id292) + (let ((id293 (if (syntax-object?99 id292) + (syntax-object-expression100 id292) + id292))) + (gensym (symbol->string id293))))) + (strip161 + (lambda (x294 w295) + (if (memq (quote top) (wrap-marks118 w295)) + x294 + (letrec ((f296 (lambda (x297) + (if (syntax-object?99 x297) + (strip161 + (syntax-object-expression100 x297) + (syntax-object-wrap101 x297)) + (if (pair? x297) + (let ((a298 (f296 (car x297))) + (d299 (f296 (cdr x297)))) + (if (if (eq? a298 (car x297)) + (eq? d299 (cdr x297)) #f) - x296 - (cons a297 d298))) - (if (vector? x296) - (let ((old299 (vector->list x296))) - (let ((new300 (map f295 old299))) - (if (and-map*17 eq? old299 new300) - x296 - (list->vector new300)))) - x296)))))) - (f295 x293))))) - (ellipsis?159 - (lambda (x301) - (if (nonsymbol-id?113 x301) - (free-id=?137 - x301 + x297 + (cons a298 d299))) + (if (vector? x297) + (let ((old300 (vector->list x297))) + (let ((new301 (map f296 old300))) + (if (and-map*17 eq? old300 new301) + x297 + (list->vector new301)))) + x297)))))) + (f296 x294))))) + (ellipsis?160 + (lambda (x302) + (if (nonsymbol-id?114 x302) + (free-id=?138 + x302 '#(syntax-object ... ((top) @@ -192,6 +192,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -313,6 +314,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -424,6 +426,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure and-map*) @@ -431,1585 +434,1590 @@ ("i" "i"))) (hygiene guile))) #f))) - (chi-void158 (lambda () (build-void80 #f))) - (eval-local-transformer157 - (lambda (expanded302 mod303) - (let ((p304 (local-eval-hook77 expanded302 mod303))) - (if (procedure? p304) - p304 + (chi-void159 (lambda () (build-void81 #f))) + (eval-local-transformer158 + (lambda (expanded303 mod304) + (let ((p305 (local-eval-hook77 expanded303 mod304))) + (if (procedure? p305) + p305 (syntax-violation #f "nonprocedure transformer" - p304))))) - (chi-local-syntax156 - (lambda (rec?305 e306 r307 w308 s309 mod310 k311) - ((lambda (tmp312) - ((lambda (tmp313) - (if tmp313 - (apply (lambda (_314 id315 val316 e1317 e2318) - (let ((ids319 id315)) - (if (not (valid-bound-ids?139 ids319)) + p305))))) + (chi-local-syntax157 + (lambda (rec?306 e307 r308 w309 s310 mod311 k312) + ((lambda (tmp313) + ((lambda (tmp314) + (if tmp314 + (apply (lambda (_315 id316 val317 e1318 e2319) + (let ((ids320 id316)) + (if (not (valid-bound-ids?140 ids320)) (syntax-violation #f "duplicate bound keyword" - e306) - (let ((labels321 (gen-labels120 ids319))) - (let ((new-w322 - (make-binding-wrap131 - ids319 - labels321 - w308))) - (k311 (cons e1317 e2318) - (extend-env108 - labels321 - (let ((w324 (if rec?305 - new-w322 - w308)) - (trans-r325 - (macros-only-env110 - r307))) - (map (lambda (x326) + e307) + (let ((labels322 (gen-labels121 ids320))) + (let ((new-w323 + (make-binding-wrap132 + ids320 + labels322 + w309))) + (k312 (cons e1318 e2319) + (extend-env109 + labels322 + (let ((w325 (if rec?306 + new-w323 + w309)) + (trans-r326 + (macros-only-env111 + r308))) + (map (lambda (x327) (cons 'macro - (eval-local-transformer157 - (chi150 - x326 - trans-r325 - w324 - mod310) - mod310))) - val316)) - r307) - new-w322 - s309 - mod310)))))) - tmp313) - ((lambda (_328) + (eval-local-transformer158 + (chi151 + x327 + trans-r326 + w325 + mod311) + mod311))) + val317)) + r308) + new-w323 + s310 + mod311)))))) + tmp314) + ((lambda (_329) (syntax-violation #f "bad local syntax definition" - (source-wrap143 e306 w308 s309 mod310))) - tmp312))) + (source-wrap144 e307 w309 s310 mod311))) + tmp313))) ($sc-dispatch - tmp312 + tmp313 '(any #(each (any any)) any . each-any)))) - e306))) - (chi-lambda-clause155 - (lambda (e329 docstring330 c331 r332 w333 mod334 k335) - ((lambda (tmp336) - ((lambda (tmp337) - (if (if tmp337 - (apply (lambda (args338 doc339 e1340 e2341) - (if (string? (syntax->datum doc339)) - (not docstring330) + e307))) + (chi-lambda-clause156 + (lambda (e330 docstring331 c332 r333 w334 mod335 k336) + ((lambda (tmp337) + ((lambda (tmp338) + (if (if tmp338 + (apply (lambda (args339 doc340 e1341 e2342) + (if (string? (syntax->datum doc340)) + (not docstring331) #f)) - tmp337) + tmp338) #f) - (apply (lambda (args342 doc343 e1344 e2345) - (chi-lambda-clause155 - e329 - doc343 - (cons args342 (cons e1344 e2345)) - r332 - w333 - mod334 - k335)) - tmp337) - ((lambda (tmp347) - (if tmp347 - (apply (lambda (id348 e1349 e2350) - (let ((ids351 id348)) - (if (not (valid-bound-ids?139 ids351)) + (apply (lambda (args343 doc344 e1345 e2346) + (chi-lambda-clause156 + e330 + doc344 + (cons args343 (cons e1345 e2346)) + r333 + w334 + mod335 + k336)) + tmp338) + ((lambda (tmp348) + (if tmp348 + (apply (lambda (id349 e1350 e2351) + (let ((ids352 id349)) + (if (not (valid-bound-ids?140 ids352)) (syntax-violation 'lambda "invalid parameter list" - e329) - (let ((labels353 - (gen-labels120 ids351)) - (new-vars354 - (map gen-var161 ids351))) - (k335 (map syntax->datum ids351) - new-vars354 - (if docstring330 - (syntax->datum docstring330) + e330) + (let ((labels354 + (gen-labels121 ids352)) + (new-vars355 + (map gen-var162 ids352))) + (k336 (map syntax->datum ids352) + new-vars355 + (if docstring331 + (syntax->datum docstring331) #f) - (chi-body154 - (cons e1349 e2350) - e329 - (extend-var-env109 - labels353 - new-vars354 - r332) - (make-binding-wrap131 - ids351 - labels353 - w333) - mod334)))))) - tmp347) - ((lambda (tmp356) - (if tmp356 - (apply (lambda (ids357 e1358 e2359) - (let ((old-ids360 - (lambda-var-list162 ids357))) - (if (not (valid-bound-ids?139 - old-ids360)) + (chi-body155 + (cons e1350 e2351) + e330 + (extend-var-env110 + labels354 + new-vars355 + r333) + (make-binding-wrap132 + ids352 + labels354 + w334) + mod335)))))) + tmp348) + ((lambda (tmp357) + (if tmp357 + (apply (lambda (ids358 e1359 e2360) + (let ((old-ids361 + (lambda-var-list163 ids358))) + (if (not (valid-bound-ids?140 + old-ids361)) (syntax-violation 'lambda "invalid parameter list" - e329) - (let ((labels361 - (gen-labels120 - old-ids360)) - (new-vars362 - (map gen-var161 - old-ids360))) - (k335 (letrec ((f363 (lambda (ls1364 - ls2365) - (if (null? ls1364) + e330) + (let ((labels362 + (gen-labels121 + old-ids361)) + (new-vars363 + (map gen-var162 + old-ids361))) + (k336 (letrec ((f364 (lambda (ls1365 + ls2366) + (if (null? ls1365) (syntax->datum - ls2365) - (f363 (cdr ls1364) + ls2366) + (f364 (cdr ls1365) (cons (syntax->datum - (car ls1364)) - ls2365)))))) - (f363 (cdr old-ids360) - (car old-ids360))) - (letrec ((f366 (lambda (ls1367 - ls2368) - (if (null? ls1367) - ls2368 - (f366 (cdr ls1367) - (cons (car ls1367) - ls2368)))))) - (f366 (cdr new-vars362) - (car new-vars362))) - (if docstring330 + (car ls1365)) + ls2366)))))) + (f364 (cdr old-ids361) + (car old-ids361))) + (letrec ((f367 (lambda (ls1368 + ls2369) + (if (null? ls1368) + ls2369 + (f367 (cdr ls1368) + (cons (car ls1368) + ls2369)))))) + (f367 (cdr new-vars363) + (car new-vars363))) + (if docstring331 (syntax->datum - docstring330) + docstring331) #f) - (chi-body154 - (cons e1358 e2359) - e329 - (extend-var-env109 - labels361 - new-vars362 - r332) - (make-binding-wrap131 - old-ids360 - labels361 - w333) - mod334)))))) - tmp356) - ((lambda (_370) + (chi-body155 + (cons e1359 e2360) + e330 + (extend-var-env110 + labels362 + new-vars363 + r333) + (make-binding-wrap132 + old-ids361 + labels362 + w334) + mod335)))))) + tmp357) + ((lambda (_371) (syntax-violation 'lambda "bad lambda" - e329)) - tmp336))) + e330)) + tmp337))) ($sc-dispatch - tmp336 + tmp337 '(any any . each-any))))) ($sc-dispatch - tmp336 + tmp337 '(each-any any . each-any))))) ($sc-dispatch - tmp336 + tmp337 '(any any any . each-any)))) - c331))) - (chi-body154 - (lambda (body371 outer-form372 r373 w374 mod375) - (let ((r376 (cons (quote ("placeholder" placeholder)) r373))) - (let ((ribcage377 - (make-ribcage121 + c332))) + (chi-body155 + (lambda (body372 outer-form373 r374 w375 mod376) + (let ((r377 (cons (quote ("placeholder" placeholder)) r374))) + (let ((ribcage378 + (make-ribcage122 '() '() '()))) - (let ((w378 (make-wrap116 - (wrap-marks117 w374) - (cons ribcage377 (wrap-subst118 w374))))) - (letrec ((parse379 - (lambda (body380 - ids381 - labels382 - var-ids383 - vars384 - vals385 - bindings386) - (if (null? body380) + (let ((w379 (make-wrap117 + (wrap-marks118 w375) + (cons ribcage378 (wrap-subst119 w375))))) + (letrec ((parse380 + (lambda (body381 + ids382 + labels383 + var-ids384 + vars385 + vals386 + bindings387) + (if (null? body381) (syntax-violation #f "no expressions in body" - outer-form372) - (let ((e388 (cdar body380)) - (er389 (caar body380))) + outer-form373) + (let ((e389 (cdar body381)) + (er390 (caar body381))) (call-with-values (lambda () - (syntax-type148 - e388 - er389 + (syntax-type149 + e389 + er390 '(()) - (source-annotation105 er389) - ribcage377 - mod375 + (source-annotation106 er390) + ribcage378 + mod376 #f)) - (lambda (type390 - value391 - e392 - w393 - s394 - mod395) - (if (memv type390 + (lambda (type391 + value392 + e393 + w394 + s395 + mod396) + (if (memv type391 '(define-form)) - (let ((id396 (wrap142 - value391 - w393 - mod395)) - (label397 (gen-label119))) - (let ((var398 - (gen-var161 id396))) + (let ((id397 (wrap143 + value392 + w394 + mod396)) + (label398 (gen-label120))) + (let ((var399 + (gen-var162 id397))) (begin - (extend-ribcage!130 - ribcage377 - id396 - label397) - (parse379 - (cdr body380) - (cons id396 ids381) - (cons label397 labels382) - (cons id396 var-ids383) - (cons var398 vars384) - (cons (cons er389 - (wrap142 - e392 - w393 - mod395)) - vals385) + (extend-ribcage!131 + ribcage378 + id397 + label398) + (parse380 + (cdr body381) + (cons id397 ids382) + (cons label398 labels383) + (cons id397 var-ids384) + (cons var399 vars385) + (cons (cons er390 + (wrap143 + e393 + w394 + mod396)) + vals386) (cons (cons 'lexical - var398) - bindings386))))) - (if (memv type390 + var399) + bindings387))))) + (if (memv type391 '(define-syntax-form)) - (let ((id399 (wrap142 - value391 - w393 - mod395)) - (label400 (gen-label119))) + (let ((id400 (wrap143 + value392 + w394 + mod396)) + (label401 (gen-label120))) (begin - (extend-ribcage!130 - ribcage377 - id399 - label400) - (parse379 - (cdr body380) - (cons id399 ids381) - (cons label400 labels382) - var-ids383 - vars384 - vals385 + (extend-ribcage!131 + ribcage378 + id400 + label401) + (parse380 + (cdr body381) + (cons id400 ids382) + (cons label401 labels383) + var-ids384 + vars385 + vals386 (cons (cons 'macro - (cons er389 - (wrap142 - e392 - w393 - mod395))) - bindings386)))) - (if (memv type390 + (cons er390 + (wrap143 + e393 + w394 + mod396))) + bindings387)))) + (if (memv type391 '(begin-form)) - ((lambda (tmp401) - ((lambda (tmp402) - (if tmp402 - (apply (lambda (_403 - e1404) - (parse379 - (letrec ((f405 (lambda (forms406) - (if (null? forms406) - (cdr body380) - (cons (cons er389 - (wrap142 - (car forms406) - w393 - mod395)) - (f405 (cdr forms406))))))) - (f405 e1404)) - ids381 - labels382 - var-ids383 - vars384 - vals385 - bindings386)) - tmp402) + ((lambda (tmp402) + ((lambda (tmp403) + (if tmp403 + (apply (lambda (_404 + e1405) + (parse380 + (letrec ((f406 (lambda (forms407) + (if (null? forms407) + (cdr body381) + (cons (cons er390 + (wrap143 + (car forms407) + w394 + mod396)) + (f406 (cdr forms407))))))) + (f406 e1405)) + ids382 + labels383 + var-ids384 + vars385 + vals386 + bindings387)) + tmp403) (syntax-violation #f "source expression failed to match any pattern" - tmp401))) + tmp402))) ($sc-dispatch - tmp401 + tmp402 '(any . each-any)))) - e392) - (if (memv type390 + e393) + (if (memv type391 '(local-syntax-form)) - (chi-local-syntax156 - value391 - e392 - er389 - w393 - s394 - mod395 - (lambda (forms408 - er409 - w410 - s411 - mod412) - (parse379 - (letrec ((f413 (lambda (forms414) - (if (null? forms414) - (cdr body380) - (cons (cons er409 - (wrap142 - (car forms414) - w410 - mod412)) - (f413 (cdr forms414))))))) - (f413 forms408)) - ids381 - labels382 - var-ids383 - vars384 - vals385 - bindings386))) - (if (null? ids381) - (build-sequence93 + (chi-local-syntax157 + value392 + e393 + er390 + w394 + s395 + mod396 + (lambda (forms409 + er410 + w411 + s412 + mod413) + (parse380 + (letrec ((f414 (lambda (forms415) + (if (null? forms415) + (cdr body381) + (cons (cons er410 + (wrap143 + (car forms415) + w411 + mod413)) + (f414 (cdr forms415))))))) + (f414 forms409)) + ids382 + labels383 + var-ids384 + vars385 + vals386 + bindings387))) + (if (null? ids382) + (build-sequence94 #f - (map (lambda (x415) - (chi150 - (cdr x415) - (car x415) + (map (lambda (x416) + (chi151 + (cdr x416) + (car x416) '(()) - mod395)) - (cons (cons er389 - (source-wrap143 - e392 - w393 - s394 - mod395)) - (cdr body380)))) + mod396)) + (cons (cons er390 + (source-wrap144 + e393 + w394 + s395 + mod396)) + (cdr body381)))) (begin - (if (not (valid-bound-ids?139 - ids381)) + (if (not (valid-bound-ids?140 + ids382)) (syntax-violation #f "invalid or duplicate identifier in definition" - outer-form372)) - (letrec ((loop416 - (lambda (bs417 - er-cache418 - r-cache419) - (if (not (null? bs417)) - (let ((b420 (car bs417))) - (if (eq? (car b420) + outer-form373)) + (letrec ((loop417 + (lambda (bs418 + er-cache419 + r-cache420) + (if (not (null? bs418)) + (let ((b421 (car bs418))) + (if (eq? (car b421) 'macro) - (let ((er421 (cadr b420))) - (let ((r-cache422 - (if (eq? er421 - er-cache418) - r-cache419 - (macros-only-env110 - er421)))) + (let ((er422 (cadr b421))) + (let ((r-cache423 + (if (eq? er422 + er-cache419) + r-cache420 + (macros-only-env111 + er422)))) (begin (set-cdr! - b420 - (eval-local-transformer157 - (chi150 - (cddr b420) - r-cache422 + b421 + (eval-local-transformer158 + (chi151 + (cddr b421) + r-cache423 '(()) - mod395) - mod395)) - (loop416 - (cdr bs417) - er421 - r-cache422)))) - (loop416 - (cdr bs417) - er-cache418 - r-cache419))))))) - (loop416 - bindings386 + mod396) + mod396)) + (loop417 + (cdr bs418) + er422 + r-cache423)))) + (loop417 + (cdr bs418) + er-cache419 + r-cache420))))))) + (loop417 + bindings387 #f #f)) (set-cdr! - r376 - (extend-env108 - labels382 - bindings386 - (cdr r376))) - (build-letrec96 + r377 + (extend-env109 + labels383 + bindings387 + (cdr r377))) + (build-letrec97 #f (map syntax->datum - var-ids383) - vars384 - (map (lambda (x423) - (chi150 - (cdr x423) - (car x423) + var-ids384) + vars385 + (map (lambda (x424) + (chi151 + (cdr x424) + (car x424) '(()) - mod395)) - vals385) - (build-sequence93 + mod396)) + vals386) + (build-sequence94 #f - (map (lambda (x424) - (chi150 - (cdr x424) - (car x424) + (map (lambda (x425) + (chi151 + (cdr x425) + (car x425) '(()) - mod395)) - (cons (cons er389 - (source-wrap143 - e392 - w393 - s394 - mod395)) - (cdr body380)))))))))))))))))) - (parse379 - (map (lambda (x387) - (cons r376 (wrap142 x387 w378 mod375))) - body371) + mod396)) + (cons (cons er390 + (source-wrap144 + e393 + w394 + s395 + mod396)) + (cdr body381)))))))))))))))))) + (parse380 + (map (lambda (x388) + (cons r377 (wrap143 x388 w379 mod376))) + body372) '() '() '() '() '() '()))))))) - (chi-macro153 - (lambda (p425 e426 r427 w428 rib429 mod430) - (letrec ((rebuild-macro-output431 - (lambda (x432 m433) - (if (pair? x432) - (cons (rebuild-macro-output431 (car x432) m433) - (rebuild-macro-output431 (cdr x432) m433)) - (if (syntax-object?98 x432) - (let ((w434 (syntax-object-wrap100 x432))) - (let ((ms435 (wrap-marks117 w434)) - (s436 (wrap-subst118 w434))) - (if (if (pair? ms435) - (eq? (car ms435) #f) + (chi-macro154 + (lambda (p426 e427 r428 w429 rib430 mod431) + (letrec ((rebuild-macro-output432 + (lambda (x433 m434) + (if (pair? x433) + (cons (rebuild-macro-output432 (car x433) m434) + (rebuild-macro-output432 (cdr x433) m434)) + (if (syntax-object?99 x433) + (let ((w435 (syntax-object-wrap101 x433))) + (let ((ms436 (wrap-marks118 w435)) + (s437 (wrap-subst119 w435))) + (if (if (pair? ms436) + (eq? (car ms436) #f) #f) - (make-syntax-object97 - (syntax-object-expression99 x432) - (make-wrap116 - (cdr ms435) - (if rib429 - (cons rib429 (cdr s436)) - (cdr s436))) - (syntax-object-module101 x432)) - (make-syntax-object97 - (syntax-object-expression99 x432) - (make-wrap116 - (cons m433 ms435) - (if rib429 - (cons rib429 - (cons (quote shift) s436)) - (cons (quote shift) s436))) - (let ((pmod437 - (procedure-module p425))) - (if pmod437 + (make-syntax-object98 + (syntax-object-expression100 x433) + (make-wrap117 + (cdr ms436) + (if rib430 + (cons rib430 (cdr s437)) + (cdr s437))) + (syntax-object-module102 x433)) + (make-syntax-object98 + (syntax-object-expression100 x433) + (make-wrap117 + (cons m434 ms436) + (if rib430 + (cons rib430 + (cons (quote shift) s437)) + (cons (quote shift) s437))) + (let ((pmod438 + (procedure-module p426))) + (if pmod438 (cons 'hygiene - (module-name pmod437)) + (module-name pmod438)) '(hygiene guile))))))) - (if (vector? x432) - (let ((n438 (vector-length x432))) - (let ((v439 (make-vector n438))) - (letrec ((loop440 - (lambda (i441) - (if (fx=74 i441 n438) - (begin (if #f #f) v439) + (if (vector? x433) + (let ((n439 (vector-length x433))) + (let ((v440 (make-vector n439))) + (letrec ((loop441 + (lambda (i442) + (if (fx=74 i442 n439) + (begin (if #f #f) v440) (begin (vector-set! - v439 - i441 - (rebuild-macro-output431 + v440 + i442 + (rebuild-macro-output432 (vector-ref - x432 - i441) - m433)) - (loop440 - (fx+72 i441 1))))))) - (loop440 0)))) - (if (symbol? x432) + x433 + i442) + m434)) + (loop441 + (fx+72 i442 1))))))) + (loop441 0)))) + (if (symbol? x433) (syntax-violation #f "encountered raw symbol in macro output" - (source-wrap143 e426 w428 s mod430) - x432) - x432))))))) - (rebuild-macro-output431 - (p425 (wrap142 e426 (anti-mark129 w428) mod430)) + (source-wrap144 e427 w429 s mod431) + x433) + x433))))))) + (rebuild-macro-output432 + (p426 (wrap143 e427 (anti-mark130 w429) mod431)) (string #\m))))) - (chi-application152 - (lambda (x442 e443 r444 w445 s446 mod447) - ((lambda (tmp448) - ((lambda (tmp449) - (if tmp449 - (apply (lambda (e0450 e1451) - (build-application81 - s446 - x442 - (map (lambda (e452) - (chi150 e452 r444 w445 mod447)) - e1451))) - tmp449) + (chi-application153 + (lambda (x443 e444 r445 w446 s447 mod448) + ((lambda (tmp449) + ((lambda (tmp450) + (if tmp450 + (apply (lambda (e0451 e1452) + (build-application82 + s447 + x443 + (map (lambda (e453) + (chi151 e453 r445 w446 mod448)) + e1452))) + tmp450) (syntax-violation #f "source expression failed to match any pattern" - tmp448))) - ($sc-dispatch tmp448 (quote (any . each-any))))) - e443))) - (chi-expr151 - (lambda (type454 value455 e456 r457 w458 s459 mod460) - (if (memv type454 (quote (lexical))) - (build-lexical-reference83 + tmp449))) + ($sc-dispatch tmp449 (quote (any . each-any))))) + e444))) + (chi-expr152 + (lambda (type455 value456 e457 r458 w459 s460 mod461) + (if (memv type455 (quote (lexical))) + (build-lexical-reference84 'value - s459 - e456 - value455) - (if (memv type454 (quote (core core-form))) - (value455 e456 r457 w458 s459 mod460) - (if (memv type454 (quote (module-ref))) + s460 + e457 + value456) + (if (memv type455 (quote (core core-form))) + (value456 e457 r458 w459 s460 mod461) + (if (memv type455 (quote (module-ref))) (call-with-values - (lambda () (value455 e456)) - (lambda (id461 mod462) - (build-global-reference86 s459 id461 mod462))) - (if (memv type454 (quote (lexical-call))) - (chi-application152 - (build-lexical-reference83 + (lambda () (value456 e457)) + (lambda (id462 mod463) + (build-global-reference87 s460 id462 mod463))) + (if (memv type455 (quote (lexical-call))) + (chi-application153 + (build-lexical-reference84 'fun - (source-annotation105 (car e456)) - (car e456) - value455) - e456 - r457 - w458 - s459 - mod460) - (if (memv type454 (quote (global-call))) - (chi-application152 - (build-global-reference86 - (source-annotation105 (car e456)) - (if (syntax-object?98 value455) - (syntax-object-expression99 value455) - value455) - (if (syntax-object?98 value455) - (syntax-object-module101 value455) - mod460)) - e456 - r457 - w458 - s459 - mod460) - (if (memv type454 (quote (constant))) - (build-data92 - s459 - (strip160 - (source-wrap143 e456 w458 s459 mod460) + (source-annotation106 (car e457)) + (car e457) + value456) + e457 + r458 + w459 + s460 + mod461) + (if (memv type455 (quote (global-call))) + (chi-application153 + (build-global-reference87 + (source-annotation106 (car e457)) + (if (syntax-object?99 value456) + (syntax-object-expression100 value456) + value456) + (if (syntax-object?99 value456) + (syntax-object-module102 value456) + mod461)) + e457 + r458 + w459 + s460 + mod461) + (if (memv type455 (quote (constant))) + (build-data93 + s460 + (strip161 + (source-wrap144 e457 w459 s460 mod461) '(()))) - (if (memv type454 (quote (global))) - (build-global-reference86 s459 value455 mod460) - (if (memv type454 (quote (call))) - (chi-application152 - (chi150 (car e456) r457 w458 mod460) - e456 - r457 - w458 - s459 - mod460) - (if (memv type454 (quote (begin-form))) - ((lambda (tmp463) - ((lambda (tmp464) - (if tmp464 - (apply (lambda (_465 e1466 e2467) - (chi-sequence144 - (cons e1466 e2467) - r457 - w458 - s459 - mod460)) - tmp464) + (if (memv type455 (quote (global))) + (build-global-reference87 s460 value456 mod461) + (if (memv type455 (quote (call))) + (chi-application153 + (chi151 (car e457) r458 w459 mod461) + e457 + r458 + w459 + s460 + mod461) + (if (memv type455 (quote (begin-form))) + ((lambda (tmp464) + ((lambda (tmp465) + (if tmp465 + (apply (lambda (_466 e1467 e2468) + (chi-sequence145 + (cons e1467 e2468) + r458 + w459 + s460 + mod461)) + tmp465) (syntax-violation #f "source expression failed to match any pattern" - tmp463))) + tmp464))) ($sc-dispatch - tmp463 + tmp464 '(any any . each-any)))) - e456) - (if (memv type454 (quote (local-syntax-form))) - (chi-local-syntax156 - value455 - e456 - r457 - w458 - s459 - mod460 - chi-sequence144) - (if (memv type454 (quote (eval-when-form))) - ((lambda (tmp469) - ((lambda (tmp470) - (if tmp470 - (apply (lambda (_471 - x472 - e1473 - e2474) - (let ((when-list475 - (chi-when-list147 - e456 - x472 - w458))) + e457) + (if (memv type455 (quote (local-syntax-form))) + (chi-local-syntax157 + value456 + e457 + r458 + w459 + s460 + mod461 + chi-sequence145) + (if (memv type455 (quote (eval-when-form))) + ((lambda (tmp470) + ((lambda (tmp471) + (if tmp471 + (apply (lambda (_472 + x473 + e1474 + e2475) + (let ((when-list476 + (chi-when-list148 + e457 + x473 + w459))) (if (memq 'eval - when-list475) - (chi-sequence144 - (cons e1473 e2474) - r457 - w458 - s459 - mod460) - (chi-void158)))) - tmp470) + when-list476) + (chi-sequence145 + (cons e1474 e2475) + r458 + w459 + s460 + mod461) + (chi-void159)))) + tmp471) (syntax-violation #f "source expression failed to match any pattern" - tmp469))) + tmp470))) ($sc-dispatch - tmp469 + tmp470 '(any each-any any . each-any)))) - e456) - (if (memv type454 + e457) + (if (memv type455 '(define-form define-syntax-form)) (syntax-violation #f "definition in expression context" - e456 - (wrap142 value455 w458 mod460)) - (if (memv type454 (quote (syntax))) + e457 + (wrap143 value456 w459 mod461)) + (if (memv type455 (quote (syntax))) (syntax-violation #f "reference to pattern variable outside syntax form" - (source-wrap143 - e456 - w458 - s459 - mod460)) - (if (memv type454 + (source-wrap144 + e457 + w459 + s460 + mod461)) + (if (memv type455 '(displaced-lexical)) (syntax-violation #f "reference to identifier outside its scope" - (source-wrap143 - e456 - w458 - s459 - mod460)) + (source-wrap144 + e457 + w459 + s460 + mod461)) (syntax-violation #f "unexpected syntax" - (source-wrap143 - e456 - w458 - s459 - mod460)))))))))))))))))) - (chi150 - (lambda (e478 r479 w480 mod481) + (source-wrap144 + e457 + w459 + s460 + mod461)))))))))))))))))) + (chi151 + (lambda (e479 r480 w481 mod482) (call-with-values (lambda () - (syntax-type148 - e478 - r479 - w480 - (source-annotation105 e478) + (syntax-type149 + e479 + r480 + w481 + (source-annotation106 e479) #f - mod481 + mod482 #f)) - (lambda (type482 value483 e484 w485 s486 mod487) - (chi-expr151 - type482 - value483 - e484 - r479 - w485 - s486 - mod487))))) - (chi-top149 - (lambda (e488 r489 w490 m491 esew492 mod493) + (lambda (type483 value484 e485 w486 s487 mod488) + (chi-expr152 + type483 + value484 + e485 + r480 + w486 + s487 + mod488))))) + (chi-top150 + (lambda (e489 r490 w491 m492 esew493 mod494) (call-with-values (lambda () - (syntax-type148 - e488 - r489 - w490 - (source-annotation105 e488) + (syntax-type149 + e489 + r490 + w491 + (source-annotation106 e489) #f - mod493 + mod494 #f)) - (lambda (type501 value502 e503 w504 s505 mod506) - (if (memv type501 (quote (begin-form))) - ((lambda (tmp507) - ((lambda (tmp508) - (if tmp508 - (apply (lambda (_509) (chi-void158)) tmp508) - ((lambda (tmp510) - (if tmp510 - (apply (lambda (_511 e1512 e2513) - (chi-top-sequence145 - (cons e1512 e2513) - r489 - w504 - s505 - m491 - esew492 - mod506)) - tmp510) + (lambda (type502 value503 e504 w505 s506 mod507) + (if (memv type502 (quote (begin-form))) + ((lambda (tmp508) + ((lambda (tmp509) + (if tmp509 + (apply (lambda (_510) (chi-void159)) tmp509) + ((lambda (tmp511) + (if tmp511 + (apply (lambda (_512 e1513 e2514) + (chi-top-sequence146 + (cons e1513 e2514) + r490 + w505 + s506 + m492 + esew493 + mod507)) + tmp511) (syntax-violation #f "source expression failed to match any pattern" - tmp507))) + tmp508))) ($sc-dispatch - tmp507 + tmp508 '(any any . each-any))))) - ($sc-dispatch tmp507 (quote (any))))) - e503) - (if (memv type501 (quote (local-syntax-form))) - (chi-local-syntax156 - value502 - e503 - r489 - w504 - s505 - mod506 - (lambda (body515 r516 w517 s518 mod519) - (chi-top-sequence145 - body515 - r516 - w517 - s518 - m491 - esew492 - mod519))) - (if (memv type501 (quote (eval-when-form))) - ((lambda (tmp520) - ((lambda (tmp521) - (if tmp521 - (apply (lambda (_522 x523 e1524 e2525) - (let ((when-list526 - (chi-when-list147 - e503 - x523 - w504)) - (body527 (cons e1524 e2525))) - (if (eq? m491 (quote e)) + ($sc-dispatch tmp508 (quote (any))))) + e504) + (if (memv type502 (quote (local-syntax-form))) + (chi-local-syntax157 + value503 + e504 + r490 + w505 + s506 + mod507 + (lambda (body516 r517 w518 s519 mod520) + (chi-top-sequence146 + body516 + r517 + w518 + s519 + m492 + esew493 + mod520))) + (if (memv type502 (quote (eval-when-form))) + ((lambda (tmp521) + ((lambda (tmp522) + (if tmp522 + (apply (lambda (_523 x524 e1525 e2526) + (let ((when-list527 + (chi-when-list148 + e504 + x524 + w505)) + (body528 (cons e1525 e2526))) + (if (eq? m492 (quote e)) (if (memq 'eval - when-list526) - (chi-top-sequence145 - body527 - r489 - w504 - s505 + when-list527) + (chi-top-sequence146 + body528 + r490 + w505 + s506 'e '(eval) - mod506) - (chi-void158)) + mod507) + (chi-void159)) (if (memq 'load - when-list526) - (if (let ((t530 (memq 'compile - when-list526))) - (if t530 - t530 - (if (eq? m491 - 'c&e) - (memq 'eval - when-list526) - #f))) - (chi-top-sequence145 - body527 - r489 - w504 - s505 - 'c&e - '(compile load) - mod506) - (if (memq m491 - '(c c&e)) - (chi-top-sequence145 - body527 - r489 - w504 - s505 - 'c - '(load) - mod506) - (chi-void158))) + when-list527) (if (let ((t531 (memq 'compile - when-list526))) + when-list527))) (if t531 t531 - (if (eq? m491 + (if (eq? m492 'c&e) (memq 'eval - when-list526) + when-list527) + #f))) + (chi-top-sequence146 + body528 + r490 + w505 + s506 + 'c&e + '(compile load) + mod507) + (if (memq m492 + '(c c&e)) + (chi-top-sequence146 + body528 + r490 + w505 + s506 + 'c + '(load) + mod507) + (chi-void159))) + (if (let ((t532 (memq 'compile + when-list527))) + (if t532 + t532 + (if (eq? m492 + 'c&e) + (memq 'eval + when-list527) #f))) (begin (top-level-eval-hook76 - (chi-top-sequence145 - body527 - r489 - w504 - s505 + (chi-top-sequence146 + body528 + r490 + w505 + s506 'e '(eval) - mod506) - mod506) - (chi-void158)) - (chi-void158)))))) - tmp521) + mod507) + mod507) + (chi-void159)) + (chi-void159)))))) + tmp522) (syntax-violation #f "source expression failed to match any pattern" - tmp520))) + tmp521))) ($sc-dispatch - tmp520 + tmp521 '(any each-any any . each-any)))) - e503) - (if (memv type501 (quote (define-syntax-form))) - (let ((n532 (id-var-name136 value502 w504)) - (r533 (macros-only-env110 r489))) - (if (memv m491 (quote (c))) - (if (memq (quote compile) esew492) - (let ((e534 (chi-install-global146 - n532 - (chi150 - e503 - r533 - w504 - mod506)))) + e504) + (if (memv type502 (quote (define-syntax-form))) + (let ((n533 (id-var-name137 value503 w505)) + (r534 (macros-only-env111 r490))) + (if (memv m492 (quote (c))) + (if (memq (quote compile) esew493) + (let ((e535 (chi-install-global147 + n533 + (chi151 + e504 + r534 + w505 + mod507)))) (begin - (top-level-eval-hook76 e534 mod506) - (if (memq (quote load) esew492) - e534 - (chi-void158)))) - (if (memq (quote load) esew492) - (chi-install-global146 - n532 - (chi150 e503 r533 w504 mod506)) - (chi-void158))) - (if (memv m491 (quote (c&e))) - (let ((e535 (chi-install-global146 - n532 - (chi150 - e503 - r533 - w504 - mod506)))) + (top-level-eval-hook76 e535 mod507) + (if (memq (quote load) esew493) + e535 + (chi-void159)))) + (if (memq (quote load) esew493) + (chi-install-global147 + n533 + (chi151 e504 r534 w505 mod507)) + (chi-void159))) + (if (memv m492 (quote (c&e))) + (let ((e536 (chi-install-global147 + n533 + (chi151 + e504 + r534 + w505 + mod507)))) (begin - (top-level-eval-hook76 e535 mod506) - e535)) + (top-level-eval-hook76 e536 mod507) + e536)) (begin - (if (memq (quote eval) esew492) + (if (memq (quote eval) esew493) (top-level-eval-hook76 - (chi-install-global146 - n532 - (chi150 e503 r533 w504 mod506)) - mod506)) - (chi-void158))))) - (if (memv type501 (quote (define-form))) - (let ((n536 (id-var-name136 value502 w504))) - (let ((type537 - (binding-type106 - (lookup111 n536 r489 mod506)))) - (if (memv type537 + (chi-install-global147 + n533 + (chi151 e504 r534 w505 mod507)) + mod507)) + (chi-void159))))) + (if (memv type502 (quote (define-form))) + (let ((n537 (id-var-name137 value503 w505))) + (let ((type538 + (binding-type107 + (lookup112 n537 r490 mod507)))) + (if (memv type538 '(global core macro module-ref)) (begin (if (if (not (module-local-variable (current-module) - n536)) + n537)) (current-module) #f) (module-define! (current-module) - n536 + n537 #f)) - (let ((x538 (build-global-definition89 - s505 - n536 - (chi150 - e503 - r489 - w504 - mod506)))) + (let ((x539 (build-global-definition90 + s506 + n537 + (chi151 + e504 + r490 + w505 + mod507)))) (begin - (if (eq? m491 (quote c&e)) - (top-level-eval-hook76 x538 mod506)) - x538))) - (if (memv type537 + (if (eq? m492 (quote c&e)) + (top-level-eval-hook76 x539 mod507)) + x539))) + (if (memv type538 '(displaced-lexical)) (syntax-violation #f "identifier out of context" - e503 - (wrap142 value502 w504 mod506)) + e504 + (wrap143 value503 w505 mod507)) (syntax-violation #f "cannot define keyword at top level" - e503 - (wrap142 value502 w504 mod506)))))) - (let ((x539 (chi-expr151 - type501 - value502 - e503 - r489 - w504 - s505 - mod506))) + e504 + (wrap143 value503 w505 mod507)))))) + (let ((x540 (chi-expr152 + type502 + value503 + e504 + r490 + w505 + s506 + mod507))) (begin - (if (eq? m491 (quote c&e)) - (top-level-eval-hook76 x539 mod506)) - x539))))))))))) - (syntax-type148 - (lambda (e540 r541 w542 s543 rib544 mod545 for-car?546) - (if (symbol? e540) - (let ((n547 (id-var-name136 e540 w542))) - (let ((b548 (lookup111 n547 r541 mod545))) - (let ((type549 (binding-type106 b548))) - (if (memv type549 (quote (lexical))) + (if (eq? m492 (quote c&e)) + (top-level-eval-hook76 x540 mod507)) + x540))))))))))) + (syntax-type149 + (lambda (e541 r542 w543 s544 rib545 mod546 for-car?547) + (if (symbol? e541) + (let ((n548 (id-var-name137 e541 w543))) + (let ((b549 (lookup112 n548 r542 mod546))) + (let ((type550 (binding-type107 b549))) + (if (memv type550 (quote (lexical))) (values - type549 - (binding-value107 b548) - e540 - w542 - s543 - mod545) - (if (memv type549 (quote (global))) - (values type549 n547 e540 w542 s543 mod545) - (if (memv type549 (quote (macro))) - (if for-car?546 + type550 + (binding-value108 b549) + e541 + w543 + s544 + mod546) + (if (memv type550 (quote (global))) + (values type550 n548 e541 w543 s544 mod546) + (if (memv type550 (quote (macro))) + (if for-car?547 (values - type549 - (binding-value107 b548) - e540 - w542 - s543 - mod545) - (syntax-type148 - (chi-macro153 - (binding-value107 b548) - e540 - r541 - w542 - rib544 - mod545) - r541 + type550 + (binding-value108 b549) + e541 + w543 + s544 + mod546) + (syntax-type149 + (chi-macro154 + (binding-value108 b549) + e541 + r542 + w543 + rib545 + mod546) + r542 '(()) - s543 - rib544 - mod545 + s544 + rib545 + mod546 #f)) (values - type549 - (binding-value107 b548) - e540 - w542 - s543 - mod545))))))) - (if (pair? e540) - (let ((first550 (car e540))) + type550 + (binding-value108 b549) + e541 + w543 + s544 + mod546))))))) + (if (pair? e541) + (let ((first551 (car e541))) (call-with-values (lambda () - (syntax-type148 - first550 - r541 - w542 - s543 - rib544 - mod545 + (syntax-type149 + first551 + r542 + w543 + s544 + rib545 + mod546 #t)) - (lambda (ftype551 fval552 fe553 fw554 fs555 fmod556) - (if (memv ftype551 (quote (lexical))) + (lambda (ftype552 fval553 fe554 fw555 fs556 fmod557) + (if (memv ftype552 (quote (lexical))) (values 'lexical-call - fval552 - e540 - w542 - s543 - mod545) - (if (memv ftype551 (quote (global))) + fval553 + e541 + w543 + s544 + mod546) + (if (memv ftype552 (quote (global))) (values 'global-call - (make-syntax-object97 fval552 w542 fmod556) - e540 - w542 - s543 - mod545) - (if (memv ftype551 (quote (macro))) - (syntax-type148 - (chi-macro153 - fval552 - e540 - r541 - w542 - rib544 - mod545) - r541 + (make-syntax-object98 fval553 w543 fmod557) + e541 + w543 + s544 + mod546) + (if (memv ftype552 (quote (macro))) + (syntax-type149 + (chi-macro154 + fval553 + e541 + r542 + w543 + rib545 + mod546) + r542 '(()) - s543 - rib544 - mod545 - for-car?546) - (if (memv ftype551 (quote (module-ref))) + s544 + rib545 + mod546 + for-car?547) + (if (memv ftype552 (quote (module-ref))) (call-with-values - (lambda () (fval552 e540)) - (lambda (sym557 mod558) - (syntax-type148 - sym557 - r541 - w542 - s543 - rib544 - mod558 - for-car?546))) - (if (memv ftype551 (quote (core))) + (lambda () (fval553 e541)) + (lambda (sym558 mod559) + (syntax-type149 + sym558 + r542 + w543 + s544 + rib545 + mod559 + for-car?547))) + (if (memv ftype552 (quote (core))) (values 'core-form - fval552 - e540 - w542 - s543 - mod545) - (if (memv ftype551 (quote (local-syntax))) + fval553 + e541 + w543 + s544 + mod546) + (if (memv ftype552 (quote (local-syntax))) (values 'local-syntax-form - fval552 - e540 - w542 - s543 - mod545) - (if (memv ftype551 (quote (begin))) + fval553 + e541 + w543 + s544 + mod546) + (if (memv ftype552 (quote (begin))) (values 'begin-form #f - e540 - w542 - s543 - mod545) - (if (memv ftype551 (quote (eval-when))) + e541 + w543 + s544 + mod546) + (if (memv ftype552 (quote (eval-when))) (values 'eval-when-form #f - e540 - w542 - s543 - mod545) - (if (memv ftype551 (quote (define))) - ((lambda (tmp559) - ((lambda (tmp560) - (if (if tmp560 - (apply (lambda (_561 - name562 - val563) - (id?114 - name562)) - tmp560) + e541 + w543 + s544 + mod546) + (if (memv ftype552 (quote (define))) + ((lambda (tmp560) + ((lambda (tmp561) + (if (if tmp561 + (apply (lambda (_562 + name563 + val564) + (id?115 + name563)) + tmp561) #f) - (apply (lambda (_564 - name565 - val566) + (apply (lambda (_565 + name566 + val567) (values 'define-form - name565 - val566 - w542 - s543 - mod545)) - tmp560) - ((lambda (tmp567) - (if (if tmp567 - (apply (lambda (_568 - name569 - args570 - e1571 - e2572) - (if (id?114 - name569) - (valid-bound-ids?139 - (lambda-var-list162 - args570)) + name566 + val567 + w543 + s544 + mod546)) + tmp561) + ((lambda (tmp568) + (if (if tmp568 + (apply (lambda (_569 + name570 + args571 + e1572 + e2573) + (if (id?115 + name570) + (valid-bound-ids?140 + (lambda-var-list163 + args571)) #f)) - tmp567) + tmp568) #f) - (apply (lambda (_573 - name574 - args575 - e1576 - e2577) + (apply (lambda (_574 + name575 + args576 + e1577 + e2578) (values 'define-form - (wrap142 - name574 - w542 - mod545) - (cons '#(syntax-object - lambda - ((top) - #(ribcage - #(_ - name - args - e1 - e2) - #((top) - (top) - (top) - (top) - (top)) - #("i" - "i" - "i" - "i" - "i")) - #(ribcage - () - () - ()) - #(ribcage - () - () - ()) - #(ribcage - #(ftype - fval - fe - fw - fs - fmod) - #((top) - (top) - (top) - (top) - (top) - (top)) - #("i" - "i" - "i" - "i" - "i" - "i")) - #(ribcage - () - () - ()) - #(ribcage - #(first) - #((top)) - #("i")) - #(ribcage - () - () - ()) - #(ribcage - () - () - ()) - #(ribcage - () - () - ()) - #(ribcage - #(e - r - w - s - rib - mod - for-car?) - #((top) - (top) - (top) - (top) - (top) - (top) - (top)) - #("i" - "i" - "i" - "i" - "i" - "i" - "i")) - #(ribcage - (lambda-var-list - gen-var - strip - ellipsis? - chi-void - eval-local-transformer - chi-local-syntax - chi-lambda-clause - chi-body - chi-macro - chi-application - chi-expr - chi - chi-top - syntax-type - chi-when-list - chi-install-global - chi-top-sequence - chi-sequence - source-wrap - wrap - bound-id-member? - distinct-bound-ids? - valid-bound-ids? - bound-id=? - free-id=? - id-var-name - same-marks? - join-marks - join-wraps - smart-append - make-binding-wrap - extend-ribcage! - make-empty-ribcage - new-mark - anti-mark - the-anti-mark - top-marked? - top-wrap - empty-wrap - set-ribcage-labels! - set-ribcage-marks! - set-ribcage-symnames! - ribcage-labels - ribcage-marks - ribcage-symnames - ribcage? - make-ribcage - gen-labels - gen-label - make-rename - rename-marks - rename-new - rename-old - subst-rename? - wrap-subst - wrap-marks - make-wrap - id-sym-name&marks - id-sym-name - id? - nonsymbol-id? - global-extend - lookup - macros-only-env - extend-var-env - extend-env - null-env - binding-value - binding-type - make-binding - arg-check - source-annotation - no-source - set-syntax-object-module! - set-syntax-object-wrap! - set-syntax-object-expression! - syntax-object-module - syntax-object-wrap - syntax-object-expression - syntax-object? - make-syntax-object - build-lexical-var - build-letrec - build-named-let - build-let - build-sequence - build-data - build-primref - build-lambda - build-global-definition - maybe-name-value! - build-global-assignment - build-global-reference - analyze-variable - build-lexical-assignment - build-lexical-reference - build-conditional - build-application - build-void - get-global-definition-hook - put-global-definition-hook - gensym-hook - local-eval-hook - top-level-eval-hook - fx< - fx= - fx- - fx+ - *mode* - noexpand) - ((top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top) - (top)) - ("i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i" - "i")) - #(ribcage - (define-structure - and-map*) - ((top) - (top)) - ("i" - "i"))) - (hygiene - guile)) - (wrap142 - (cons args575 - (cons e1576 - e2577)) - w542 - mod545)) + (wrap143 + name575 + w543 + mod546) + (decorate-source80 + (cons '#(syntax-object + lambda + ((top) + #(ribcage + #(_ + name + args + e1 + e2) + #((top) + (top) + (top) + (top) + (top)) + #("i" + "i" + "i" + "i" + "i")) + #(ribcage + () + () + ()) + #(ribcage + () + () + ()) + #(ribcage + #(ftype + fval + fe + fw + fs + fmod) + #((top) + (top) + (top) + (top) + (top) + (top)) + #("i" + "i" + "i" + "i" + "i" + "i")) + #(ribcage + () + () + ()) + #(ribcage + #(first) + #((top)) + #("i")) + #(ribcage + () + () + ()) + #(ribcage + () + () + ()) + #(ribcage + () + () + ()) + #(ribcage + #(e + r + w + s + rib + mod + for-car?) + #((top) + (top) + (top) + (top) + (top) + (top) + (top)) + #("i" + "i" + "i" + "i" + "i" + "i" + "i")) + #(ribcage + (lambda-var-list + gen-var + strip + ellipsis? + chi-void + eval-local-transformer + chi-local-syntax + chi-lambda-clause + chi-body + chi-macro + chi-application + chi-expr + chi + chi-top + syntax-type + chi-when-list + chi-install-global + chi-top-sequence + chi-sequence + source-wrap + wrap + bound-id-member? + distinct-bound-ids? + valid-bound-ids? + bound-id=? + free-id=? + id-var-name + same-marks? + join-marks + join-wraps + smart-append + make-binding-wrap + extend-ribcage! + make-empty-ribcage + new-mark + anti-mark + the-anti-mark + top-marked? + top-wrap + empty-wrap + set-ribcage-labels! + set-ribcage-marks! + set-ribcage-symnames! + ribcage-labels + ribcage-marks + ribcage-symnames + ribcage? + make-ribcage + gen-labels + gen-label + make-rename + rename-marks + rename-new + rename-old + subst-rename? + wrap-subst + wrap-marks + make-wrap + id-sym-name&marks + id-sym-name + id? + nonsymbol-id? + global-extend + lookup + macros-only-env + extend-var-env + extend-env + null-env + binding-value + binding-type + make-binding + arg-check + source-annotation + no-source + set-syntax-object-module! + set-syntax-object-wrap! + set-syntax-object-expression! + syntax-object-module + syntax-object-wrap + syntax-object-expression + syntax-object? + make-syntax-object + build-lexical-var + build-letrec + build-named-let + build-let + build-sequence + build-data + build-primref + build-lambda + build-global-definition + maybe-name-value! + build-global-assignment + build-global-reference + analyze-variable + build-lexical-assignment + build-lexical-reference + build-conditional + build-application + build-void + decorate-source + get-global-definition-hook + put-global-definition-hook + gensym-hook + local-eval-hook + top-level-eval-hook + fx< + fx= + fx- + fx+ + *mode* + noexpand) + ((top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top) + (top)) + ("i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i" + "i")) + #(ribcage + (define-structure + and-map*) + ((top) + (top)) + ("i" + "i"))) + (hygiene + guile)) + (wrap143 + (cons args576 + (cons e1577 + e2578)) + w543 + mod546)) + s544) '(()) - s543 - mod545)) - tmp567) - ((lambda (tmp579) - (if (if tmp579 - (apply (lambda (_580 - name581) - (id?114 - name581)) - tmp579) + s544 + mod546)) + tmp568) + ((lambda (tmp580) + (if (if tmp580 + (apply (lambda (_581 + name582) + (id?115 + name582)) + tmp580) #f) - (apply (lambda (_582 - name583) + (apply (lambda (_583 + name584) (values 'define-form - (wrap142 - name583 - w542 - mod545) + (wrap143 + name584 + w543 + mod546) '(#(syntax-object if ((top) @@ -2190,6 +2198,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -2311,6 +2320,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -2422,6 +2432,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -2612,6 +2623,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -2733,6 +2745,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -2844,6 +2857,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -3034,6 +3048,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -3155,6 +3170,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -3266,6 +3282,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -3277,92 +3294,92 @@ (hygiene guile))) '(()) - s543 - mod545)) - tmp579) + s544 + mod546)) + tmp580) (syntax-violation #f "source expression failed to match any pattern" - tmp559))) + tmp560))) ($sc-dispatch - tmp559 + tmp560 '(any any))))) ($sc-dispatch - tmp559 + tmp560 '(any (any . any) any . each-any))))) ($sc-dispatch - tmp559 + tmp560 '(any any any)))) - e540) - (if (memv ftype551 + e541) + (if (memv ftype552 '(define-syntax)) - ((lambda (tmp584) - ((lambda (tmp585) - (if (if tmp585 - (apply (lambda (_586 - name587 - val588) - (id?114 - name587)) - tmp585) + ((lambda (tmp585) + ((lambda (tmp586) + (if (if tmp586 + (apply (lambda (_587 + name588 + val589) + (id?115 + name588)) + tmp586) #f) - (apply (lambda (_589 - name590 - val591) + (apply (lambda (_590 + name591 + val592) (values 'define-syntax-form - name590 - val591 - w542 - s543 - mod545)) - tmp585) + name591 + val592 + w543 + s544 + mod546)) + tmp586) (syntax-violation #f "source expression failed to match any pattern" - tmp584))) + tmp585))) ($sc-dispatch - tmp584 + tmp585 '(any any any)))) - e540) + e541) (values 'call #f - e540 - w542 - s543 - mod545)))))))))))))) - (if (syntax-object?98 e540) - (syntax-type148 - (syntax-object-expression99 e540) - r541 - (join-wraps133 w542 (syntax-object-wrap100 e540)) - s543 - rib544 - (let ((t592 (syntax-object-module101 e540))) - (if t592 t592 mod545)) - for-car?546) - (if (self-evaluating? e540) + e541 + w543 + s544 + mod546)))))))))))))) + (if (syntax-object?99 e541) + (syntax-type149 + (syntax-object-expression100 e541) + r542 + (join-wraps134 w543 (syntax-object-wrap101 e541)) + s544 + rib545 + (let ((t593 (syntax-object-module102 e541))) + (if t593 t593 mod546)) + for-car?547) + (if (self-evaluating? e541) (values 'constant #f - e540 - w542 - s543 - mod545) - (values (quote other) #f e540 w542 s543 mod545))))))) - (chi-when-list147 - (lambda (e593 when-list594 w595) - (letrec ((f596 (lambda (when-list597 situations598) - (if (null? when-list597) - situations598 - (f596 (cdr when-list597) - (cons (let ((x599 (car when-list597))) - (if (free-id=?137 - x599 + e541 + w543 + s544 + mod546) + (values (quote other) #f e541 w543 s544 mod546))))))) + (chi-when-list148 + (lambda (e594 when-list595 w596) + (letrec ((f597 (lambda (when-list598 situations599) + (if (null? when-list598) + situations599 + (f597 (cdr when-list598) + (cons (let ((x600 (car when-list598))) + (if (free-id=?138 + x600 '#(syntax-object compile ((top) @@ -3490,6 +3507,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -3611,6 +3629,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -3722,6 +3741,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -3730,8 +3750,8 @@ ("i" "i"))) (hygiene guile))) 'compile - (if (free-id=?137 - x599 + (if (free-id=?138 + x600 '#(syntax-object load ((top) @@ -3859,6 +3879,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -3980,6 +4001,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -4091,6 +4113,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -4099,8 +4122,8 @@ ("i" "i"))) (hygiene guile))) 'load - (if (free-id=?137 - x599 + (if (free-id=?138 + x600 '#(syntax-object eval ((top) @@ -4245,6 +4268,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -4366,6 +4390,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -4477,6 +4502,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -4488,857 +4514,883 @@ (syntax-violation 'eval-when "invalid situation" - e593 - (wrap142 - x599 - w595 + e594 + (wrap143 + x600 + w596 #f)))))) - situations598)))))) - (f596 when-list594 (quote ()))))) - (chi-install-global146 - (lambda (name600 e601) - (build-global-definition89 + situations599)))))) + (f597 when-list595 (quote ()))))) + (chi-install-global147 + (lambda (name601 e602) + (build-global-definition90 #f - name600 - (if (let ((v602 (module-variable (current-module) name600))) - (if v602 - (if (variable-bound? v602) - (if (macro? (variable-ref v602)) - (not (eq? (macro-type (variable-ref v602)) + name601 + (if (let ((v603 (module-variable (current-module) name601))) + (if v603 + (if (variable-bound? v603) + (if (macro? (variable-ref v603)) + (not (eq? (macro-type (variable-ref v603)) 'syncase-macro)) #f) #f) #f)) - (build-application81 + (build-application82 #f - (build-primref91 + (build-primref92 #f 'make-extended-syncase-macro) - (list (build-application81 + (list (build-application82 #f - (build-primref91 #f (quote module-ref)) - (list (build-application81 + (build-primref92 #f (quote module-ref)) + (list (build-application82 #f - (build-primref91 + (build-primref92 #f 'current-module) '()) - (build-data92 #f name600))) - (build-data92 #f (quote macro)) - e601)) - (build-application81 + (build-data93 #f name601))) + (build-data93 #f (quote macro)) + e602)) + (build-application82 #f - (build-primref91 #f (quote make-syncase-macro)) - (list (build-data92 #f (quote macro)) e601)))))) - (chi-top-sequence145 - (lambda (body603 r604 w605 s606 m607 esew608 mod609) - (build-sequence93 - s606 - (letrec ((dobody610 - (lambda (body611 r612 w613 m614 esew615 mod616) - (if (null? body611) + (build-primref92 #f (quote make-syncase-macro)) + (list (build-data93 #f (quote macro)) e602)))))) + (chi-top-sequence146 + (lambda (body604 r605 w606 s607 m608 esew609 mod610) + (build-sequence94 + s607 + (letrec ((dobody611 + (lambda (body612 r613 w614 m615 esew616 mod617) + (if (null? body612) '() - (let ((first617 - (chi-top149 - (car body611) - r612 - w613 - m614 - esew615 - mod616))) - (cons first617 - (dobody610 - (cdr body611) - r612 - w613 - m614 - esew615 - mod616))))))) - (dobody610 body603 r604 w605 m607 esew608 mod609))))) - (chi-sequence144 - (lambda (body618 r619 w620 s621 mod622) - (build-sequence93 - s621 - (letrec ((dobody623 - (lambda (body624 r625 w626 mod627) - (if (null? body624) + (let ((first618 + (chi-top150 + (car body612) + r613 + w614 + m615 + esew616 + mod617))) + (cons first618 + (dobody611 + (cdr body612) + r613 + w614 + m615 + esew616 + mod617))))))) + (dobody611 body604 r605 w606 m608 esew609 mod610))))) + (chi-sequence145 + (lambda (body619 r620 w621 s622 mod623) + (build-sequence94 + s622 + (letrec ((dobody624 + (lambda (body625 r626 w627 mod628) + (if (null? body625) '() - (let ((first628 - (chi150 - (car body624) - r625 - w626 - mod627))) - (cons first628 - (dobody623 - (cdr body624) - r625 - w626 - mod627))))))) - (dobody623 body618 r619 w620 mod622))))) - (source-wrap143 - (lambda (x629 w630 s631 defmod632) - (begin - (if (if s631 (pair? x629) #f) - (set-source-properties! x629 s631)) - (wrap142 x629 w630 defmod632)))) - (wrap142 - (lambda (x633 w634 defmod635) - (if (if (null? (wrap-marks117 w634)) - (null? (wrap-subst118 w634)) + (let ((first629 + (chi151 + (car body625) + r626 + w627 + mod628))) + (cons first629 + (dobody624 + (cdr body625) + r626 + w627 + mod628))))))) + (dobody624 body619 r620 w621 mod623))))) + (source-wrap144 + (lambda (x630 w631 s632 defmod633) + (wrap143 + (decorate-source80 x630 s632) + w631 + defmod633))) + (wrap143 + (lambda (x634 w635 defmod636) + (if (if (null? (wrap-marks118 w635)) + (null? (wrap-subst119 w635)) #f) - x633 - (if (syntax-object?98 x633) - (make-syntax-object97 - (syntax-object-expression99 x633) - (join-wraps133 w634 (syntax-object-wrap100 x633)) - (syntax-object-module101 x633)) - (if (null? x633) - x633 - (make-syntax-object97 x633 w634 defmod635)))))) - (bound-id-member?141 - (lambda (x636 list637) - (if (not (null? list637)) - (let ((t638 (bound-id=?138 x636 (car list637)))) - (if t638 - t638 - (bound-id-member?141 x636 (cdr list637)))) + x634 + (if (syntax-object?99 x634) + (make-syntax-object98 + (syntax-object-expression100 x634) + (join-wraps134 w635 (syntax-object-wrap101 x634)) + (syntax-object-module102 x634)) + (if (null? x634) + x634 + (make-syntax-object98 x634 w635 defmod636)))))) + (bound-id-member?142 + (lambda (x637 list638) + (if (not (null? list638)) + (let ((t639 (bound-id=?139 x637 (car list638)))) + (if t639 + t639 + (bound-id-member?142 x637 (cdr list638)))) #f))) - (distinct-bound-ids?140 - (lambda (ids639) - (letrec ((distinct?640 - (lambda (ids641) - (let ((t642 (null? ids641))) - (if t642 - t642 - (if (not (bound-id-member?141 - (car ids641) - (cdr ids641))) - (distinct?640 (cdr ids641)) + (distinct-bound-ids?141 + (lambda (ids640) + (letrec ((distinct?641 + (lambda (ids642) + (let ((t643 (null? ids642))) + (if t643 + t643 + (if (not (bound-id-member?142 + (car ids642) + (cdr ids642))) + (distinct?641 (cdr ids642)) #f)))))) - (distinct?640 ids639)))) - (valid-bound-ids?139 - (lambda (ids643) - (if (letrec ((all-ids?644 - (lambda (ids645) - (let ((t646 (null? ids645))) - (if t646 - t646 - (if (id?114 (car ids645)) - (all-ids?644 (cdr ids645)) + (distinct?641 ids640)))) + (valid-bound-ids?140 + (lambda (ids644) + (if (letrec ((all-ids?645 + (lambda (ids646) + (let ((t647 (null? ids646))) + (if t647 + t647 + (if (id?115 (car ids646)) + (all-ids?645 (cdr ids646)) #f)))))) - (all-ids?644 ids643)) - (distinct-bound-ids?140 ids643) + (all-ids?645 ids644)) + (distinct-bound-ids?141 ids644) #f))) - (bound-id=?138 - (lambda (i647 j648) - (if (if (syntax-object?98 i647) - (syntax-object?98 j648) + (bound-id=?139 + (lambda (i648 j649) + (if (if (syntax-object?99 i648) + (syntax-object?99 j649) #f) - (if (eq? (syntax-object-expression99 i647) - (syntax-object-expression99 j648)) - (same-marks?135 - (wrap-marks117 (syntax-object-wrap100 i647)) - (wrap-marks117 (syntax-object-wrap100 j648))) + (if (eq? (syntax-object-expression100 i648) + (syntax-object-expression100 j649)) + (same-marks?136 + (wrap-marks118 (syntax-object-wrap101 i648)) + (wrap-marks118 (syntax-object-wrap101 j649))) #f) - (eq? i647 j648)))) - (free-id=?137 - (lambda (i649 j650) - (if (eq? (let ((x651 i649)) - (if (syntax-object?98 x651) - (syntax-object-expression99 x651) - x651)) - (let ((x652 j650)) - (if (syntax-object?98 x652) - (syntax-object-expression99 x652) - x652))) - (eq? (id-var-name136 i649 (quote (()))) - (id-var-name136 j650 (quote (())))) + (eq? i648 j649)))) + (free-id=?138 + (lambda (i650 j651) + (if (eq? (let ((x652 i650)) + (if (syntax-object?99 x652) + (syntax-object-expression100 x652) + x652)) + (let ((x653 j651)) + (if (syntax-object?99 x653) + (syntax-object-expression100 x653) + x653))) + (eq? (id-var-name137 i650 (quote (()))) + (id-var-name137 j651 (quote (())))) #f))) - (id-var-name136 - (lambda (id653 w654) - (letrec ((search-vector-rib657 - (lambda (sym663 - subst664 - marks665 - symnames666 - ribcage667) - (let ((n668 (vector-length symnames666))) - (letrec ((f669 (lambda (i670) - (if (fx=74 i670 n668) - (search655 - sym663 - (cdr subst664) - marks665) + (id-var-name137 + (lambda (id654 w655) + (letrec ((search-vector-rib658 + (lambda (sym664 + subst665 + marks666 + symnames667 + ribcage668) + (let ((n669 (vector-length symnames667))) + (letrec ((f670 (lambda (i671) + (if (fx=74 i671 n669) + (search656 + sym664 + (cdr subst665) + marks666) (if (if (eq? (vector-ref - symnames666 - i670) - sym663) - (same-marks?135 - marks665 + symnames667 + i671) + sym664) + (same-marks?136 + marks666 (vector-ref - (ribcage-marks124 - ribcage667) - i670)) + (ribcage-marks125 + ribcage668) + i671)) #f) (values (vector-ref - (ribcage-labels125 - ribcage667) - i670) - marks665) - (f669 (fx+72 i670 1))))))) - (f669 0))))) - (search-list-rib656 - (lambda (sym671 - subst672 - marks673 - symnames674 - ribcage675) - (letrec ((f676 (lambda (symnames677 i678) - (if (null? symnames677) - (search655 - sym671 - (cdr subst672) - marks673) - (if (if (eq? (car symnames677) - sym671) - (same-marks?135 - marks673 + (ribcage-labels126 + ribcage668) + i671) + marks666) + (f670 (fx+72 i671 1))))))) + (f670 0))))) + (search-list-rib657 + (lambda (sym672 + subst673 + marks674 + symnames675 + ribcage676) + (letrec ((f677 (lambda (symnames678 i679) + (if (null? symnames678) + (search656 + sym672 + (cdr subst673) + marks674) + (if (if (eq? (car symnames678) + sym672) + (same-marks?136 + marks674 (list-ref - (ribcage-marks124 - ribcage675) - i678)) + (ribcage-marks125 + ribcage676) + i679)) #f) (values (list-ref - (ribcage-labels125 - ribcage675) - i678) - marks673) - (f676 (cdr symnames677) - (fx+72 i678 1))))))) - (f676 symnames674 0)))) - (search655 - (lambda (sym679 subst680 marks681) - (if (null? subst680) - (values #f marks681) - (let ((fst682 (car subst680))) - (if (eq? fst682 (quote shift)) - (search655 - sym679 - (cdr subst680) - (cdr marks681)) - (let ((symnames683 - (ribcage-symnames123 fst682))) - (if (vector? symnames683) - (search-vector-rib657 - sym679 - subst680 - marks681 - symnames683 - fst682) - (search-list-rib656 - sym679 - subst680 - marks681 - symnames683 - fst682))))))))) - (if (symbol? id653) - (let ((t684 (call-with-values + (ribcage-labels126 + ribcage676) + i679) + marks674) + (f677 (cdr symnames678) + (fx+72 i679 1))))))) + (f677 symnames675 0)))) + (search656 + (lambda (sym680 subst681 marks682) + (if (null? subst681) + (values #f marks682) + (let ((fst683 (car subst681))) + (if (eq? fst683 (quote shift)) + (search656 + sym680 + (cdr subst681) + (cdr marks682)) + (let ((symnames684 + (ribcage-symnames124 fst683))) + (if (vector? symnames684) + (search-vector-rib658 + sym680 + subst681 + marks682 + symnames684 + fst683) + (search-list-rib657 + sym680 + subst681 + marks682 + symnames684 + fst683))))))))) + (if (symbol? id654) + (let ((t685 (call-with-values (lambda () - (search655 - id653 - (wrap-subst118 w654) - (wrap-marks117 w654))) - (lambda (x686 . ignore685) x686)))) - (if t684 t684 id653)) - (if (syntax-object?98 id653) - (let ((id687 (syntax-object-expression99 id653)) - (w1688 (syntax-object-wrap100 id653))) - (let ((marks689 - (join-marks134 - (wrap-marks117 w654) - (wrap-marks117 w1688)))) + (search656 + id654 + (wrap-subst119 w655) + (wrap-marks118 w655))) + (lambda (x687 . ignore686) x687)))) + (if t685 t685 id654)) + (if (syntax-object?99 id654) + (let ((id688 (syntax-object-expression100 id654)) + (w1689 (syntax-object-wrap101 id654))) + (let ((marks690 + (join-marks135 + (wrap-marks118 w655) + (wrap-marks118 w1689)))) (call-with-values (lambda () - (search655 id687 (wrap-subst118 w654) marks689)) - (lambda (new-id690 marks691) - (let ((t692 new-id690)) - (if t692 - t692 - (let ((t693 (call-with-values + (search656 id688 (wrap-subst119 w655) marks690)) + (lambda (new-id691 marks692) + (let ((t693 new-id691)) + (if t693 + t693 + (let ((t694 (call-with-values (lambda () - (search655 - id687 - (wrap-subst118 w1688) - marks691)) - (lambda (x695 . ignore694) - x695)))) - (if t693 t693 id687)))))))) + (search656 + id688 + (wrap-subst119 w1689) + marks692)) + (lambda (x696 . ignore695) + x696)))) + (if t694 t694 id688)))))))) (syntax-violation 'id-var-name "invalid id" - id653)))))) - (same-marks?135 - (lambda (x696 y697) - (let ((t698 (eq? x696 y697))) - (if t698 - t698 - (if (not (null? x696)) - (if (not (null? y697)) - (if (eq? (car x696) (car y697)) - (same-marks?135 (cdr x696) (cdr y697)) + id654)))))) + (same-marks?136 + (lambda (x697 y698) + (let ((t699 (eq? x697 y698))) + (if t699 + t699 + (if (not (null? x697)) + (if (not (null? y698)) + (if (eq? (car x697) (car y698)) + (same-marks?136 (cdr x697) (cdr y698)) #f) #f) #f))))) - (join-marks134 - (lambda (m1699 m2700) - (smart-append132 m1699 m2700))) - (join-wraps133 - (lambda (w1701 w2702) - (let ((m1703 (wrap-marks117 w1701)) - (s1704 (wrap-subst118 w1701))) - (if (null? m1703) - (if (null? s1704) - w2702 - (make-wrap116 - (wrap-marks117 w2702) - (smart-append132 s1704 (wrap-subst118 w2702)))) - (make-wrap116 - (smart-append132 m1703 (wrap-marks117 w2702)) - (smart-append132 s1704 (wrap-subst118 w2702))))))) - (smart-append132 - (lambda (m1705 m2706) - (if (null? m2706) m1705 (append m1705 m2706)))) - (make-binding-wrap131 - (lambda (ids707 labels708 w709) - (if (null? ids707) - w709 - (make-wrap116 - (wrap-marks117 w709) - (cons (let ((labelvec710 (list->vector labels708))) - (let ((n711 (vector-length labelvec710))) - (let ((symnamevec712 (make-vector n711)) - (marksvec713 (make-vector n711))) + (join-marks135 + (lambda (m1700 m2701) + (smart-append133 m1700 m2701))) + (join-wraps134 + (lambda (w1702 w2703) + (let ((m1704 (wrap-marks118 w1702)) + (s1705 (wrap-subst119 w1702))) + (if (null? m1704) + (if (null? s1705) + w2703 + (make-wrap117 + (wrap-marks118 w2703) + (smart-append133 s1705 (wrap-subst119 w2703)))) + (make-wrap117 + (smart-append133 m1704 (wrap-marks118 w2703)) + (smart-append133 s1705 (wrap-subst119 w2703))))))) + (smart-append133 + (lambda (m1706 m2707) + (if (null? m2707) m1706 (append m1706 m2707)))) + (make-binding-wrap132 + (lambda (ids708 labels709 w710) + (if (null? ids708) + w710 + (make-wrap117 + (wrap-marks118 w710) + (cons (let ((labelvec711 (list->vector labels709))) + (let ((n712 (vector-length labelvec711))) + (let ((symnamevec713 (make-vector n712)) + (marksvec714 (make-vector n712))) (begin - (letrec ((f714 (lambda (ids715 i716) - (if (not (null? ids715)) + (letrec ((f715 (lambda (ids716 i717) + (if (not (null? ids716)) (call-with-values (lambda () - (id-sym-name&marks115 - (car ids715) - w709)) - (lambda (symname717 - marks718) + (id-sym-name&marks116 + (car ids716) + w710)) + (lambda (symname718 + marks719) (begin (vector-set! - symnamevec712 - i716 - symname717) + symnamevec713 + i717 + symname718) (vector-set! - marksvec713 - i716 - marks718) - (f714 (cdr ids715) - (fx+72 i716 + marksvec714 + i717 + marks719) + (f715 (cdr ids716) + (fx+72 i717 1))))))))) - (f714 ids707 0)) - (make-ribcage121 - symnamevec712 - marksvec713 - labelvec710))))) - (wrap-subst118 w709)))))) - (extend-ribcage!130 - (lambda (ribcage719 id720 label721) + (f715 ids708 0)) + (make-ribcage122 + symnamevec713 + marksvec714 + labelvec711))))) + (wrap-subst119 w710)))))) + (extend-ribcage!131 + (lambda (ribcage720 id721 label722) (begin - (set-ribcage-symnames!126 - ribcage719 - (cons (syntax-object-expression99 id720) - (ribcage-symnames123 ribcage719))) - (set-ribcage-marks!127 - ribcage719 - (cons (wrap-marks117 (syntax-object-wrap100 id720)) - (ribcage-marks124 ribcage719))) - (set-ribcage-labels!128 - ribcage719 - (cons label721 (ribcage-labels125 ribcage719)))))) - (anti-mark129 - (lambda (w722) - (make-wrap116 - (cons #f (wrap-marks117 w722)) - (cons (quote shift) (wrap-subst118 w722))))) - (set-ribcage-labels!128 - (lambda (x723 update724) - (vector-set! x723 3 update724))) - (set-ribcage-marks!127 - (lambda (x725 update726) - (vector-set! x725 2 update726))) - (set-ribcage-symnames!126 - (lambda (x727 update728) - (vector-set! x727 1 update728))) - (ribcage-labels125 - (lambda (x729) (vector-ref x729 3))) - (ribcage-marks124 - (lambda (x730) (vector-ref x730 2))) - (ribcage-symnames123 - (lambda (x731) (vector-ref x731 1))) - (ribcage?122 - (lambda (x732) - (if (vector? x732) - (if (= (vector-length x732) 4) - (eq? (vector-ref x732 0) (quote ribcage)) + (set-ribcage-symnames!127 + ribcage720 + (cons (syntax-object-expression100 id721) + (ribcage-symnames124 ribcage720))) + (set-ribcage-marks!128 + ribcage720 + (cons (wrap-marks118 (syntax-object-wrap101 id721)) + (ribcage-marks125 ribcage720))) + (set-ribcage-labels!129 + ribcage720 + (cons label722 (ribcage-labels126 ribcage720)))))) + (anti-mark130 + (lambda (w723) + (make-wrap117 + (cons #f (wrap-marks118 w723)) + (cons (quote shift) (wrap-subst119 w723))))) + (set-ribcage-labels!129 + (lambda (x724 update725) + (vector-set! x724 3 update725))) + (set-ribcage-marks!128 + (lambda (x726 update727) + (vector-set! x726 2 update727))) + (set-ribcage-symnames!127 + (lambda (x728 update729) + (vector-set! x728 1 update729))) + (ribcage-labels126 + (lambda (x730) (vector-ref x730 3))) + (ribcage-marks125 + (lambda (x731) (vector-ref x731 2))) + (ribcage-symnames124 + (lambda (x732) (vector-ref x732 1))) + (ribcage?123 + (lambda (x733) + (if (vector? x733) + (if (= (vector-length x733) 4) + (eq? (vector-ref x733 0) (quote ribcage)) #f) #f))) - (make-ribcage121 - (lambda (symnames733 marks734 labels735) + (make-ribcage122 + (lambda (symnames734 marks735 labels736) (vector 'ribcage - symnames733 - marks734 - labels735))) - (gen-labels120 - (lambda (ls736) - (if (null? ls736) + symnames734 + marks735 + labels736))) + (gen-labels121 + (lambda (ls737) + (if (null? ls737) '() - (cons (gen-label119) (gen-labels120 (cdr ls736)))))) - (gen-label119 (lambda () (string #\i))) - (wrap-subst118 cdr) - (wrap-marks117 car) - (make-wrap116 cons) - (id-sym-name&marks115 - (lambda (x737 w738) - (if (syntax-object?98 x737) + (cons (gen-label120) (gen-labels121 (cdr ls737)))))) + (gen-label120 (lambda () (string #\i))) + (wrap-subst119 cdr) + (wrap-marks118 car) + (make-wrap117 cons) + (id-sym-name&marks116 + (lambda (x738 w739) + (if (syntax-object?99 x738) (values - (syntax-object-expression99 x737) - (join-marks134 - (wrap-marks117 w738) - (wrap-marks117 (syntax-object-wrap100 x737)))) - (values x737 (wrap-marks117 w738))))) - (id?114 - (lambda (x739) - (if (symbol? x739) - #t - (if (syntax-object?98 x739) - (symbol? (syntax-object-expression99 x739)) - #f)))) - (nonsymbol-id?113 + (syntax-object-expression100 x738) + (join-marks135 + (wrap-marks118 w739) + (wrap-marks118 (syntax-object-wrap101 x738)))) + (values x738 (wrap-marks118 w739))))) + (id?115 (lambda (x740) - (if (syntax-object?98 x740) - (symbol? (syntax-object-expression99 x740)) - #f))) - (global-extend112 - (lambda (type741 sym742 val743) - (put-global-definition-hook78 - sym742 - type741 - val743))) - (lookup111 - (lambda (x744 r745 mod746) - (let ((t747 (assq x744 r745))) - (if t747 - (cdr t747) - (if (symbol? x744) - (let ((t748 (get-global-definition-hook79 x744 mod746))) - (if t748 t748 (quote (global)))) - '(displaced-lexical)))))) - (macros-only-env110 - (lambda (r749) - (if (null? r749) - '() - (let ((a750 (car r749))) - (if (eq? (cadr a750) (quote macro)) - (cons a750 (macros-only-env110 (cdr r749))) - (macros-only-env110 (cdr r749))))))) - (extend-var-env109 - (lambda (labels751 vars752 r753) - (if (null? labels751) - r753 - (extend-var-env109 - (cdr labels751) - (cdr vars752) - (cons (cons (car labels751) - (cons (quote lexical) (car vars752))) - r753))))) - (extend-env108 - (lambda (labels754 bindings755 r756) - (if (null? labels754) - r756 - (extend-env108 - (cdr labels754) - (cdr bindings755) - (cons (cons (car labels754) (car bindings755)) - r756))))) - (binding-value107 cdr) - (binding-type106 car) - (source-annotation105 - (lambda (x757) - (if (syntax-object?98 x757) - (source-annotation105 - (syntax-object-expression99 x757)) - (if (pair? x757) - (let ((props758 (source-properties x757))) - (if (pair? props758) props758 #f)) + (if (symbol? x740) + #t + (if (syntax-object?99 x740) + (symbol? (syntax-object-expression100 x740)) #f)))) - (set-syntax-object-module!104 - (lambda (x759 update760) - (vector-set! x759 3 update760))) - (set-syntax-object-wrap!103 - (lambda (x761 update762) - (vector-set! x761 2 update762))) - (set-syntax-object-expression!102 - (lambda (x763 update764) - (vector-set! x763 1 update764))) - (syntax-object-module101 - (lambda (x765) (vector-ref x765 3))) - (syntax-object-wrap100 - (lambda (x766) (vector-ref x766 2))) - (syntax-object-expression99 - (lambda (x767) (vector-ref x767 1))) - (syntax-object?98 - (lambda (x768) - (if (vector? x768) - (if (= (vector-length x768) 4) - (eq? (vector-ref x768 0) (quote syntax-object)) + (nonsymbol-id?114 + (lambda (x741) + (if (syntax-object?99 x741) + (symbol? (syntax-object-expression100 x741)) + #f))) + (global-extend113 + (lambda (type742 sym743 val744) + (put-global-definition-hook78 + sym743 + type742 + val744))) + (lookup112 + (lambda (x745 r746 mod747) + (let ((t748 (assq x745 r746))) + (if t748 + (cdr t748) + (if (symbol? x745) + (let ((t749 (get-global-definition-hook79 x745 mod747))) + (if t749 t749 (quote (global)))) + '(displaced-lexical)))))) + (macros-only-env111 + (lambda (r750) + (if (null? r750) + '() + (let ((a751 (car r750))) + (if (eq? (cadr a751) (quote macro)) + (cons a751 (macros-only-env111 (cdr r750))) + (macros-only-env111 (cdr r750))))))) + (extend-var-env110 + (lambda (labels752 vars753 r754) + (if (null? labels752) + r754 + (extend-var-env110 + (cdr labels752) + (cdr vars753) + (cons (cons (car labels752) + (cons (quote lexical) (car vars753))) + r754))))) + (extend-env109 + (lambda (labels755 bindings756 r757) + (if (null? labels755) + r757 + (extend-env109 + (cdr labels755) + (cdr bindings756) + (cons (cons (car labels755) (car bindings756)) + r757))))) + (binding-value108 cdr) + (binding-type107 car) + (source-annotation106 + (lambda (x758) + (if (syntax-object?99 x758) + (source-annotation106 + (syntax-object-expression100 x758)) + (if (pair? x758) + (let ((props759 (source-properties x758))) + (if (pair? props759) props759 #f)) + #f)))) + (set-syntax-object-module!105 + (lambda (x760 update761) + (vector-set! x760 3 update761))) + (set-syntax-object-wrap!104 + (lambda (x762 update763) + (vector-set! x762 2 update763))) + (set-syntax-object-expression!103 + (lambda (x764 update765) + (vector-set! x764 1 update765))) + (syntax-object-module102 + (lambda (x766) (vector-ref x766 3))) + (syntax-object-wrap101 + (lambda (x767) (vector-ref x767 2))) + (syntax-object-expression100 + (lambda (x768) (vector-ref x768 1))) + (syntax-object?99 + (lambda (x769) + (if (vector? x769) + (if (= (vector-length x769) 4) + (eq? (vector-ref x769 0) (quote syntax-object)) #f) #f))) - (make-syntax-object97 - (lambda (expression769 wrap770 module771) + (make-syntax-object98 + (lambda (expression770 wrap771 module772) (vector 'syntax-object - expression769 - wrap770 - module771))) - (build-letrec96 - (lambda (src772 ids773 vars774 val-exps775 body-exp776) - (if (null? vars774) - body-exp776 - (let ((atom-key777 (fluid-ref *mode*71))) - (if (memv atom-key777 (quote (c))) + expression770 + wrap771 + module772))) + (build-letrec97 + (lambda (src773 ids774 vars775 val-exps776 body-exp777) + (if (null? vars775) + body-exp777 + (let ((atom-key778 (fluid-ref *mode*71))) + (if (memv atom-key778 (quote (c))) (begin - (for-each maybe-name-value!88 ids773 val-exps775) + (for-each maybe-name-value!89 ids774 val-exps776) ((@ (language tree-il) make-letrec) - src772 - ids773 - vars774 - val-exps775 - body-exp776)) - (list 'letrec - (map list vars774 val-exps775) - body-exp776)))))) - (build-named-let95 - (lambda (src778 ids779 vars780 val-exps781 body-exp782) - (let ((f783 (car vars780)) - (f-name784 (car ids779)) - (vars785 (cdr vars780)) - (ids786 (cdr ids779))) - (let ((atom-key787 (fluid-ref *mode*71))) - (if (memv atom-key787 (quote (c))) - (let ((proc788 - (build-lambda90 - src778 - ids786 - vars785 + src773 + ids774 + vars775 + val-exps776 + body-exp777)) + (decorate-source80 + (list 'letrec + (map list vars775 val-exps776) + body-exp777) + src773)))))) + (build-named-let96 + (lambda (src779 ids780 vars781 val-exps782 body-exp783) + (let ((f784 (car vars781)) + (f-name785 (car ids780)) + (vars786 (cdr vars781)) + (ids787 (cdr ids780))) + (let ((atom-key788 (fluid-ref *mode*71))) + (if (memv atom-key788 (quote (c))) + (let ((proc789 + (build-lambda91 + src779 + ids787 + vars786 #f - body-exp782))) + body-exp783))) (begin - (maybe-name-value!88 f-name784 proc788) - (for-each maybe-name-value!88 ids786 val-exps781) + (maybe-name-value!89 f-name785 proc789) + (for-each maybe-name-value!89 ids787 val-exps782) ((@ (language tree-il) make-letrec) - src778 - (list f-name784) - (list f783) - (list proc788) - (build-application81 - src778 - (build-lexical-reference83 + src779 + (list f-name785) + (list f784) + (list proc789) + (build-application82 + src779 + (build-lexical-reference84 'fun - src778 - f-name784 - f783) - val-exps781)))) - (list 'let - f783 - (map list vars785 val-exps781) - body-exp782)))))) - (build-let94 - (lambda (src789 ids790 vars791 val-exps792 body-exp793) - (if (null? vars791) - body-exp793 - (let ((atom-key794 (fluid-ref *mode*71))) - (if (memv atom-key794 (quote (c))) + src779 + f-name785 + f784) + val-exps782)))) + (decorate-source80 + (list 'let + f784 + (map list vars786 val-exps782) + body-exp783) + src779)))))) + (build-let95 + (lambda (src790 ids791 vars792 val-exps793 body-exp794) + (if (null? vars792) + body-exp794 + (let ((atom-key795 (fluid-ref *mode*71))) + (if (memv atom-key795 (quote (c))) (begin - (for-each maybe-name-value!88 ids790 val-exps792) + (for-each maybe-name-value!89 ids791 val-exps793) ((@ (language tree-il) make-let) - src789 - ids790 - vars791 - val-exps792 - body-exp793)) - (list 'let - (map list vars791 val-exps792) - body-exp793)))))) - (build-sequence93 - (lambda (src795 exps796) - (if (null? (cdr exps796)) - (car exps796) - (let ((atom-key797 (fluid-ref *mode*71))) - (if (memv atom-key797 (quote (c))) + src790 + ids791 + vars792 + val-exps793 + body-exp794)) + (decorate-source80 + (list 'let + (map list vars792 val-exps793) + body-exp794) + src790)))))) + (build-sequence94 + (lambda (src796 exps797) + (if (null? (cdr exps797)) + (car exps797) + (let ((atom-key798 (fluid-ref *mode*71))) + (if (memv atom-key798 (quote (c))) ((@ (language tree-il) make-sequence) - src795 - exps796) - (cons (quote begin) exps796)))))) - (build-data92 - (lambda (src798 exp799) - (let ((atom-key800 (fluid-ref *mode*71))) - (if (memv atom-key800 (quote (c))) - ((@ (language tree-il) make-const) src798 exp799) - (if (if (self-evaluating? exp799) - (not (vector? exp799)) - #f) - exp799 - (list (quote quote) exp799)))))) - (build-primref91 - (lambda (src801 name802) + src796 + exps797) + (decorate-source80 + (cons (quote begin) exps797) + src796)))))) + (build-data93 + (lambda (src799 exp800) + (let ((atom-key801 (fluid-ref *mode*71))) + (if (memv atom-key801 (quote (c))) + ((@ (language tree-il) make-const) src799 exp800) + (decorate-source80 + (if (if (self-evaluating? exp800) + (not (vector? exp800)) + #f) + exp800 + (list (quote quote) exp800)) + src799))))) + (build-primref92 + (lambda (src802 name803) (if (equal? (module-name (current-module)) '(guile)) - (let ((atom-key803 (fluid-ref *mode*71))) - (if (memv atom-key803 (quote (c))) - ((@ (language tree-il) make-toplevel-ref) - src801 - name802) - name802)) (let ((atom-key804 (fluid-ref *mode*71))) (if (memv atom-key804 (quote (c))) + ((@ (language tree-il) make-toplevel-ref) + src802 + name803) + (decorate-source80 name803 src802))) + (let ((atom-key805 (fluid-ref *mode*71))) + (if (memv atom-key805 (quote (c))) ((@ (language tree-il) make-module-ref) - src801 + src802 '(guile) - name802 + name803 #f) - (list (quote @@) (quote (guile)) name802)))))) - (build-lambda90 - (lambda (src805 ids806 vars807 docstring808 exp809) - (let ((atom-key810 (fluid-ref *mode*71))) - (if (memv atom-key810 (quote (c))) + (decorate-source80 + (list (quote @@) (quote (guile)) name803) + src802)))))) + (build-lambda91 + (lambda (src806 ids807 vars808 docstring809 exp810) + (let ((atom-key811 (fluid-ref *mode*71))) + (if (memv atom-key811 (quote (c))) ((@ (language tree-il) make-lambda) - src805 - ids806 - vars807 - (if docstring808 - (list (cons (quote documentation) docstring808)) + src806 + ids807 + vars808 + (if docstring809 + (list (cons (quote documentation) docstring809)) '()) - exp809) - (cons 'lambda - (cons vars807 - (append - (if docstring808 - (list docstring808) - '()) - (list exp809)))))))) - (build-global-definition89 - (lambda (source811 var812 exp813) - (let ((atom-key814 (fluid-ref *mode*71))) - (if (memv atom-key814 (quote (c))) + exp810) + (decorate-source80 + (cons 'lambda + (cons vars808 + (append + (if docstring809 + (list docstring809) + '()) + (list exp810)))) + src806))))) + (build-global-definition90 + (lambda (source812 var813 exp814) + (let ((atom-key815 (fluid-ref *mode*71))) + (if (memv atom-key815 (quote (c))) (begin - (maybe-name-value!88 var812 exp813) + (maybe-name-value!89 var813 exp814) ((@ (language tree-il) make-toplevel-define) - source811 - var812 - exp813)) - (list (quote define) var812 exp813))))) - (maybe-name-value!88 - (lambda (name815 val816) - (if ((@ (language tree-il) lambda?) val816) - (let ((meta817 - ((@ (language tree-il) lambda-meta) val816))) - (if (not (assq (quote name) meta817)) + source812 + var813 + exp814)) + (decorate-source80 + (list (quote define) var813 exp814) + source812))))) + (maybe-name-value!89 + (lambda (name816 val817) + (if ((@ (language tree-il) lambda?) val817) + (let ((meta818 + ((@ (language tree-il) lambda-meta) val817))) + (if (not (assq (quote name) meta818)) ((setter (@ (language tree-il) lambda-meta)) - val816 - (acons (quote name) name815 meta817))))))) - (build-global-assignment87 - (lambda (source818 var819 exp820 mod821) - (analyze-variable85 - mod821 - var819 - (lambda (mod822 var823 public?824) - (let ((atom-key825 (fluid-ref *mode*71))) - (if (memv atom-key825 (quote (c))) + val817 + (acons (quote name) name816 meta818))))))) + (build-global-assignment88 + (lambda (source819 var820 exp821 mod822) + (analyze-variable86 + mod822 + var820 + (lambda (mod823 var824 public?825) + (let ((atom-key826 (fluid-ref *mode*71))) + (if (memv atom-key826 (quote (c))) ((@ (language tree-il) make-module-set) - source818 - mod822 - var823 - public?824 - exp820) - (list 'set! - (list (if public?824 (quote @) (quote @@)) - mod822 - var823) - exp820)))) - (lambda (var826) - (let ((atom-key827 (fluid-ref *mode*71))) - (if (memv atom-key827 (quote (c))) + source819 + mod823 + var824 + public?825 + exp821) + (decorate-source80 + (list 'set! + (list (if public?825 (quote @) (quote @@)) + mod823 + var824) + exp821) + source819)))) + (lambda (var827) + (let ((atom-key828 (fluid-ref *mode*71))) + (if (memv atom-key828 (quote (c))) ((@ (language tree-il) make-toplevel-set) - source818 - var826 - exp820) - (list (quote set!) var826 exp820))))))) - (build-global-reference86 - (lambda (source828 var829 mod830) - (analyze-variable85 - mod830 - var829 - (lambda (mod831 var832 public?833) - (let ((atom-key834 (fluid-ref *mode*71))) - (if (memv atom-key834 (quote (c))) + source819 + var827 + exp821) + (decorate-source80 + (list (quote set!) var827 exp821) + source819))))))) + (build-global-reference87 + (lambda (source829 var830 mod831) + (analyze-variable86 + mod831 + var830 + (lambda (mod832 var833 public?834) + (let ((atom-key835 (fluid-ref *mode*71))) + (if (memv atom-key835 (quote (c))) ((@ (language tree-il) make-module-ref) - source828 - mod831 - var832 - public?833) - (list (if public?833 (quote @) (quote @@)) - mod831 - var832)))) - (lambda (var835) - (let ((atom-key836 (fluid-ref *mode*71))) - (if (memv atom-key836 (quote (c))) + source829 + mod832 + var833 + public?834) + (decorate-source80 + (list (if public?834 (quote @) (quote @@)) + mod832 + var833) + source829)))) + (lambda (var836) + (let ((atom-key837 (fluid-ref *mode*71))) + (if (memv atom-key837 (quote (c))) ((@ (language tree-il) make-toplevel-ref) - source828 - var835) - var835)))))) - (analyze-variable85 - (lambda (mod837 var838 modref-cont839 bare-cont840) - (if (not mod837) - (bare-cont840 var838) - (let ((kind841 (car mod837)) (mod842 (cdr mod837))) - (if (memv kind841 (quote (public))) - (modref-cont839 mod842 var838 #t) - (if (memv kind841 (quote (private))) - (if (not (equal? mod842 (module-name (current-module)))) - (modref-cont839 mod842 var838 #f) - (bare-cont840 var838)) - (if (memv kind841 (quote (bare))) - (bare-cont840 var838) - (if (memv kind841 (quote (hygiene))) + source829 + var836) + (decorate-source80 var836 source829))))))) + (analyze-variable86 + (lambda (mod838 var839 modref-cont840 bare-cont841) + (if (not mod838) + (bare-cont841 var839) + (let ((kind842 (car mod838)) (mod843 (cdr mod838))) + (if (memv kind842 (quote (public))) + (modref-cont840 mod843 var839 #t) + (if (memv kind842 (quote (private))) + (if (not (equal? mod843 (module-name (current-module)))) + (modref-cont840 mod843 var839 #f) + (bare-cont841 var839)) + (if (memv kind842 (quote (bare))) + (bare-cont841 var839) + (if (memv kind842 (quote (hygiene))) (if (if (not (equal? - mod842 + mod843 (module-name (current-module)))) (module-variable - (resolve-module mod842) - var838) + (resolve-module mod843) + var839) #f) - (modref-cont839 mod842 var838 #f) - (bare-cont840 var838)) + (modref-cont840 mod843 var839 #f) + (bare-cont841 var839)) (syntax-violation #f "bad module kind" - var838 - mod842))))))))) - (build-lexical-assignment84 - (lambda (source843 name844 var845 exp846) - (let ((atom-key847 (fluid-ref *mode*71))) - (if (memv atom-key847 (quote (c))) + var839 + mod843))))))))) + (build-lexical-assignment85 + (lambda (source844 name845 var846 exp847) + (let ((atom-key848 (fluid-ref *mode*71))) + (if (memv atom-key848 (quote (c))) ((@ (language tree-il) make-lexical-set) - source843 - name844 - var845 - exp846) - (list (quote set!) var845 exp846))))) - (build-lexical-reference83 - (lambda (type848 source849 name850 var851) - (let ((atom-key852 (fluid-ref *mode*71))) - (if (memv atom-key852 (quote (c))) + source844 + name845 + var846 + exp847) + (decorate-source80 + (list (quote set!) var846 exp847) + source844))))) + (build-lexical-reference84 + (lambda (type849 source850 name851 var852) + (let ((atom-key853 (fluid-ref *mode*71))) + (if (memv atom-key853 (quote (c))) ((@ (language tree-il) make-lexical-ref) - source849 - name850 - var851) - var851)))) - (build-conditional82 - (lambda (source853 test-exp854 then-exp855 else-exp856) - (let ((atom-key857 (fluid-ref *mode*71))) - (if (memv atom-key857 (quote (c))) + source850 + name851 + var852) + (decorate-source80 var852 source850))))) + (build-conditional83 + (lambda (source854 test-exp855 then-exp856 else-exp857) + (let ((atom-key858 (fluid-ref *mode*71))) + (if (memv atom-key858 (quote (c))) ((@ (language tree-il) make-conditional) - source853 - test-exp854 - then-exp855 - else-exp856) - (if (equal? else-exp856 (quote (if #f #f))) - (list (quote if) test-exp854 then-exp855) - (list 'if - test-exp854 - then-exp855 - else-exp856)))))) - (build-application81 - (lambda (source858 fun-exp859 arg-exps860) - (let ((atom-key861 (fluid-ref *mode*71))) - (if (memv atom-key861 (quote (c))) + source854 + test-exp855 + then-exp856 + else-exp857) + (decorate-source80 + (if (equal? else-exp857 (quote (if #f #f))) + (list (quote if) test-exp855 then-exp856) + (list 'if + test-exp855 + then-exp856 + else-exp857)) + source854))))) + (build-application82 + (lambda (source859 fun-exp860 arg-exps861) + (let ((atom-key862 (fluid-ref *mode*71))) + (if (memv atom-key862 (quote (c))) ((@ (language tree-il) make-application) - source858 - fun-exp859 - arg-exps860) - (cons fun-exp859 arg-exps860))))) - (build-void80 - (lambda (source862) - (let ((atom-key863 (fluid-ref *mode*71))) - (if (memv atom-key863 (quote (c))) - ((@ (language tree-il) make-void) source862) - '(if #f #f))))) - (get-global-definition-hook79 - (lambda (symbol864 module865) + source859 + fun-exp860 + arg-exps861) + (decorate-source80 + (cons fun-exp860 arg-exps861) + source859))))) + (build-void81 + (lambda (source863) + (let ((atom-key864 (fluid-ref *mode*71))) + (if (memv atom-key864 (quote (c))) + ((@ (language tree-il) make-void) source863) + (decorate-source80 (quote (if #f #f)) source863))))) + (decorate-source80 + (lambda (e865 s866) (begin - (if (if (not module865) (current-module) #f) + (if (if (pair? e865) s866 #f) + (set-source-properties! e865 s866)) + e865))) + (get-global-definition-hook79 + (lambda (symbol867 module868) + (begin + (if (if (not module868) (current-module) #f) (warn "module system is booted, we should have a module" - symbol864)) - (let ((v866 (module-variable - (if module865 - (resolve-module (cdr module865)) + symbol867)) + (let ((v869 (module-variable + (if module868 + (resolve-module (cdr module868)) (current-module)) - symbol864))) - (if v866 - (if (variable-bound? v866) - (let ((val867 (variable-ref v866))) - (if (macro? val867) - (if (syncase-macro-type val867) - (cons (syncase-macro-type val867) - (syncase-macro-binding val867)) + symbol867))) + (if v869 + (if (variable-bound? v869) + (let ((val870 (variable-ref v869))) + (if (macro? val870) + (if (syncase-macro-type val870) + (cons (syncase-macro-type val870) + (syncase-macro-binding val870)) #f) #f)) #f) #f))))) (put-global-definition-hook78 - (lambda (symbol868 type869 val870) - (let ((existing871 - (let ((v872 (module-variable + (lambda (symbol871 type872 val873) + (let ((existing874 + (let ((v875 (module-variable (current-module) - symbol868))) - (if v872 - (if (variable-bound? v872) - (let ((val873 (variable-ref v872))) - (if (macro? val873) - (if (not (syncase-macro-type val873)) - val873 + symbol871))) + (if v875 + (if (variable-bound? v875) + (let ((val876 (variable-ref v875))) + (if (macro? val876) + (if (not (syncase-macro-type val876)) + val876 #f) #f)) #f) #f)))) (module-define! (current-module) - symbol868 - (if existing871 + symbol871 + (if existing874 (make-extended-syncase-macro - existing871 - type869 - val870) - (make-syncase-macro type869 val870)))))) + existing874 + type872 + val873) + (make-syncase-macro type872 val873)))))) (local-eval-hook77 - (lambda (x874 mod875) - (primitive-eval - (list noexpand70 - (let ((atom-key876 (fluid-ref *mode*71))) - (if (memv atom-key876 (quote (c))) - ((@ (language tree-il) tree-il->scheme) x874) - x874)))))) - (top-level-eval-hook76 (lambda (x877 mod878) (primitive-eval (list noexpand70 @@ -5346,6 +5398,14 @@ (if (memv atom-key879 (quote (c))) ((@ (language tree-il) tree-il->scheme) x877) x877)))))) + (top-level-eval-hook76 + (lambda (x880 mod881) + (primitive-eval + (list noexpand70 + (let ((atom-key882 (fluid-ref *mode*71))) + (if (memv atom-key882 (quote (c))) + ((@ (language tree-il) tree-il->scheme) x880) + x880)))))) (fx<75 <) (fx=74 =) (fx-73 -) @@ -5353,701 +5413,701 @@ (*mode*71 (make-fluid)) (noexpand70 "noexpand")) (begin - (global-extend112 + (global-extend113 'local-syntax 'letrec-syntax #t) - (global-extend112 + (global-extend113 'local-syntax 'let-syntax #f) - (global-extend112 + (global-extend113 'core 'fluid-let-syntax - (lambda (e880 r881 w882 s883 mod884) - ((lambda (tmp885) - ((lambda (tmp886) - (if (if tmp886 - (apply (lambda (_887 var888 val889 e1890 e2891) - (valid-bound-ids?139 var888)) - tmp886) + (lambda (e883 r884 w885 s886 mod887) + ((lambda (tmp888) + ((lambda (tmp889) + (if (if tmp889 + (apply (lambda (_890 var891 val892 e1893 e2894) + (valid-bound-ids?140 var891)) + tmp889) #f) - (apply (lambda (_893 var894 val895 e1896 e2897) - (let ((names898 - (map (lambda (x899) - (id-var-name136 x899 w882)) - var894))) + (apply (lambda (_896 var897 val898 e1899 e2900) + (let ((names901 + (map (lambda (x902) + (id-var-name137 x902 w885)) + var897))) (begin (for-each - (lambda (id901 n902) - (let ((atom-key903 - (binding-type106 - (lookup111 n902 r881 mod884)))) - (if (memv atom-key903 + (lambda (id904 n905) + (let ((atom-key906 + (binding-type107 + (lookup112 n905 r884 mod887)))) + (if (memv atom-key906 '(displaced-lexical)) (syntax-violation 'fluid-let-syntax "identifier out of context" - e880 - (source-wrap143 - id901 - w882 - s883 - mod884))))) - var894 - names898) - (chi-body154 - (cons e1896 e2897) - (source-wrap143 e880 w882 s883 mod884) - (extend-env108 - names898 - (let ((trans-r906 - (macros-only-env110 r881))) - (map (lambda (x907) + e883 + (source-wrap144 + id904 + w885 + s886 + mod887))))) + var897 + names901) + (chi-body155 + (cons e1899 e2900) + (source-wrap144 e883 w885 s886 mod887) + (extend-env109 + names901 + (let ((trans-r909 + (macros-only-env111 r884))) + (map (lambda (x910) (cons 'macro - (eval-local-transformer157 - (chi150 - x907 - trans-r906 - w882 - mod884) - mod884))) - val895)) - r881) - w882 - mod884)))) - tmp886) - ((lambda (_909) + (eval-local-transformer158 + (chi151 + x910 + trans-r909 + w885 + mod887) + mod887))) + val898)) + r884) + w885 + mod887)))) + tmp889) + ((lambda (_912) (syntax-violation 'fluid-let-syntax "bad syntax" - (source-wrap143 e880 w882 s883 mod884))) - tmp885))) + (source-wrap144 e883 w885 s886 mod887))) + tmp888))) ($sc-dispatch - tmp885 + tmp888 '(any #(each (any any)) any . each-any)))) - e880))) - (global-extend112 + e883))) + (global-extend113 'core 'quote - (lambda (e910 r911 w912 s913 mod914) - ((lambda (tmp915) - ((lambda (tmp916) - (if tmp916 - (apply (lambda (_917 e918) - (build-data92 s913 (strip160 e918 w912))) - tmp916) - ((lambda (_919) + (lambda (e913 r914 w915 s916 mod917) + ((lambda (tmp918) + ((lambda (tmp919) + (if tmp919 + (apply (lambda (_920 e921) + (build-data93 s916 (strip161 e921 w915))) + tmp919) + ((lambda (_922) (syntax-violation 'quote "bad syntax" - (source-wrap143 e910 w912 s913 mod914))) - tmp915))) - ($sc-dispatch tmp915 (quote (any any))))) - e910))) - (global-extend112 + (source-wrap144 e913 w915 s916 mod917))) + tmp918))) + ($sc-dispatch tmp918 (quote (any any))))) + e913))) + (global-extend113 'core 'syntax - (letrec ((regen927 - (lambda (x928) - (let ((atom-key929 (car x928))) - (if (memv atom-key929 (quote (ref))) - (build-lexical-reference83 + (letrec ((regen930 + (lambda (x931) + (let ((atom-key932 (car x931))) + (if (memv atom-key932 (quote (ref))) + (build-lexical-reference84 'value #f - (cadr x928) - (cadr x928)) - (if (memv atom-key929 (quote (primitive))) - (build-primref91 #f (cadr x928)) - (if (memv atom-key929 (quote (quote))) - (build-data92 #f (cadr x928)) - (if (memv atom-key929 (quote (lambda))) - (build-lambda90 + (cadr x931) + (cadr x931)) + (if (memv atom-key932 (quote (primitive))) + (build-primref92 #f (cadr x931)) + (if (memv atom-key932 (quote (quote))) + (build-data93 #f (cadr x931)) + (if (memv atom-key932 (quote (lambda))) + (build-lambda91 #f - (cadr x928) - (cadr x928) + (cadr x931) + (cadr x931) #f - (regen927 (caddr x928))) - (build-application81 + (regen930 (caddr x931))) + (build-application82 #f - (build-primref91 #f (car x928)) - (map regen927 (cdr x928)))))))))) - (gen-vector926 - (lambda (x930) - (if (eq? (car x930) (quote list)) - (cons (quote vector) (cdr x930)) - (if (eq? (car x930) (quote quote)) - (list (quote quote) (list->vector (cadr x930))) - (list (quote list->vector) x930))))) - (gen-append925 - (lambda (x931 y932) - (if (equal? y932 (quote (quote ()))) - x931 - (list (quote append) x931 y932)))) - (gen-cons924 - (lambda (x933 y934) - (let ((atom-key935 (car y934))) - (if (memv atom-key935 (quote (quote))) - (if (eq? (car x933) (quote quote)) + (build-primref92 #f (car x931)) + (map regen930 (cdr x931)))))))))) + (gen-vector929 + (lambda (x933) + (if (eq? (car x933) (quote list)) + (cons (quote vector) (cdr x933)) + (if (eq? (car x933) (quote quote)) + (list (quote quote) (list->vector (cadr x933))) + (list (quote list->vector) x933))))) + (gen-append928 + (lambda (x934 y935) + (if (equal? y935 (quote (quote ()))) + x934 + (list (quote append) x934 y935)))) + (gen-cons927 + (lambda (x936 y937) + (let ((atom-key938 (car y937))) + (if (memv atom-key938 (quote (quote))) + (if (eq? (car x936) (quote quote)) (list 'quote - (cons (cadr x933) (cadr y934))) - (if (eq? (cadr y934) (quote ())) - (list (quote list) x933) - (list (quote cons) x933 y934))) - (if (memv atom-key935 (quote (list))) - (cons (quote list) (cons x933 (cdr y934))) - (list (quote cons) x933 y934)))))) - (gen-map923 - (lambda (e936 map-env937) - (let ((formals938 (map cdr map-env937)) - (actuals939 - (map (lambda (x940) (list (quote ref) (car x940))) - map-env937))) - (if (eq? (car e936) (quote ref)) - (car actuals939) + (cons (cadr x936) (cadr y937))) + (if (eq? (cadr y937) (quote ())) + (list (quote list) x936) + (list (quote cons) x936 y937))) + (if (memv atom-key938 (quote (list))) + (cons (quote list) (cons x936 (cdr y937))) + (list (quote cons) x936 y937)))))) + (gen-map926 + (lambda (e939 map-env940) + (let ((formals941 (map cdr map-env940)) + (actuals942 + (map (lambda (x943) (list (quote ref) (car x943))) + map-env940))) + (if (eq? (car e939) (quote ref)) + (car actuals942) (if (and-map - (lambda (x941) - (if (eq? (car x941) (quote ref)) - (memq (cadr x941) formals938) + (lambda (x944) + (if (eq? (car x944) (quote ref)) + (memq (cadr x944) formals941) #f)) - (cdr e936)) + (cdr e939)) (cons 'map - (cons (list (quote primitive) (car e936)) - (map (let ((r942 (map cons - formals938 - actuals939))) - (lambda (x943) - (cdr (assq (cadr x943) r942)))) - (cdr e936)))) + (cons (list (quote primitive) (car e939)) + (map (let ((r945 (map cons + formals941 + actuals942))) + (lambda (x946) + (cdr (assq (cadr x946) r945)))) + (cdr e939)))) (cons 'map - (cons (list (quote lambda) formals938 e936) - actuals939))))))) - (gen-mappend922 - (lambda (e944 map-env945) + (cons (list (quote lambda) formals941 e939) + actuals942))))))) + (gen-mappend925 + (lambda (e947 map-env948) (list 'apply '(primitive append) - (gen-map923 e944 map-env945)))) - (gen-ref921 - (lambda (src946 var947 level948 maps949) - (if (fx=74 level948 0) - (values var947 maps949) - (if (null? maps949) + (gen-map926 e947 map-env948)))) + (gen-ref924 + (lambda (src949 var950 level951 maps952) + (if (fx=74 level951 0) + (values var950 maps952) + (if (null? maps952) (syntax-violation 'syntax "missing ellipsis" - src946) + src949) (call-with-values (lambda () - (gen-ref921 - src946 - var947 - (fx-73 level948 1) - (cdr maps949))) - (lambda (outer-var950 outer-maps951) - (let ((b952 (assq outer-var950 (car maps949)))) - (if b952 - (values (cdr b952) maps949) - (let ((inner-var953 (gen-var161 (quote tmp)))) + (gen-ref924 + src949 + var950 + (fx-73 level951 1) + (cdr maps952))) + (lambda (outer-var953 outer-maps954) + (let ((b955 (assq outer-var953 (car maps952)))) + (if b955 + (values (cdr b955) maps952) + (let ((inner-var956 (gen-var162 (quote tmp)))) (values - inner-var953 - (cons (cons (cons outer-var950 - inner-var953) - (car maps949)) - outer-maps951))))))))))) - (gen-syntax920 - (lambda (src954 e955 r956 maps957 ellipsis?958 mod959) - (if (id?114 e955) - (let ((label960 (id-var-name136 e955 (quote (()))))) - (let ((b961 (lookup111 label960 r956 mod959))) - (if (eq? (binding-type106 b961) (quote syntax)) + inner-var956 + (cons (cons (cons outer-var953 + inner-var956) + (car maps952)) + outer-maps954))))))))))) + (gen-syntax923 + (lambda (src957 e958 r959 maps960 ellipsis?961 mod962) + (if (id?115 e958) + (let ((label963 (id-var-name137 e958 (quote (()))))) + (let ((b964 (lookup112 label963 r959 mod962))) + (if (eq? (binding-type107 b964) (quote syntax)) (call-with-values (lambda () - (let ((var.lev962 (binding-value107 b961))) - (gen-ref921 - src954 - (car var.lev962) - (cdr var.lev962) - maps957))) - (lambda (var963 maps964) - (values (list (quote ref) var963) maps964))) - (if (ellipsis?958 e955) + (let ((var.lev965 (binding-value108 b964))) + (gen-ref924 + src957 + (car var.lev965) + (cdr var.lev965) + maps960))) + (lambda (var966 maps967) + (values (list (quote ref) var966) maps967))) + (if (ellipsis?961 e958) (syntax-violation 'syntax "misplaced ellipsis" - src954) - (values (list (quote quote) e955) maps957))))) - ((lambda (tmp965) - ((lambda (tmp966) - (if (if tmp966 - (apply (lambda (dots967 e968) - (ellipsis?958 dots967)) - tmp966) + src957) + (values (list (quote quote) e958) maps960))))) + ((lambda (tmp968) + ((lambda (tmp969) + (if (if tmp969 + (apply (lambda (dots970 e971) + (ellipsis?961 dots970)) + tmp969) #f) - (apply (lambda (dots969 e970) - (gen-syntax920 - src954 - e970 - r956 - maps957 - (lambda (x971) #f) - mod959)) - tmp966) - ((lambda (tmp972) - (if (if tmp972 - (apply (lambda (x973 dots974 y975) - (ellipsis?958 dots974)) - tmp972) + (apply (lambda (dots972 e973) + (gen-syntax923 + src957 + e973 + r959 + maps960 + (lambda (x974) #f) + mod962)) + tmp969) + ((lambda (tmp975) + (if (if tmp975 + (apply (lambda (x976 dots977 y978) + (ellipsis?961 dots977)) + tmp975) #f) - (apply (lambda (x976 dots977 y978) - (letrec ((f979 (lambda (y980 k981) - ((lambda (tmp985) - ((lambda (tmp986) - (if (if tmp986 - (apply (lambda (dots987 - y988) - (ellipsis?958 - dots987)) - tmp986) + (apply (lambda (x979 dots980 y981) + (letrec ((f982 (lambda (y983 k984) + ((lambda (tmp988) + ((lambda (tmp989) + (if (if tmp989 + (apply (lambda (dots990 + y991) + (ellipsis?961 + dots990)) + tmp989) #f) - (apply (lambda (dots989 - y990) - (f979 y990 - (lambda (maps991) + (apply (lambda (dots992 + y993) + (f982 y993 + (lambda (maps994) (call-with-values (lambda () - (k981 (cons '() - maps991))) - (lambda (x992 - maps993) - (if (null? (car maps993)) + (k984 (cons '() + maps994))) + (lambda (x995 + maps996) + (if (null? (car maps996)) (syntax-violation 'syntax "extra ellipsis" - src954) + src957) (values - (gen-mappend922 - x992 - (car maps993)) - (cdr maps993)))))))) - tmp986) - ((lambda (_994) + (gen-mappend925 + x995 + (car maps996)) + (cdr maps996)))))))) + tmp989) + ((lambda (_997) (call-with-values (lambda () - (gen-syntax920 - src954 - y980 - r956 - maps957 - ellipsis?958 - mod959)) - (lambda (y995 - maps996) + (gen-syntax923 + src957 + y983 + r959 + maps960 + ellipsis?961 + mod962)) + (lambda (y998 + maps999) (call-with-values (lambda () - (k981 maps996)) - (lambda (x997 - maps998) + (k984 maps999)) + (lambda (x1000 + maps1001) (values - (gen-append925 - x997 - y995) - maps998)))))) - tmp985))) + (gen-append928 + x1000 + y998) + maps1001)))))) + tmp988))) ($sc-dispatch - tmp985 + tmp988 '(any . any)))) - y980)))) - (f979 y978 - (lambda (maps982) + y983)))) + (f982 y981 + (lambda (maps985) (call-with-values (lambda () - (gen-syntax920 - src954 - x976 - r956 + (gen-syntax923 + src957 + x979 + r959 (cons '() - maps982) - ellipsis?958 - mod959)) - (lambda (x983 maps984) - (if (null? (car maps984)) + maps985) + ellipsis?961 + mod962)) + (lambda (x986 maps987) + (if (null? (car maps987)) (syntax-violation 'syntax "extra ellipsis" - src954) + src957) (values - (gen-map923 - x983 - (car maps984)) - (cdr maps984))))))))) - tmp972) - ((lambda (tmp999) - (if tmp999 - (apply (lambda (x1000 y1001) + (gen-map926 + x986 + (car maps987)) + (cdr maps987))))))))) + tmp975) + ((lambda (tmp1002) + (if tmp1002 + (apply (lambda (x1003 y1004) (call-with-values (lambda () - (gen-syntax920 - src954 - x1000 - r956 - maps957 - ellipsis?958 - mod959)) - (lambda (x1002 maps1003) + (gen-syntax923 + src957 + x1003 + r959 + maps960 + ellipsis?961 + mod962)) + (lambda (x1005 maps1006) (call-with-values (lambda () - (gen-syntax920 - src954 - y1001 - r956 - maps1003 - ellipsis?958 - mod959)) - (lambda (y1004 - maps1005) + (gen-syntax923 + src957 + y1004 + r959 + maps1006 + ellipsis?961 + mod962)) + (lambda (y1007 + maps1008) (values - (gen-cons924 - x1002 - y1004) - maps1005)))))) - tmp999) - ((lambda (tmp1006) - (if tmp1006 - (apply (lambda (e11007 e21008) + (gen-cons927 + x1005 + y1007) + maps1008)))))) + tmp1002) + ((lambda (tmp1009) + (if tmp1009 + (apply (lambda (e11010 e21011) (call-with-values (lambda () - (gen-syntax920 - src954 - (cons e11007 - e21008) - r956 - maps957 - ellipsis?958 - mod959)) - (lambda (e1010 - maps1011) + (gen-syntax923 + src957 + (cons e11010 + e21011) + r959 + maps960 + ellipsis?961 + mod962)) + (lambda (e1013 + maps1014) (values - (gen-vector926 - e1010) - maps1011)))) - tmp1006) - ((lambda (_1012) + (gen-vector929 + e1013) + maps1014)))) + tmp1009) + ((lambda (_1015) (values - (list (quote quote) e955) - maps957)) - tmp965))) + (list (quote quote) e958) + maps960)) + tmp968))) ($sc-dispatch - tmp965 + tmp968 '#(vector (any . each-any)))))) ($sc-dispatch - tmp965 + tmp968 '(any . any))))) ($sc-dispatch - tmp965 + tmp968 '(any any . any))))) - ($sc-dispatch tmp965 (quote (any any))))) - e955))))) - (lambda (e1013 r1014 w1015 s1016 mod1017) - (let ((e1018 (source-wrap143 e1013 w1015 s1016 mod1017))) - ((lambda (tmp1019) - ((lambda (tmp1020) - (if tmp1020 - (apply (lambda (_1021 x1022) + ($sc-dispatch tmp968 (quote (any any))))) + e958))))) + (lambda (e1016 r1017 w1018 s1019 mod1020) + (let ((e1021 (source-wrap144 e1016 w1018 s1019 mod1020))) + ((lambda (tmp1022) + ((lambda (tmp1023) + (if tmp1023 + (apply (lambda (_1024 x1025) (call-with-values (lambda () - (gen-syntax920 - e1018 - x1022 - r1014 + (gen-syntax923 + e1021 + x1025 + r1017 '() - ellipsis?159 - mod1017)) - (lambda (e1023 maps1024) (regen927 e1023)))) - tmp1020) - ((lambda (_1025) + ellipsis?160 + mod1020)) + (lambda (e1026 maps1027) (regen930 e1026)))) + tmp1023) + ((lambda (_1028) (syntax-violation 'syntax "bad `syntax' form" - e1018)) - tmp1019))) - ($sc-dispatch tmp1019 (quote (any any))))) - e1018))))) - (global-extend112 + e1021)) + tmp1022))) + ($sc-dispatch tmp1022 (quote (any any))))) + e1021))))) + (global-extend113 'core 'lambda - (lambda (e1026 r1027 w1028 s1029 mod1030) - ((lambda (tmp1031) - ((lambda (tmp1032) - (if tmp1032 - (apply (lambda (_1033 c1034) - (chi-lambda-clause155 - (source-wrap143 e1026 w1028 s1029 mod1030) + (lambda (e1029 r1030 w1031 s1032 mod1033) + ((lambda (tmp1034) + ((lambda (tmp1035) + (if tmp1035 + (apply (lambda (_1036 c1037) + (chi-lambda-clause156 + (source-wrap144 e1029 w1031 s1032 mod1033) #f - c1034 - r1027 - w1028 - mod1030 - (lambda (names1035 - vars1036 - docstring1037 - body1038) - (build-lambda90 - s1029 - names1035 - vars1036 - docstring1037 - body1038)))) - tmp1032) + c1037 + r1030 + w1031 + mod1033 + (lambda (names1038 + vars1039 + docstring1040 + body1041) + (build-lambda91 + s1032 + names1038 + vars1039 + docstring1040 + body1041)))) + tmp1035) (syntax-violation #f "source expression failed to match any pattern" - tmp1031))) - ($sc-dispatch tmp1031 (quote (any . any))))) - e1026))) - (global-extend112 + tmp1034))) + ($sc-dispatch tmp1034 (quote (any . any))))) + e1029))) + (global-extend113 'core 'let - (letrec ((chi-let1039 - (lambda (e1040 - r1041 - w1042 - s1043 - mod1044 - constructor1045 - ids1046 - vals1047 - exps1048) - (if (not (valid-bound-ids?139 ids1046)) + (letrec ((chi-let1042 + (lambda (e1043 + r1044 + w1045 + s1046 + mod1047 + constructor1048 + ids1049 + vals1050 + exps1051) + (if (not (valid-bound-ids?140 ids1049)) (syntax-violation 'let "duplicate bound variable" - e1040) - (let ((labels1049 (gen-labels120 ids1046)) - (new-vars1050 (map gen-var161 ids1046))) - (let ((nw1051 - (make-binding-wrap131 - ids1046 - labels1049 - w1042)) - (nr1052 - (extend-var-env109 - labels1049 - new-vars1050 - r1041))) - (constructor1045 - s1043 - (map syntax->datum ids1046) - new-vars1050 - (map (lambda (x1053) - (chi150 x1053 r1041 w1042 mod1044)) - vals1047) - (chi-body154 - exps1048 - (source-wrap143 e1040 nw1051 s1043 mod1044) - nr1052 - nw1051 - mod1044)))))))) - (lambda (e1054 r1055 w1056 s1057 mod1058) - ((lambda (tmp1059) - ((lambda (tmp1060) - (if (if tmp1060 - (apply (lambda (_1061 id1062 val1063 e11064 e21065) - (and-map id?114 id1062)) - tmp1060) + e1043) + (let ((labels1052 (gen-labels121 ids1049)) + (new-vars1053 (map gen-var162 ids1049))) + (let ((nw1054 + (make-binding-wrap132 + ids1049 + labels1052 + w1045)) + (nr1055 + (extend-var-env110 + labels1052 + new-vars1053 + r1044))) + (constructor1048 + s1046 + (map syntax->datum ids1049) + new-vars1053 + (map (lambda (x1056) + (chi151 x1056 r1044 w1045 mod1047)) + vals1050) + (chi-body155 + exps1051 + (source-wrap144 e1043 nw1054 s1046 mod1047) + nr1055 + nw1054 + mod1047)))))))) + (lambda (e1057 r1058 w1059 s1060 mod1061) + ((lambda (tmp1062) + ((lambda (tmp1063) + (if (if tmp1063 + (apply (lambda (_1064 id1065 val1066 e11067 e21068) + (and-map id?115 id1065)) + tmp1063) #f) - (apply (lambda (_1067 id1068 val1069 e11070 e21071) - (chi-let1039 - e1054 - r1055 - w1056 - s1057 - mod1058 - build-let94 - id1068 - val1069 - (cons e11070 e21071))) - tmp1060) - ((lambda (tmp1075) - (if (if tmp1075 - (apply (lambda (_1076 - f1077 - id1078 - val1079 - e11080 - e21081) - (if (id?114 f1077) - (and-map id?114 id1078) + (apply (lambda (_1070 id1071 val1072 e11073 e21074) + (chi-let1042 + e1057 + r1058 + w1059 + s1060 + mod1061 + build-let95 + id1071 + val1072 + (cons e11073 e21074))) + tmp1063) + ((lambda (tmp1078) + (if (if tmp1078 + (apply (lambda (_1079 + f1080 + id1081 + val1082 + e11083 + e21084) + (if (id?115 f1080) + (and-map id?115 id1081) #f)) - tmp1075) + tmp1078) #f) - (apply (lambda (_1083 - f1084 - id1085 - val1086 - e11087 - e21088) - (chi-let1039 - e1054 - r1055 - w1056 - s1057 - mod1058 - build-named-let95 - (cons f1084 id1085) - val1086 - (cons e11087 e21088))) - tmp1075) - ((lambda (_1092) + (apply (lambda (_1086 + f1087 + id1088 + val1089 + e11090 + e21091) + (chi-let1042 + e1057 + r1058 + w1059 + s1060 + mod1061 + build-named-let96 + (cons f1087 id1088) + val1089 + (cons e11090 e21091))) + tmp1078) + ((lambda (_1095) (syntax-violation 'let "bad let" - (source-wrap143 e1054 w1056 s1057 mod1058))) - tmp1059))) + (source-wrap144 e1057 w1059 s1060 mod1061))) + tmp1062))) ($sc-dispatch - tmp1059 + tmp1062 '(any any #(each (any any)) any . each-any))))) ($sc-dispatch - tmp1059 + tmp1062 '(any #(each (any any)) any . each-any)))) - e1054)))) - (global-extend112 + e1057)))) + (global-extend113 'core 'letrec - (lambda (e1093 r1094 w1095 s1096 mod1097) - ((lambda (tmp1098) - ((lambda (tmp1099) - (if (if tmp1099 - (apply (lambda (_1100 id1101 val1102 e11103 e21104) - (and-map id?114 id1101)) - tmp1099) + (lambda (e1096 r1097 w1098 s1099 mod1100) + ((lambda (tmp1101) + ((lambda (tmp1102) + (if (if tmp1102 + (apply (lambda (_1103 id1104 val1105 e11106 e21107) + (and-map id?115 id1104)) + tmp1102) #f) - (apply (lambda (_1106 id1107 val1108 e11109 e21110) - (let ((ids1111 id1107)) - (if (not (valid-bound-ids?139 ids1111)) + (apply (lambda (_1109 id1110 val1111 e11112 e21113) + (let ((ids1114 id1110)) + (if (not (valid-bound-ids?140 ids1114)) (syntax-violation 'letrec "duplicate bound variable" - e1093) - (let ((labels1113 (gen-labels120 ids1111)) - (new-vars1114 (map gen-var161 ids1111))) - (let ((w1115 (make-binding-wrap131 - ids1111 - labels1113 - w1095)) - (r1116 (extend-var-env109 - labels1113 - new-vars1114 - r1094))) - (build-letrec96 - s1096 - (map syntax->datum ids1111) - new-vars1114 - (map (lambda (x1117) - (chi150 x1117 r1116 w1115 mod1097)) - val1108) - (chi-body154 - (cons e11109 e21110) - (source-wrap143 - e1093 - w1115 - s1096 - mod1097) - r1116 - w1115 - mod1097))))))) - tmp1099) - ((lambda (_1120) + e1096) + (let ((labels1116 (gen-labels121 ids1114)) + (new-vars1117 (map gen-var162 ids1114))) + (let ((w1118 (make-binding-wrap132 + ids1114 + labels1116 + w1098)) + (r1119 (extend-var-env110 + labels1116 + new-vars1117 + r1097))) + (build-letrec97 + s1099 + (map syntax->datum ids1114) + new-vars1117 + (map (lambda (x1120) + (chi151 x1120 r1119 w1118 mod1100)) + val1111) + (chi-body155 + (cons e11112 e21113) + (source-wrap144 + e1096 + w1118 + s1099 + mod1100) + r1119 + w1118 + mod1100))))))) + tmp1102) + ((lambda (_1123) (syntax-violation 'letrec "bad letrec" - (source-wrap143 e1093 w1095 s1096 mod1097))) - tmp1098))) + (source-wrap144 e1096 w1098 s1099 mod1100))) + tmp1101))) ($sc-dispatch - tmp1098 + tmp1101 '(any #(each (any any)) any . each-any)))) - e1093))) - (global-extend112 + e1096))) + (global-extend113 'core 'set! - (lambda (e1121 r1122 w1123 s1124 mod1125) - ((lambda (tmp1126) - ((lambda (tmp1127) - (if (if tmp1127 - (apply (lambda (_1128 id1129 val1130) (id?114 id1129)) - tmp1127) + (lambda (e1124 r1125 w1126 s1127 mod1128) + ((lambda (tmp1129) + ((lambda (tmp1130) + (if (if tmp1130 + (apply (lambda (_1131 id1132 val1133) (id?115 id1132)) + tmp1130) #f) - (apply (lambda (_1131 id1132 val1133) - (let ((val1134 (chi150 val1133 r1122 w1123 mod1125)) - (n1135 (id-var-name136 id1132 w1123))) - (let ((b1136 (lookup111 n1135 r1122 mod1125))) - (let ((atom-key1137 (binding-type106 b1136))) - (if (memv atom-key1137 (quote (lexical))) - (build-lexical-assignment84 - s1124 - (syntax->datum id1132) - (binding-value107 b1136) - val1134) - (if (memv atom-key1137 (quote (global))) - (build-global-assignment87 - s1124 - n1135 - val1134 - mod1125) - (if (memv atom-key1137 + (apply (lambda (_1134 id1135 val1136) + (let ((val1137 (chi151 val1136 r1125 w1126 mod1128)) + (n1138 (id-var-name137 id1135 w1126))) + (let ((b1139 (lookup112 n1138 r1125 mod1128))) + (let ((atom-key1140 (binding-type107 b1139))) + (if (memv atom-key1140 (quote (lexical))) + (build-lexical-assignment85 + s1127 + (syntax->datum id1135) + (binding-value108 b1139) + val1137) + (if (memv atom-key1140 (quote (global))) + (build-global-assignment88 + s1127 + n1138 + val1137 + mod1128) + (if (memv atom-key1140 '(displaced-lexical)) (syntax-violation 'set! "identifier out of context" - (wrap142 id1132 w1123 mod1125)) + (wrap143 id1135 w1126 mod1128)) (syntax-violation 'set! "bad set!" - (source-wrap143 - e1121 - w1123 - s1124 - mod1125))))))))) - tmp1127) - ((lambda (tmp1138) - (if tmp1138 - (apply (lambda (_1139 head1140 tail1141 val1142) + (source-wrap144 + e1124 + w1126 + s1127 + mod1128))))))))) + tmp1130) + ((lambda (tmp1141) + (if tmp1141 + (apply (lambda (_1142 head1143 tail1144 val1145) (call-with-values (lambda () - (syntax-type148 - head1140 - r1122 + (syntax-type149 + head1143 + r1125 '(()) #f #f - mod1125 + mod1128 #t)) - (lambda (type1143 - value1144 - ee1145 - ww1146 - ss1147 - modmod1148) - (if (memv type1143 (quote (module-ref))) - (let ((val1149 - (chi150 - val1142 - r1122 - w1123 - mod1125))) + (lambda (type1146 + value1147 + ee1148 + ww1149 + ss1150 + modmod1151) + (if (memv type1146 (quote (module-ref))) + (let ((val1152 + (chi151 + val1145 + r1125 + w1126 + mod1128))) (call-with-values (lambda () - (value1144 - (cons head1140 tail1141))) - (lambda (id1151 mod1152) - (build-global-assignment87 - s1124 - id1151 - val1149 - mod1152)))) - (build-application81 - s1124 - (chi150 + (value1147 + (cons head1143 tail1144))) + (lambda (id1154 mod1155) + (build-global-assignment88 + s1127 + id1154 + val1152 + mod1155)))) + (build-application82 + s1127 + (chi151 (list '#(syntax-object setter ((top) @@ -6189,6 +6249,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -6310,6 +6371,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -6421,6 +6483,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -6428,47 +6491,47 @@ ((top) (top)) ("i" "i"))) (hygiene guile)) - head1140) - r1122 - w1123 - mod1125) - (map (lambda (e1153) - (chi150 - e1153 - r1122 - w1123 - mod1125)) + head1143) + r1125 + w1126 + mod1128) + (map (lambda (e1156) + (chi151 + e1156 + r1125 + w1126 + mod1128)) (append - tail1141 - (list val1142)))))))) - tmp1138) - ((lambda (_1155) + tail1144 + (list val1145)))))))) + tmp1141) + ((lambda (_1158) (syntax-violation 'set! "bad set!" - (source-wrap143 e1121 w1123 s1124 mod1125))) - tmp1126))) + (source-wrap144 e1124 w1126 s1127 mod1128))) + tmp1129))) ($sc-dispatch - tmp1126 + tmp1129 '(any (any . each-any) any))))) - ($sc-dispatch tmp1126 (quote (any any any))))) - e1121))) - (global-extend112 + ($sc-dispatch tmp1129 (quote (any any any))))) + e1124))) + (global-extend113 'module-ref '@ - (lambda (e1156) - ((lambda (tmp1157) - ((lambda (tmp1158) - (if (if tmp1158 - (apply (lambda (_1159 mod1160 id1161) - (if (and-map id?114 mod1160) - (id?114 id1161) + (lambda (e1159) + ((lambda (tmp1160) + ((lambda (tmp1161) + (if (if tmp1161 + (apply (lambda (_1162 mod1163 id1164) + (if (and-map id?115 mod1163) + (id?115 id1164) #f)) - tmp1158) + tmp1161) #f) - (apply (lambda (_1163 mod1164 id1165) + (apply (lambda (_1166 mod1167 id1168) (values - (syntax->datum id1165) + (syntax->datum id1168) (syntax->datum (cons '#(syntax-object public @@ -6580,6 +6643,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -6701,6 +6765,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -6812,36 +6877,37 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure and-map*) ((top) (top)) ("i" "i"))) (hygiene guile)) - mod1164)))) - tmp1158) + mod1167)))) + tmp1161) (syntax-violation #f "source expression failed to match any pattern" - tmp1157))) - ($sc-dispatch tmp1157 (quote (any each-any any))))) - e1156))) - (global-extend112 + tmp1160))) + ($sc-dispatch tmp1160 (quote (any each-any any))))) + e1159))) + (global-extend113 'module-ref '@@ - (lambda (e1167) - ((lambda (tmp1168) - ((lambda (tmp1169) - (if (if tmp1169 - (apply (lambda (_1170 mod1171 id1172) - (if (and-map id?114 mod1171) - (id?114 id1172) + (lambda (e1170) + ((lambda (tmp1171) + ((lambda (tmp1172) + (if (if tmp1172 + (apply (lambda (_1173 mod1174 id1175) + (if (and-map id?115 mod1174) + (id?115 id1175) #f)) - tmp1169) + tmp1172) #f) - (apply (lambda (_1174 mod1175 id1176) + (apply (lambda (_1177 mod1178 id1179) (values - (syntax->datum id1176) + (syntax->datum id1179) (syntax->datum (cons '#(syntax-object private @@ -6953,6 +7019,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -7074,6 +7141,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -7185,90 +7253,91 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure and-map*) ((top) (top)) ("i" "i"))) (hygiene guile)) - mod1175)))) - tmp1169) + mod1178)))) + tmp1172) (syntax-violation #f "source expression failed to match any pattern" - tmp1168))) - ($sc-dispatch tmp1168 (quote (any each-any any))))) - e1167))) - (global-extend112 + tmp1171))) + ($sc-dispatch tmp1171 (quote (any each-any any))))) + e1170))) + (global-extend113 'core 'if - (lambda (e1178 r1179 w1180 s1181 mod1182) - ((lambda (tmp1183) - ((lambda (tmp1184) - (if tmp1184 - (apply (lambda (_1185 test1186 then1187) - (build-conditional82 - s1181 - (chi150 test1186 r1179 w1180 mod1182) - (chi150 then1187 r1179 w1180 mod1182) - (build-void80 #f))) - tmp1184) - ((lambda (tmp1188) - (if tmp1188 - (apply (lambda (_1189 test1190 then1191 else1192) - (build-conditional82 - s1181 - (chi150 test1190 r1179 w1180 mod1182) - (chi150 then1191 r1179 w1180 mod1182) - (chi150 else1192 r1179 w1180 mod1182))) - tmp1188) + (lambda (e1181 r1182 w1183 s1184 mod1185) + ((lambda (tmp1186) + ((lambda (tmp1187) + (if tmp1187 + (apply (lambda (_1188 test1189 then1190) + (build-conditional83 + s1184 + (chi151 test1189 r1182 w1183 mod1185) + (chi151 then1190 r1182 w1183 mod1185) + (build-void81 #f))) + tmp1187) + ((lambda (tmp1191) + (if tmp1191 + (apply (lambda (_1192 test1193 then1194 else1195) + (build-conditional83 + s1184 + (chi151 test1193 r1182 w1183 mod1185) + (chi151 then1194 r1182 w1183 mod1185) + (chi151 else1195 r1182 w1183 mod1185))) + tmp1191) (syntax-violation #f "source expression failed to match any pattern" - tmp1183))) - ($sc-dispatch tmp1183 (quote (any any any any)))))) - ($sc-dispatch tmp1183 (quote (any any any))))) - e1178))) - (global-extend112 + tmp1186))) + ($sc-dispatch tmp1186 (quote (any any any any)))))) + ($sc-dispatch tmp1186 (quote (any any any))))) + e1181))) + (global-extend113 'begin 'begin '()) - (global-extend112 + (global-extend113 'define 'define '()) - (global-extend112 + (global-extend113 'define-syntax 'define-syntax '()) - (global-extend112 + (global-extend113 'eval-when 'eval-when '()) - (global-extend112 + (global-extend113 'core 'syntax-case - (letrec ((gen-syntax-case1196 - (lambda (x1197 keys1198 clauses1199 r1200 mod1201) - (if (null? clauses1199) - (build-application81 + (letrec ((gen-syntax-case1199 + (lambda (x1200 keys1201 clauses1202 r1203 mod1204) + (if (null? clauses1202) + (build-application82 #f - (build-primref91 #f (quote syntax-violation)) - (list (build-data92 #f #f) - (build-data92 + (build-primref92 #f (quote syntax-violation)) + (list (build-data93 #f #f) + (build-data93 #f "source expression failed to match any pattern") - x1197)) - ((lambda (tmp1202) - ((lambda (tmp1203) - (if tmp1203 - (apply (lambda (pat1204 exp1205) - (if (if (id?114 pat1204) + x1200)) + ((lambda (tmp1205) + ((lambda (tmp1206) + (if tmp1206 + (apply (lambda (pat1207 exp1208) + (if (if (id?115 pat1207) (and-map - (lambda (x1206) - (not (free-id=?137 - pat1204 - x1206))) + (lambda (x1209) + (not (free-id=?138 + pat1207 + x1209))) (cons '#(syntax-object ... ((top) @@ -7404,6 +7473,7 @@ build-conditional build-application build-void + decorate-source get-global-definition-hook put-global-definition-hook gensym-hook @@ -7525,6 +7595,7 @@ (top) (top) (top) + (top) (top)) ("i" "i" @@ -7636,6 +7707,7 @@ "i" "i" "i" + "i" "i")) #(ribcage (define-structure @@ -7643,620 +7715,620 @@ ((top) (top)) ("i" "i"))) (hygiene guile)) - keys1198)) + keys1201)) #f) - (let ((labels1207 - (list (gen-label119))) - (var1208 (gen-var161 pat1204))) - (build-application81 + (let ((labels1210 + (list (gen-label120))) + (var1211 (gen-var162 pat1207))) + (build-application82 #f - (build-lambda90 + (build-lambda91 #f - (list (syntax->datum pat1204)) - (list var1208) + (list (syntax->datum pat1207)) + (list var1211) #f - (chi150 - exp1205 - (extend-env108 - labels1207 + (chi151 + exp1208 + (extend-env109 + labels1210 (list (cons 'syntax - (cons var1208 + (cons var1211 0))) - r1200) - (make-binding-wrap131 - (list pat1204) - labels1207 + r1203) + (make-binding-wrap132 + (list pat1207) + labels1210 '(())) - mod1201)) - (list x1197))) - (gen-clause1195 - x1197 - keys1198 - (cdr clauses1199) - r1200 - pat1204 + mod1204)) + (list x1200))) + (gen-clause1198 + x1200 + keys1201 + (cdr clauses1202) + r1203 + pat1207 #t - exp1205 - mod1201))) - tmp1203) - ((lambda (tmp1209) - (if tmp1209 - (apply (lambda (pat1210 fender1211 exp1212) - (gen-clause1195 - x1197 - keys1198 - (cdr clauses1199) - r1200 - pat1210 - fender1211 - exp1212 - mod1201)) - tmp1209) - ((lambda (_1213) + exp1208 + mod1204))) + tmp1206) + ((lambda (tmp1212) + (if tmp1212 + (apply (lambda (pat1213 fender1214 exp1215) + (gen-clause1198 + x1200 + keys1201 + (cdr clauses1202) + r1203 + pat1213 + fender1214 + exp1215 + mod1204)) + tmp1212) + ((lambda (_1216) (syntax-violation 'syntax-case "invalid clause" - (car clauses1199))) - tmp1202))) - ($sc-dispatch tmp1202 (quote (any any any)))))) - ($sc-dispatch tmp1202 (quote (any any))))) - (car clauses1199))))) - (gen-clause1195 - (lambda (x1214 - keys1215 - clauses1216 - r1217 - pat1218 - fender1219 - exp1220 - mod1221) + (car clauses1202))) + tmp1205))) + ($sc-dispatch tmp1205 (quote (any any any)))))) + ($sc-dispatch tmp1205 (quote (any any))))) + (car clauses1202))))) + (gen-clause1198 + (lambda (x1217 + keys1218 + clauses1219 + r1220 + pat1221 + fender1222 + exp1223 + mod1224) (call-with-values (lambda () - (convert-pattern1193 pat1218 keys1215)) - (lambda (p1222 pvars1223) - (if (not (distinct-bound-ids?140 (map car pvars1223))) + (convert-pattern1196 pat1221 keys1218)) + (lambda (p1225 pvars1226) + (if (not (distinct-bound-ids?141 (map car pvars1226))) (syntax-violation 'syntax-case "duplicate pattern variable" - pat1218) + pat1221) (if (not (and-map - (lambda (x1224) - (not (ellipsis?159 (car x1224)))) - pvars1223)) + (lambda (x1227) + (not (ellipsis?160 (car x1227)))) + pvars1226)) (syntax-violation 'syntax-case "misplaced ellipsis" - pat1218) - (let ((y1225 (gen-var161 (quote tmp)))) - (build-application81 + pat1221) + (let ((y1228 (gen-var162 (quote tmp)))) + (build-application82 #f - (build-lambda90 + (build-lambda91 #f (list (quote tmp)) - (list y1225) + (list y1228) #f - (let ((y1226 (build-lexical-reference83 + (let ((y1229 (build-lexical-reference84 'value #f 'tmp - y1225))) - (build-conditional82 + y1228))) + (build-conditional83 #f - ((lambda (tmp1227) - ((lambda (tmp1228) - (if tmp1228 - (apply (lambda () y1226) - tmp1228) - ((lambda (_1229) - (build-conditional82 + ((lambda (tmp1230) + ((lambda (tmp1231) + (if tmp1231 + (apply (lambda () y1229) + tmp1231) + ((lambda (_1232) + (build-conditional83 #f - y1226 - (build-dispatch-call1194 - pvars1223 - fender1219 - y1226 - r1217 - mod1221) - (build-data92 #f #f))) - tmp1227))) + y1229 + (build-dispatch-call1197 + pvars1226 + fender1222 + y1229 + r1220 + mod1224) + (build-data93 #f #f))) + tmp1230))) ($sc-dispatch - tmp1227 + tmp1230 '#(atom #t)))) - fender1219) - (build-dispatch-call1194 - pvars1223 - exp1220 - y1226 - r1217 - mod1221) - (gen-syntax-case1196 - x1214 - keys1215 - clauses1216 - r1217 - mod1221)))) - (list (if (eq? p1222 (quote any)) - (build-application81 + fender1222) + (build-dispatch-call1197 + pvars1226 + exp1223 + y1229 + r1220 + mod1224) + (gen-syntax-case1199 + x1217 + keys1218 + clauses1219 + r1220 + mod1224)))) + (list (if (eq? p1225 (quote any)) + (build-application82 #f - (build-primref91 #f (quote list)) - (list x1214)) - (build-application81 + (build-primref92 #f (quote list)) + (list x1217)) + (build-application82 #f - (build-primref91 + (build-primref92 #f '$sc-dispatch) - (list x1214 - (build-data92 + (list x1217 + (build-data93 #f - p1222))))))))))))) - (build-dispatch-call1194 - (lambda (pvars1230 exp1231 y1232 r1233 mod1234) - (let ((ids1235 (map car pvars1230)) - (levels1236 (map cdr pvars1230))) - (let ((labels1237 (gen-labels120 ids1235)) - (new-vars1238 (map gen-var161 ids1235))) - (build-application81 + p1225))))))))))))) + (build-dispatch-call1197 + (lambda (pvars1233 exp1234 y1235 r1236 mod1237) + (let ((ids1238 (map car pvars1233)) + (levels1239 (map cdr pvars1233))) + (let ((labels1240 (gen-labels121 ids1238)) + (new-vars1241 (map gen-var162 ids1238))) + (build-application82 #f - (build-primref91 #f (quote apply)) - (list (build-lambda90 + (build-primref92 #f (quote apply)) + (list (build-lambda91 #f - (map syntax->datum ids1235) - new-vars1238 + (map syntax->datum ids1238) + new-vars1241 #f - (chi150 - exp1231 - (extend-env108 - labels1237 - (map (lambda (var1239 level1240) + (chi151 + exp1234 + (extend-env109 + labels1240 + (map (lambda (var1242 level1243) (cons 'syntax - (cons var1239 level1240))) - new-vars1238 - (map cdr pvars1230)) - r1233) - (make-binding-wrap131 - ids1235 - labels1237 + (cons var1242 level1243))) + new-vars1241 + (map cdr pvars1233)) + r1236) + (make-binding-wrap132 + ids1238 + labels1240 '(())) - mod1234)) - y1232)))))) - (convert-pattern1193 - (lambda (pattern1241 keys1242) - (letrec ((cvt1243 - (lambda (p1244 n1245 ids1246) - (if (id?114 p1244) - (if (bound-id-member?141 p1244 keys1242) + mod1237)) + y1235)))))) + (convert-pattern1196 + (lambda (pattern1244 keys1245) + (letrec ((cvt1246 + (lambda (p1247 n1248 ids1249) + (if (id?115 p1247) + (if (bound-id-member?142 p1247 keys1245) (values - (vector (quote free-id) p1244) - ids1246) + (vector (quote free-id) p1247) + ids1249) (values 'any - (cons (cons p1244 n1245) ids1246))) - ((lambda (tmp1247) - ((lambda (tmp1248) - (if (if tmp1248 - (apply (lambda (x1249 dots1250) - (ellipsis?159 - dots1250)) - tmp1248) + (cons (cons p1247 n1248) ids1249))) + ((lambda (tmp1250) + ((lambda (tmp1251) + (if (if tmp1251 + (apply (lambda (x1252 dots1253) + (ellipsis?160 + dots1253)) + tmp1251) #f) - (apply (lambda (x1251 dots1252) + (apply (lambda (x1254 dots1255) (call-with-values (lambda () - (cvt1243 - x1251 - (fx+72 n1245 1) - ids1246)) - (lambda (p1253 ids1254) + (cvt1246 + x1254 + (fx+72 n1248 1) + ids1249)) + (lambda (p1256 ids1257) (values - (if (eq? p1253 + (if (eq? p1256 'any) 'each-any (vector 'each - p1253)) - ids1254)))) - tmp1248) - ((lambda (tmp1255) - (if tmp1255 - (apply (lambda (x1256 y1257) + p1256)) + ids1257)))) + tmp1251) + ((lambda (tmp1258) + (if tmp1258 + (apply (lambda (x1259 y1260) (call-with-values (lambda () - (cvt1243 - y1257 - n1245 - ids1246)) - (lambda (y1258 - ids1259) + (cvt1246 + y1260 + n1248 + ids1249)) + (lambda (y1261 + ids1262) (call-with-values (lambda () - (cvt1243 - x1256 - n1245 - ids1259)) - (lambda (x1260 - ids1261) + (cvt1246 + x1259 + n1248 + ids1262)) + (lambda (x1263 + ids1264) (values - (cons x1260 - y1258) - ids1261)))))) - tmp1255) - ((lambda (tmp1262) - (if tmp1262 + (cons x1263 + y1261) + ids1264)))))) + tmp1258) + ((lambda (tmp1265) + (if tmp1265 (apply (lambda () (values '() - ids1246)) - tmp1262) - ((lambda (tmp1263) - (if tmp1263 - (apply (lambda (x1264) + ids1249)) + tmp1265) + ((lambda (tmp1266) + (if tmp1266 + (apply (lambda (x1267) (call-with-values (lambda () - (cvt1243 - x1264 - n1245 - ids1246)) - (lambda (p1266 - ids1267) + (cvt1246 + x1267 + n1248 + ids1249)) + (lambda (p1269 + ids1270) (values (vector 'vector - p1266) - ids1267)))) - tmp1263) - ((lambda (x1268) + p1269) + ids1270)))) + tmp1266) + ((lambda (x1271) (values (vector 'atom - (strip160 - p1244 + (strip161 + p1247 '(()))) - ids1246)) - tmp1247))) + ids1249)) + tmp1250))) ($sc-dispatch - tmp1247 + tmp1250 '#(vector each-any))))) ($sc-dispatch - tmp1247 + tmp1250 '())))) ($sc-dispatch - tmp1247 + tmp1250 '(any . any))))) ($sc-dispatch - tmp1247 + tmp1250 '(any any)))) - p1244))))) - (cvt1243 pattern1241 0 (quote ())))))) - (lambda (e1269 r1270 w1271 s1272 mod1273) - (let ((e1274 (source-wrap143 e1269 w1271 s1272 mod1273))) - ((lambda (tmp1275) - ((lambda (tmp1276) - (if tmp1276 - (apply (lambda (_1277 val1278 key1279 m1280) + p1247))))) + (cvt1246 pattern1244 0 (quote ())))))) + (lambda (e1272 r1273 w1274 s1275 mod1276) + (let ((e1277 (source-wrap144 e1272 w1274 s1275 mod1276))) + ((lambda (tmp1278) + ((lambda (tmp1279) + (if tmp1279 + (apply (lambda (_1280 val1281 key1282 m1283) (if (and-map - (lambda (x1281) - (if (id?114 x1281) - (not (ellipsis?159 x1281)) + (lambda (x1284) + (if (id?115 x1284) + (not (ellipsis?160 x1284)) #f)) - key1279) - (let ((x1283 (gen-var161 (quote tmp)))) - (build-application81 - s1272 - (build-lambda90 + key1282) + (let ((x1286 (gen-var162 (quote tmp)))) + (build-application82 + s1275 + (build-lambda91 #f (list (quote tmp)) - (list x1283) + (list x1286) #f - (gen-syntax-case1196 - (build-lexical-reference83 + (gen-syntax-case1199 + (build-lexical-reference84 'value #f 'tmp - x1283) - key1279 - m1280 - r1270 - mod1273)) - (list (chi150 - val1278 - r1270 + x1286) + key1282 + m1283 + r1273 + mod1276)) + (list (chi151 + val1281 + r1273 '(()) - mod1273)))) + mod1276)))) (syntax-violation 'syntax-case "invalid literals list" - e1274))) - tmp1276) + e1277))) + tmp1279) (syntax-violation #f "source expression failed to match any pattern" - tmp1275))) + tmp1278))) ($sc-dispatch - tmp1275 + tmp1278 '(any any each-any . each-any)))) - e1274))))) + e1277))))) (set! sc-expand - (lambda (x1287 . rest1286) - (if (if (pair? x1287) - (equal? (car x1287) noexpand70) + (lambda (x1290 . rest1289) + (if (if (pair? x1290) + (equal? (car x1290) noexpand70) #f) - (cadr x1287) - (let ((m1288 (if (null? rest1286) (quote e) (car rest1286))) - (esew1289 - (if (let ((t1290 (null? rest1286))) - (if t1290 t1290 (null? (cdr rest1286)))) + (cadr x1290) + (let ((m1291 (if (null? rest1289) (quote e) (car rest1289))) + (esew1292 + (if (let ((t1293 (null? rest1289))) + (if t1293 t1293 (null? (cdr rest1289)))) '(eval) - (cadr rest1286)))) + (cadr rest1289)))) (with-fluid* *mode*71 - m1288 + m1291 (lambda () - (chi-top149 - x1287 + (chi-top150 + x1290 '() '((top)) - m1288 - esew1289 + m1291 + esew1292 (cons 'hygiene (module-name (current-module)))))))))) (set! identifier? - (lambda (x1291) (nonsymbol-id?113 x1291))) + (lambda (x1294) (nonsymbol-id?114 x1294))) (set! datum->syntax - (lambda (id1292 datum1293) - (make-syntax-object97 - datum1293 - (syntax-object-wrap100 id1292) + (lambda (id1295 datum1296) + (make-syntax-object98 + datum1296 + (syntax-object-wrap101 id1295) #f))) (set! syntax->datum - (lambda (x1294) (strip160 x1294 (quote (()))))) + (lambda (x1297) (strip161 x1297 (quote (()))))) (set! generate-temporaries - (lambda (ls1295) + (lambda (ls1298) (begin - (let ((x1296 ls1295)) - (if (not (list? x1296)) + (let ((x1299 ls1298)) + (if (not (list? x1299)) (syntax-violation 'generate-temporaries "invalid argument" - x1296))) - (map (lambda (x1297) - (wrap142 (gensym) (quote ((top))) #f)) - ls1295)))) + x1299))) + (map (lambda (x1300) + (wrap143 (gensym) (quote ((top))) #f)) + ls1298)))) (set! free-identifier=? - (lambda (x1298 y1299) + (lambda (x1301 y1302) (begin - (let ((x1300 x1298)) - (if (not (nonsymbol-id?113 x1300)) + (let ((x1303 x1301)) + (if (not (nonsymbol-id?114 x1303)) (syntax-violation 'free-identifier=? "invalid argument" - x1300))) - (let ((x1301 y1299)) - (if (not (nonsymbol-id?113 x1301)) + x1303))) + (let ((x1304 y1302)) + (if (not (nonsymbol-id?114 x1304)) (syntax-violation 'free-identifier=? "invalid argument" - x1301))) - (free-id=?137 x1298 y1299)))) - (set! bound-identifier=? - (lambda (x1302 y1303) - (begin - (let ((x1304 x1302)) - (if (not (nonsymbol-id?113 x1304)) - (syntax-violation - 'bound-identifier=? - "invalid argument" x1304))) - (let ((x1305 y1303)) - (if (not (nonsymbol-id?113 x1305)) + (free-id=?138 x1301 y1302)))) + (set! bound-identifier=? + (lambda (x1305 y1306) + (begin + (let ((x1307 x1305)) + (if (not (nonsymbol-id?114 x1307)) (syntax-violation 'bound-identifier=? "invalid argument" - x1305))) - (bound-id=?138 x1302 y1303)))) + x1307))) + (let ((x1308 y1306)) + (if (not (nonsymbol-id?114 x1308)) + (syntax-violation + 'bound-identifier=? + "invalid argument" + x1308))) + (bound-id=?139 x1305 y1306)))) (set! syntax-violation - (lambda (who1309 message1308 form1307 . subform1306) + (lambda (who1312 message1311 form1310 . subform1309) (begin - (let ((x1310 who1309)) - (if (not ((lambda (x1311) - (let ((t1312 (not x1311))) - (if t1312 - t1312 - (let ((t1313 (string? x1311))) - (if t1313 t1313 (symbol? x1311)))))) - x1310)) + (let ((x1313 who1312)) + (if (not ((lambda (x1314) + (let ((t1315 (not x1314))) + (if t1315 + t1315 + (let ((t1316 (string? x1314))) + (if t1316 t1316 (symbol? x1314)))))) + x1313)) (syntax-violation 'syntax-violation "invalid argument" - x1310))) - (let ((x1314 message1308)) - (if (not (string? x1314)) + x1313))) + (let ((x1317 message1311)) + (if (not (string? x1317)) (syntax-violation 'syntax-violation "invalid argument" - x1314))) + x1317))) (scm-error 'syntax-error 'sc-expand (string-append - (if who1309 "~a: " "") + (if who1312 "~a: " "") "~a " - (if (null? subform1306) + (if (null? subform1309) "in ~a" "in subform `~s' of `~s'")) - (let ((tail1315 - (cons message1308 - (map (lambda (x1316) (strip160 x1316 (quote (())))) - (append subform1306 (list form1307)))))) - (if who1309 (cons who1309 tail1315) tail1315)) + (let ((tail1318 + (cons message1311 + (map (lambda (x1319) (strip161 x1319 (quote (())))) + (append subform1309 (list form1310)))))) + (if who1312 (cons who1312 tail1318) tail1318)) #f)))) - (letrec ((match1321 - (lambda (e1322 p1323 w1324 r1325 mod1326) - (if (not r1325) + (letrec ((match1324 + (lambda (e1325 p1326 w1327 r1328 mod1329) + (if (not r1328) #f - (if (eq? p1323 (quote any)) - (cons (wrap142 e1322 w1324 mod1326) r1325) - (if (syntax-object?98 e1322) - (match*1320 - (syntax-object-expression99 e1322) - p1323 - (join-wraps133 - w1324 - (syntax-object-wrap100 e1322)) - r1325 - (syntax-object-module101 e1322)) - (match*1320 e1322 p1323 w1324 r1325 mod1326)))))) - (match*1320 - (lambda (e1327 p1328 w1329 r1330 mod1331) - (if (null? p1328) - (if (null? e1327) r1330 #f) - (if (pair? p1328) - (if (pair? e1327) - (match1321 - (car e1327) - (car p1328) - w1329 - (match1321 - (cdr e1327) - (cdr p1328) - w1329 - r1330 - mod1331) - mod1331) + (if (eq? p1326 (quote any)) + (cons (wrap143 e1325 w1327 mod1329) r1328) + (if (syntax-object?99 e1325) + (match*1323 + (syntax-object-expression100 e1325) + p1326 + (join-wraps134 + w1327 + (syntax-object-wrap101 e1325)) + r1328 + (syntax-object-module102 e1325)) + (match*1323 e1325 p1326 w1327 r1328 mod1329)))))) + (match*1323 + (lambda (e1330 p1331 w1332 r1333 mod1334) + (if (null? p1331) + (if (null? e1330) r1333 #f) + (if (pair? p1331) + (if (pair? e1330) + (match1324 + (car e1330) + (car p1331) + w1332 + (match1324 + (cdr e1330) + (cdr p1331) + w1332 + r1333 + mod1334) + mod1334) #f) - (if (eq? p1328 (quote each-any)) - (let ((l1332 (match-each-any1318 - e1327 - w1329 - mod1331))) - (if l1332 (cons l1332 r1330) #f)) - (let ((atom-key1333 (vector-ref p1328 0))) - (if (memv atom-key1333 (quote (each))) - (if (null? e1327) - (match-empty1319 (vector-ref p1328 1) r1330) - (let ((l1334 (match-each1317 - e1327 - (vector-ref p1328 1) - w1329 - mod1331))) - (if l1334 - (letrec ((collect1335 - (lambda (l1336) - (if (null? (car l1336)) - r1330 - (cons (map car l1336) - (collect1335 - (map cdr l1336))))))) - (collect1335 l1334)) + (if (eq? p1331 (quote each-any)) + (let ((l1335 (match-each-any1321 + e1330 + w1332 + mod1334))) + (if l1335 (cons l1335 r1333) #f)) + (let ((atom-key1336 (vector-ref p1331 0))) + (if (memv atom-key1336 (quote (each))) + (if (null? e1330) + (match-empty1322 (vector-ref p1331 1) r1333) + (let ((l1337 (match-each1320 + e1330 + (vector-ref p1331 1) + w1332 + mod1334))) + (if l1337 + (letrec ((collect1338 + (lambda (l1339) + (if (null? (car l1339)) + r1333 + (cons (map car l1339) + (collect1338 + (map cdr l1339))))))) + (collect1338 l1337)) #f))) - (if (memv atom-key1333 (quote (free-id))) - (if (id?114 e1327) - (if (free-id=?137 - (wrap142 e1327 w1329 mod1331) - (vector-ref p1328 1)) - r1330 + (if (memv atom-key1336 (quote (free-id))) + (if (id?115 e1330) + (if (free-id=?138 + (wrap143 e1330 w1332 mod1334) + (vector-ref p1331 1)) + r1333 #f) #f) - (if (memv atom-key1333 (quote (atom))) + (if (memv atom-key1336 (quote (atom))) (if (equal? - (vector-ref p1328 1) - (strip160 e1327 w1329)) - r1330 + (vector-ref p1331 1) + (strip161 e1330 w1332)) + r1333 #f) - (if (memv atom-key1333 (quote (vector))) - (if (vector? e1327) - (match1321 - (vector->list e1327) - (vector-ref p1328 1) - w1329 - r1330 - mod1331) + (if (memv atom-key1336 (quote (vector))) + (if (vector? e1330) + (match1324 + (vector->list e1330) + (vector-ref p1331 1) + w1332 + r1333 + mod1334) #f))))))))))) - (match-empty1319 - (lambda (p1337 r1338) - (if (null? p1337) - r1338 - (if (eq? p1337 (quote any)) - (cons (quote ()) r1338) - (if (pair? p1337) - (match-empty1319 - (car p1337) - (match-empty1319 (cdr p1337) r1338)) - (if (eq? p1337 (quote each-any)) - (cons (quote ()) r1338) - (let ((atom-key1339 (vector-ref p1337 0))) - (if (memv atom-key1339 (quote (each))) - (match-empty1319 (vector-ref p1337 1) r1338) - (if (memv atom-key1339 (quote (free-id atom))) - r1338 - (if (memv atom-key1339 (quote (vector))) - (match-empty1319 - (vector-ref p1337 1) - r1338))))))))))) - (match-each-any1318 - (lambda (e1340 w1341 mod1342) - (if (pair? e1340) - (let ((l1343 (match-each-any1318 - (cdr e1340) - w1341 - mod1342))) - (if l1343 - (cons (wrap142 (car e1340) w1341 mod1342) l1343) + (match-empty1322 + (lambda (p1340 r1341) + (if (null? p1340) + r1341 + (if (eq? p1340 (quote any)) + (cons (quote ()) r1341) + (if (pair? p1340) + (match-empty1322 + (car p1340) + (match-empty1322 (cdr p1340) r1341)) + (if (eq? p1340 (quote each-any)) + (cons (quote ()) r1341) + (let ((atom-key1342 (vector-ref p1340 0))) + (if (memv atom-key1342 (quote (each))) + (match-empty1322 (vector-ref p1340 1) r1341) + (if (memv atom-key1342 (quote (free-id atom))) + r1341 + (if (memv atom-key1342 (quote (vector))) + (match-empty1322 + (vector-ref p1340 1) + r1341))))))))))) + (match-each-any1321 + (lambda (e1343 w1344 mod1345) + (if (pair? e1343) + (let ((l1346 (match-each-any1321 + (cdr e1343) + w1344 + mod1345))) + (if l1346 + (cons (wrap143 (car e1343) w1344 mod1345) l1346) #f)) - (if (null? e1340) + (if (null? e1343) '() - (if (syntax-object?98 e1340) - (match-each-any1318 - (syntax-object-expression99 e1340) - (join-wraps133 - w1341 - (syntax-object-wrap100 e1340)) - mod1342) + (if (syntax-object?99 e1343) + (match-each-any1321 + (syntax-object-expression100 e1343) + (join-wraps134 + w1344 + (syntax-object-wrap101 e1343)) + mod1345) #f))))) - (match-each1317 - (lambda (e1344 p1345 w1346 mod1347) - (if (pair? e1344) - (let ((first1348 - (match1321 - (car e1344) - p1345 - w1346 + (match-each1320 + (lambda (e1347 p1348 w1349 mod1350) + (if (pair? e1347) + (let ((first1351 + (match1324 + (car e1347) + p1348 + w1349 '() - mod1347))) - (if first1348 - (let ((rest1349 - (match-each1317 - (cdr e1344) - p1345 - w1346 - mod1347))) - (if rest1349 (cons first1348 rest1349) #f)) + mod1350))) + (if first1351 + (let ((rest1352 + (match-each1320 + (cdr e1347) + p1348 + w1349 + mod1350))) + (if rest1352 (cons first1351 rest1352) #f)) #f)) - (if (null? e1344) + (if (null? e1347) '() - (if (syntax-object?98 e1344) - (match-each1317 - (syntax-object-expression99 e1344) - p1345 - (join-wraps133 - w1346 - (syntax-object-wrap100 e1344)) - (syntax-object-module101 e1344)) + (if (syntax-object?99 e1347) + (match-each1320 + (syntax-object-expression100 e1347) + p1348 + (join-wraps134 + w1349 + (syntax-object-wrap101 e1347)) + (syntax-object-module102 e1347)) #f)))))) (set! $sc-dispatch - (lambda (e1350 p1351) - (if (eq? p1351 (quote any)) - (list e1350) - (if (syntax-object?98 e1350) - (match*1320 - (syntax-object-expression99 e1350) - p1351 - (syntax-object-wrap100 e1350) + (lambda (e1353 p1354) + (if (eq? p1354 (quote any)) + (list e1353) + (if (syntax-object?99 e1353) + (match*1323 + (syntax-object-expression100 e1353) + p1354 + (syntax-object-wrap101 e1353) '() - (syntax-object-module101 e1350)) - (match*1320 - e1350 - p1351 + (syntax-object-module102 e1353)) + (match*1323 + e1353 + p1354 '(()) '() #f))))))))) @@ -8264,11 +8336,11 @@ (define with-syntax (make-syncase-macro 'macro - (lambda (x1352) - ((lambda (tmp1353) - ((lambda (tmp1354) - (if tmp1354 - (apply (lambda (_1355 e11356 e21357) + (lambda (x1355) + ((lambda (tmp1356) + ((lambda (tmp1357) + (if tmp1357 + (apply (lambda (_1358 e11359 e21360) (cons '#(syntax-object begin ((top) @@ -8279,11 +8351,11 @@ #(ribcage () () ()) #(ribcage #(x) #((top)) #("i"))) (hygiene guile)) - (cons e11356 e21357))) - tmp1354) - ((lambda (tmp1359) - (if tmp1359 - (apply (lambda (_1360 out1361 in1362 e11363 e21364) + (cons e11359 e21360))) + tmp1357) + ((lambda (tmp1362) + (if tmp1362 + (apply (lambda (_1363 out1364 in1365 e11366 e21367) (list '#(syntax-object syntax-case ((top) @@ -8294,9 +8366,9 @@ #(ribcage () () ()) #(ribcage #(x) #((top)) #("i"))) (hygiene guile)) - in1362 + in1365 '() - (list out1361 + (list out1364 (cons '#(syntax-object begin ((top) @@ -8314,11 +8386,11 @@ #((top)) #("i"))) (hygiene guile)) - (cons e11363 e21364))))) - tmp1359) - ((lambda (tmp1366) - (if tmp1366 - (apply (lambda (_1367 out1368 in1369 e11370 e21371) + (cons e11366 e21367))))) + tmp1362) + ((lambda (tmp1369) + (if tmp1369 + (apply (lambda (_1370 out1371 in1372 e11373 e21374) (list '#(syntax-object syntax-case ((top) @@ -8346,9 +8418,9 @@ #((top)) #("i"))) (hygiene guile)) - in1369) + in1372) '() - (list out1368 + (list out1371 (cons '#(syntax-object begin ((top) @@ -8370,35 +8442,35 @@ #((top)) #("i"))) (hygiene guile)) - (cons e11370 e21371))))) - tmp1366) + (cons e11373 e21374))))) + tmp1369) (syntax-violation #f "source expression failed to match any pattern" - tmp1353))) + tmp1356))) ($sc-dispatch - tmp1353 + tmp1356 '(any #(each (any any)) any . each-any))))) ($sc-dispatch - tmp1353 + tmp1356 '(any ((any any)) any . each-any))))) ($sc-dispatch - tmp1353 + tmp1356 '(any () any . each-any)))) - x1352)))) + x1355)))) (define syntax-rules (make-syncase-macro 'macro - (lambda (x1375) - ((lambda (tmp1376) - ((lambda (tmp1377) - (if tmp1377 - (apply (lambda (_1378 - k1379 - keyword1380 - pattern1381 - template1382) + (lambda (x1378) + ((lambda (tmp1379) + ((lambda (tmp1380) + (if tmp1380 + (apply (lambda (_1381 + k1382 + keyword1383 + pattern1384 + template1385) (list '#(syntax-object lambda ((top) @@ -8439,8 +8511,8 @@ #(ribcage () () ()) #(ribcage #(x) #((top)) #("i"))) (hygiene guile)) - (cons k1379 - (map (lambda (tmp1385 tmp1384) + (cons k1382 + (map (lambda (tmp1388 tmp1387) (list (cons '#(syntax-object dummy ((top) @@ -8470,7 +8542,7 @@ #("i"))) (hygiene guile)) - tmp1384) + tmp1387) (list '#(syntax-object syntax ((top) @@ -8500,34 +8572,34 @@ #("i"))) (hygiene guile)) - tmp1385))) - template1382 - pattern1381)))))) - tmp1377) + tmp1388))) + template1385 + pattern1384)))))) + tmp1380) (syntax-violation #f "source expression failed to match any pattern" - tmp1376))) + tmp1379))) ($sc-dispatch - tmp1376 + tmp1379 '(any each-any . #(each ((any . any) any)))))) - x1375)))) + x1378)))) (define let* (make-extended-syncase-macro (module-ref (current-module) (quote let*)) 'macro - (lambda (x1386) - ((lambda (tmp1387) - ((lambda (tmp1388) - (if (if tmp1388 - (apply (lambda (let*1389 x1390 v1391 e11392 e21393) - (and-map identifier? x1390)) - tmp1388) + (lambda (x1389) + ((lambda (tmp1390) + ((lambda (tmp1391) + (if (if tmp1391 + (apply (lambda (let*1392 x1393 v1394 e11395 e21396) + (and-map identifier? x1393)) + tmp1391) #f) - (apply (lambda (let*1395 x1396 v1397 e11398 e21399) - (letrec ((f1400 (lambda (bindings1401) - (if (null? bindings1401) + (apply (lambda (let*1398 x1399 v1400 e11401 e21402) + (letrec ((f1403 (lambda (bindings1404) + (if (null? bindings1404) (cons '#(syntax-object let ((top) @@ -8551,12 +8623,12 @@ #("i"))) (hygiene guile)) (cons '() - (cons e11398 e21399))) - ((lambda (tmp1405) - ((lambda (tmp1406) - (if tmp1406 - (apply (lambda (body1407 - binding1408) + (cons e11401 e21402))) + ((lambda (tmp1408) + ((lambda (tmp1409) + (if tmp1409 + (apply (lambda (body1410 + binding1411) (list '#(syntax-object let ((top) @@ -8604,51 +8676,51 @@ #("i"))) (hygiene guile)) - (list binding1408) - body1407)) - tmp1406) + (list binding1411) + body1410)) + tmp1409) (syntax-violation #f "source expression failed to match any pattern" - tmp1405))) + tmp1408))) ($sc-dispatch - tmp1405 + tmp1408 '(any any)))) - (list (f1400 (cdr bindings1401)) - (car bindings1401))))))) - (f1400 (map list x1396 v1397)))) - tmp1388) + (list (f1403 (cdr bindings1404)) + (car bindings1404))))))) + (f1403 (map list x1399 v1400)))) + tmp1391) (syntax-violation #f "source expression failed to match any pattern" - tmp1387))) + tmp1390))) ($sc-dispatch - tmp1387 + tmp1390 '(any #(each (any any)) any . each-any)))) - x1386)))) + x1389)))) (define do (make-extended-syncase-macro (module-ref (current-module) (quote do)) 'macro - (lambda (orig-x1409) - ((lambda (tmp1410) - ((lambda (tmp1411) - (if tmp1411 - (apply (lambda (_1412 - var1413 - init1414 - step1415 - e01416 - e11417 - c1418) - ((lambda (tmp1419) - ((lambda (tmp1420) - (if tmp1420 - (apply (lambda (step1421) - ((lambda (tmp1422) - ((lambda (tmp1423) - (if tmp1423 + (lambda (orig-x1412) + ((lambda (tmp1413) + ((lambda (tmp1414) + (if tmp1414 + (apply (lambda (_1415 + var1416 + init1417 + step1418 + e01419 + e11420 + c1421) + ((lambda (tmp1422) + ((lambda (tmp1423) + (if tmp1423 + (apply (lambda (step1424) + ((lambda (tmp1425) + ((lambda (tmp1426) + (if tmp1426 (apply (lambda () (list '#(syntax-object let @@ -8729,8 +8801,8 @@ (hygiene guile)) (map list - var1413 - init1414) + var1416 + init1417) (list '#(syntax-object if ((top) @@ -8809,7 +8881,7 @@ #("i"))) (hygiene guile)) - e01416) + e01419) (cons '#(syntax-object begin ((top) @@ -8850,7 +8922,7 @@ (hygiene guile)) (append - c1418 + c1421 (list (cons '#(syntax-object doloop ((top) @@ -8890,12 +8962,12 @@ #("i"))) (hygiene guile)) - step1421))))))) - tmp1423) - ((lambda (tmp1428) - (if tmp1428 - (apply (lambda (e11429 - e21430) + step1424))))))) + tmp1426) + ((lambda (tmp1431) + (if tmp1431 + (apply (lambda (e11432 + e21433) (list '#(syntax-object let ((top) @@ -8989,8 +9061,8 @@ (hygiene guile)) (map list - var1413 - init1414) + var1416 + init1417) (list '#(syntax-object if ((top) @@ -9037,7 +9109,7 @@ #("i"))) (hygiene guile)) - e01416 + e01419 (cons '#(syntax-object begin ((top) @@ -9084,8 +9156,8 @@ #("i"))) (hygiene guile)) - (cons e11429 - e21430)) + (cons e11432 + e21433)) (cons '#(syntax-object begin ((top) @@ -9133,7 +9205,7 @@ (hygiene guile)) (append - c1418 + c1421 (list (cons '#(syntax-object doloop ((top) @@ -9180,75 +9252,75 @@ #("i"))) (hygiene guile)) - step1421))))))) - tmp1428) + step1424))))))) + tmp1431) (syntax-violation #f "source expression failed to match any pattern" - tmp1422))) + tmp1425))) ($sc-dispatch - tmp1422 + tmp1425 '(any . each-any))))) - ($sc-dispatch tmp1422 (quote ())))) - e11417)) - tmp1420) + ($sc-dispatch tmp1425 (quote ())))) + e11420)) + tmp1423) (syntax-violation #f "source expression failed to match any pattern" - tmp1419))) - ($sc-dispatch tmp1419 (quote each-any)))) - (map (lambda (v1437 s1438) - ((lambda (tmp1439) - ((lambda (tmp1440) - (if tmp1440 - (apply (lambda () v1437) tmp1440) - ((lambda (tmp1441) - (if tmp1441 - (apply (lambda (e1442) e1442) - tmp1441) - ((lambda (_1443) + tmp1422))) + ($sc-dispatch tmp1422 (quote each-any)))) + (map (lambda (v1440 s1441) + ((lambda (tmp1442) + ((lambda (tmp1443) + (if tmp1443 + (apply (lambda () v1440) tmp1443) + ((lambda (tmp1444) + (if tmp1444 + (apply (lambda (e1445) e1445) + tmp1444) + ((lambda (_1446) (syntax-violation 'do "bad step expression" - orig-x1409 - s1438)) - tmp1439))) - ($sc-dispatch tmp1439 (quote (any)))))) - ($sc-dispatch tmp1439 (quote ())))) - s1438)) - var1413 - step1415))) - tmp1411) + orig-x1412 + s1441)) + tmp1442))) + ($sc-dispatch tmp1442 (quote (any)))))) + ($sc-dispatch tmp1442 (quote ())))) + s1441)) + var1416 + step1418))) + tmp1414) (syntax-violation #f "source expression failed to match any pattern" - tmp1410))) + tmp1413))) ($sc-dispatch - tmp1410 + tmp1413 '(any #(each (any any . any)) (any . each-any) . each-any)))) - orig-x1409)))) + orig-x1412)))) (define quasiquote (make-extended-syncase-macro (module-ref (current-module) (quote quasiquote)) 'macro - (letrec ((quasicons1446 - (lambda (x1450 y1451) - ((lambda (tmp1452) - ((lambda (tmp1453) - (if tmp1453 - (apply (lambda (x1454 y1455) - ((lambda (tmp1456) - ((lambda (tmp1457) - (if tmp1457 - (apply (lambda (dy1458) - ((lambda (tmp1459) - ((lambda (tmp1460) - (if tmp1460 - (apply (lambda (dx1461) + (letrec ((quasicons1449 + (lambda (x1453 y1454) + ((lambda (tmp1455) + ((lambda (tmp1456) + (if tmp1456 + (apply (lambda (x1457 y1458) + ((lambda (tmp1459) + ((lambda (tmp1460) + (if tmp1460 + (apply (lambda (dy1461) + ((lambda (tmp1462) + ((lambda (tmp1463) + (if tmp1463 + (apply (lambda (dx1464) (list '#(syntax-object quote ((top) @@ -9297,11 +9369,11 @@ "i"))) (hygiene guile)) - (cons dx1461 - dy1458))) - tmp1460) - ((lambda (_1462) - (if (null? dy1458) + (cons dx1464 + dy1461))) + tmp1463) + ((lambda (_1465) + (if (null? dy1461) (list '#(syntax-object list ((top) @@ -9350,7 +9422,7 @@ "i"))) (hygiene guile)) - x1454) + x1457) (list '#(syntax-object cons ((top) @@ -9399,11 +9471,11 @@ "i"))) (hygiene guile)) - x1454 - y1455))) - tmp1459))) + x1457 + y1458))) + tmp1462))) ($sc-dispatch - tmp1459 + tmp1462 '(#(free-id #(syntax-object quote @@ -9446,11 +9518,11 @@ (hygiene guile))) any)))) - x1454)) - tmp1457) - ((lambda (tmp1463) - (if tmp1463 - (apply (lambda (stuff1464) + x1457)) + tmp1460) + ((lambda (tmp1466) + (if tmp1466 + (apply (lambda (stuff1467) (cons '#(syntax-object list ((top) @@ -9491,10 +9563,10 @@ "i"))) (hygiene guile)) - (cons x1454 - stuff1464))) - tmp1463) - ((lambda (else1465) + (cons x1457 + stuff1467))) + tmp1466) + ((lambda (else1468) (list '#(syntax-object cons ((top) @@ -9526,11 +9598,11 @@ "i" "i"))) (hygiene guile)) - x1454 - y1455)) - tmp1456))) + x1457 + y1458)) + tmp1459))) ($sc-dispatch - tmp1456 + tmp1459 '(#(free-id #(syntax-object list @@ -9559,7 +9631,7 @@ . any))))) ($sc-dispatch - tmp1456 + tmp1459 '(#(free-id #(syntax-object quote @@ -9583,25 +9655,25 @@ #("i" "i" "i" "i"))) (hygiene guile))) any)))) - y1455)) - tmp1453) + y1458)) + tmp1456) (syntax-violation #f "source expression failed to match any pattern" - tmp1452))) - ($sc-dispatch tmp1452 (quote (any any))))) - (list x1450 y1451)))) - (quasiappend1447 - (lambda (x1466 y1467) - ((lambda (tmp1468) - ((lambda (tmp1469) - (if tmp1469 - (apply (lambda (x1470 y1471) - ((lambda (tmp1472) - ((lambda (tmp1473) - (if tmp1473 - (apply (lambda () x1470) tmp1473) - ((lambda (_1474) + tmp1455))) + ($sc-dispatch tmp1455 (quote (any any))))) + (list x1453 y1454)))) + (quasiappend1450 + (lambda (x1469 y1470) + ((lambda (tmp1471) + ((lambda (tmp1472) + (if tmp1472 + (apply (lambda (x1473 y1474) + ((lambda (tmp1475) + ((lambda (tmp1476) + (if tmp1476 + (apply (lambda () x1473) tmp1476) + ((lambda (_1477) (list '#(syntax-object append ((top) @@ -9630,11 +9702,11 @@ (top)) #("i" "i" "i" "i"))) (hygiene guile)) - x1470 - y1471)) - tmp1472))) + x1473 + y1474)) + tmp1475))) ($sc-dispatch - tmp1472 + tmp1475 '(#(free-id #(syntax-object quote @@ -9658,22 +9730,22 @@ #("i" "i" "i" "i"))) (hygiene guile))) ())))) - y1471)) - tmp1469) + y1474)) + tmp1472) (syntax-violation #f "source expression failed to match any pattern" - tmp1468))) - ($sc-dispatch tmp1468 (quote (any any))))) - (list x1466 y1467)))) - (quasivector1448 - (lambda (x1475) - ((lambda (tmp1476) - ((lambda (x1477) - ((lambda (tmp1478) - ((lambda (tmp1479) - (if tmp1479 - (apply (lambda (x1480) + tmp1471))) + ($sc-dispatch tmp1471 (quote (any any))))) + (list x1469 y1470)))) + (quasivector1451 + (lambda (x1478) + ((lambda (tmp1479) + ((lambda (x1480) + ((lambda (tmp1481) + ((lambda (tmp1482) + (if tmp1482 + (apply (lambda (x1483) (list '#(syntax-object quote ((top) @@ -9699,11 +9771,11 @@ #((top) (top) (top) (top)) #("i" "i" "i" "i"))) (hygiene guile)) - (list->vector x1480))) - tmp1479) - ((lambda (tmp1482) - (if tmp1482 - (apply (lambda (x1483) + (list->vector x1483))) + tmp1482) + ((lambda (tmp1485) + (if tmp1485 + (apply (lambda (x1486) (cons '#(syntax-object vector ((top) @@ -9732,9 +9804,9 @@ (top)) #("i" "i" "i" "i"))) (hygiene guile)) - x1483)) - tmp1482) - ((lambda (_1485) + x1486)) + tmp1485) + ((lambda (_1488) (list '#(syntax-object list->vector ((top) @@ -9760,10 +9832,10 @@ #((top) (top) (top) (top)) #("i" "i" "i" "i"))) (hygiene guile)) - x1477)) - tmp1478))) + x1480)) + tmp1481))) ($sc-dispatch - tmp1478 + tmp1481 '(#(free-id #(syntax-object list @@ -9783,7 +9855,7 @@ . each-any))))) ($sc-dispatch - tmp1478 + tmp1481 '(#(free-id #(syntax-object quote @@ -9801,18 +9873,18 @@ #("i" "i" "i" "i"))) (hygiene guile))) each-any)))) - x1477)) - tmp1476)) - x1475))) - (quasi1449 - (lambda (p1486 lev1487) - ((lambda (tmp1488) - ((lambda (tmp1489) - (if tmp1489 - (apply (lambda (p1490) - (if (= lev1487 0) - p1490 - (quasicons1446 + x1480)) + tmp1479)) + x1478))) + (quasi1452 + (lambda (p1489 lev1490) + ((lambda (tmp1491) + ((lambda (tmp1492) + (if tmp1492 + (apply (lambda (p1493) + (if (= lev1490 0) + p1493 + (quasicons1449 '(#(syntax-object quote ((top) @@ -9847,18 +9919,18 @@ #((top) (top) (top) (top)) #("i" "i" "i" "i"))) (hygiene guile))) - (quasi1449 (list p1490) (- lev1487 1))))) - tmp1489) - ((lambda (tmp1491) - (if (if tmp1491 - (apply (lambda (args1492) (= lev1487 0)) - tmp1491) + (quasi1452 (list p1493) (- lev1490 1))))) + tmp1492) + ((lambda (tmp1494) + (if (if tmp1494 + (apply (lambda (args1495) (= lev1490 0)) + tmp1494) #f) - (apply (lambda (args1493) + (apply (lambda (args1496) (syntax-violation 'unquote "unquote takes exactly one argument" - p1486 + p1489 (cons '#(syntax-object unquote ((top) @@ -9879,17 +9951,17 @@ #((top) (top) (top) (top)) #("i" "i" "i" "i"))) (hygiene guile)) - args1493))) - tmp1491) - ((lambda (tmp1494) - (if tmp1494 - (apply (lambda (p1495 q1496) - (if (= lev1487 0) - (quasiappend1447 - p1495 - (quasi1449 q1496 lev1487)) - (quasicons1446 - (quasicons1446 + args1496))) + tmp1494) + ((lambda (tmp1497) + (if tmp1497 + (apply (lambda (p1498 q1499) + (if (= lev1490 0) + (quasiappend1450 + p1498 + (quasi1452 q1499 lev1490)) + (quasicons1449 + (quasicons1449 '(#(syntax-object quote ((top) @@ -9936,22 +10008,22 @@ (top)) #("i" "i" "i" "i"))) (hygiene guile))) - (quasi1449 - (list p1495) - (- lev1487 1))) - (quasi1449 q1496 lev1487)))) - tmp1494) - ((lambda (tmp1497) - (if (if tmp1497 - (apply (lambda (args1498 q1499) - (= lev1487 0)) - tmp1497) + (quasi1452 + (list p1498) + (- lev1490 1))) + (quasi1452 q1499 lev1490)))) + tmp1497) + ((lambda (tmp1500) + (if (if tmp1500 + (apply (lambda (args1501 q1502) + (= lev1490 0)) + tmp1500) #f) - (apply (lambda (args1500 q1501) + (apply (lambda (args1503 q1504) (syntax-violation 'unquote-splicing "unquote-splicing takes exactly one argument" - p1486 + p1489 (cons '#(syntax-object unquote-splicing ((top) @@ -9981,12 +10053,12 @@ "i" "i"))) (hygiene guile)) - args1500))) - tmp1497) - ((lambda (tmp1502) - (if tmp1502 - (apply (lambda (p1503) - (quasicons1446 + args1503))) + tmp1500) + ((lambda (tmp1505) + (if tmp1505 + (apply (lambda (p1506) + (quasicons1449 '(#(syntax-object quote ((top) @@ -10045,30 +10117,30 @@ "i" "i"))) (hygiene guile))) - (quasi1449 - (list p1503) - (+ lev1487 1)))) - tmp1502) - ((lambda (tmp1504) - (if tmp1504 - (apply (lambda (p1505 q1506) - (quasicons1446 - (quasi1449 - p1505 - lev1487) - (quasi1449 - q1506 - lev1487))) - tmp1504) - ((lambda (tmp1507) - (if tmp1507 - (apply (lambda (x1508) - (quasivector1448 - (quasi1449 - x1508 - lev1487))) - tmp1507) - ((lambda (p1510) + (quasi1452 + (list p1506) + (+ lev1490 1)))) + tmp1505) + ((lambda (tmp1507) + (if tmp1507 + (apply (lambda (p1508 q1509) + (quasicons1449 + (quasi1452 + p1508 + lev1490) + (quasi1452 + q1509 + lev1490))) + tmp1507) + ((lambda (tmp1510) + (if tmp1510 + (apply (lambda (x1511) + (quasivector1451 + (quasi1452 + x1511 + lev1490))) + tmp1510) + ((lambda (p1513) (list '#(syntax-object quote ((top) @@ -10101,16 +10173,16 @@ "i"))) (hygiene guile)) - p1510)) - tmp1488))) + p1513)) + tmp1491))) ($sc-dispatch - tmp1488 + tmp1491 '#(vector each-any))))) ($sc-dispatch - tmp1488 + tmp1491 '(any . any))))) ($sc-dispatch - tmp1488 + tmp1491 '(#(free-id #(syntax-object quasiquote @@ -10130,7 +10202,7 @@ (hygiene guile))) any))))) ($sc-dispatch - tmp1488 + tmp1491 '((#(free-id #(syntax-object unquote-splicing @@ -10153,7 +10225,7 @@ . any))))) ($sc-dispatch - tmp1488 + tmp1491 '((#(free-id #(syntax-object unquote-splicing @@ -10175,7 +10247,7 @@ . any))))) ($sc-dispatch - tmp1488 + tmp1491 '(#(free-id #(syntax-object unquote @@ -10193,7 +10265,7 @@ . any))))) ($sc-dispatch - tmp1488 + tmp1491 '(#(free-id #(syntax-object unquote @@ -10206,44 +10278,44 @@ #("i" "i" "i" "i"))) (hygiene guile))) any)))) - p1486)))) - (lambda (x1511) - ((lambda (tmp1512) - ((lambda (tmp1513) - (if tmp1513 - (apply (lambda (_1514 e1515) (quasi1449 e1515 0)) - tmp1513) + p1489)))) + (lambda (x1514) + ((lambda (tmp1515) + ((lambda (tmp1516) + (if tmp1516 + (apply (lambda (_1517 e1518) (quasi1452 e1518 0)) + tmp1516) (syntax-violation #f "source expression failed to match any pattern" - tmp1512))) - ($sc-dispatch tmp1512 (quote (any any))))) - x1511))))) + tmp1515))) + ($sc-dispatch tmp1515 (quote (any any))))) + x1514))))) (define include (make-syncase-macro 'macro - (lambda (x1516) - (letrec ((read-file1517 - (lambda (fn1518 k1519) - (let ((p1520 (open-input-file fn1518))) - (letrec ((f1521 (lambda (x1522) - (if (eof-object? x1522) + (lambda (x1519) + (letrec ((read-file1520 + (lambda (fn1521 k1522) + (let ((p1523 (open-input-file fn1521))) + (letrec ((f1524 (lambda (x1525) + (if (eof-object? x1525) (begin - (close-input-port p1520) + (close-input-port p1523) '()) - (cons (datum->syntax k1519 x1522) - (f1521 (read p1520))))))) - (f1521 (read p1520))))))) - ((lambda (tmp1523) - ((lambda (tmp1524) - (if tmp1524 - (apply (lambda (k1525 filename1526) - (let ((fn1527 (syntax->datum filename1526))) - ((lambda (tmp1528) - ((lambda (tmp1529) - (if tmp1529 - (apply (lambda (exp1530) + (cons (datum->syntax k1522 x1525) + (f1524 (read p1523))))))) + (f1524 (read p1523))))))) + ((lambda (tmp1526) + ((lambda (tmp1527) + (if tmp1527 + (apply (lambda (k1528 filename1529) + (let ((fn1530 (syntax->datum filename1529))) + ((lambda (tmp1531) + ((lambda (tmp1532) + (if tmp1532 + (apply (lambda (exp1533) (cons '#(syntax-object begin ((top) @@ -10270,73 +10342,73 @@ #((top)) #("i"))) (hygiene guile)) - exp1530)) - tmp1529) + exp1533)) + tmp1532) (syntax-violation #f "source expression failed to match any pattern" - tmp1528))) - ($sc-dispatch tmp1528 (quote each-any)))) - (read-file1517 fn1527 k1525)))) - tmp1524) + tmp1531))) + ($sc-dispatch tmp1531 (quote each-any)))) + (read-file1520 fn1530 k1528)))) + tmp1527) (syntax-violation #f "source expression failed to match any pattern" - tmp1523))) - ($sc-dispatch tmp1523 (quote (any any))))) - x1516))))) + tmp1526))) + ($sc-dispatch tmp1526 (quote (any any))))) + x1519))))) (define unquote (make-syncase-macro 'macro - (lambda (x1532) - ((lambda (tmp1533) - ((lambda (tmp1534) - (if tmp1534 - (apply (lambda (_1535 e1536) + (lambda (x1535) + ((lambda (tmp1536) + ((lambda (tmp1537) + (if tmp1537 + (apply (lambda (_1538 e1539) (syntax-violation 'unquote "expression not valid outside of quasiquote" - x1532)) - tmp1534) + x1535)) + tmp1537) (syntax-violation #f "source expression failed to match any pattern" - tmp1533))) - ($sc-dispatch tmp1533 (quote (any any))))) - x1532)))) + tmp1536))) + ($sc-dispatch tmp1536 (quote (any any))))) + x1535)))) (define unquote-splicing (make-syncase-macro 'macro - (lambda (x1537) - ((lambda (tmp1538) - ((lambda (tmp1539) - (if tmp1539 - (apply (lambda (_1540 e1541) + (lambda (x1540) + ((lambda (tmp1541) + ((lambda (tmp1542) + (if tmp1542 + (apply (lambda (_1543 e1544) (syntax-violation 'unquote-splicing "expression not valid outside of quasiquote" - x1537)) - tmp1539) + x1540)) + tmp1542) (syntax-violation #f "source expression failed to match any pattern" - tmp1538))) - ($sc-dispatch tmp1538 (quote (any any))))) - x1537)))) + tmp1541))) + ($sc-dispatch tmp1541 (quote (any any))))) + x1540)))) (define case (make-extended-syncase-macro (module-ref (current-module) (quote case)) 'macro - (lambda (x1542) - ((lambda (tmp1543) - ((lambda (tmp1544) - (if tmp1544 - (apply (lambda (_1545 e1546 m11547 m21548) - ((lambda (tmp1549) - ((lambda (body1550) + (lambda (x1545) + ((lambda (tmp1546) + ((lambda (tmp1547) + (if tmp1547 + (apply (lambda (_1548 e1549 m11550 m21551) + ((lambda (tmp1552) + ((lambda (body1553) (list '#(syntax-object let ((top) @@ -10365,16 +10437,16 @@ #((top)) #("i"))) (hygiene guile)) - e1546)) - body1550)) - tmp1549)) - (letrec ((f1551 (lambda (clause1552 clauses1553) - (if (null? clauses1553) - ((lambda (tmp1555) - ((lambda (tmp1556) - (if tmp1556 - (apply (lambda (e11557 - e21558) + e1549)) + body1553)) + tmp1552)) + (letrec ((f1554 (lambda (clause1555 clauses1556) + (if (null? clauses1556) + ((lambda (tmp1558) + ((lambda (tmp1559) + (if tmp1559 + (apply (lambda (e11560 + e21561) (cons '#(syntax-object begin ((top) @@ -10422,14 +10494,14 @@ #("i"))) (hygiene guile)) - (cons e11557 - e21558))) - tmp1556) - ((lambda (tmp1560) - (if tmp1560 - (apply (lambda (k1561 - e11562 - e21563) + (cons e11560 + e21561))) + tmp1559) + ((lambda (tmp1563) + (if tmp1563 + (apply (lambda (k1564 + e11565 + e21566) (list '#(syntax-object if ((top) @@ -10630,7 +10702,7 @@ #("i"))) (hygiene guile)) - k1561)) + k1564)) (cons '#(syntax-object begin ((top) @@ -10681,24 +10753,24 @@ #("i"))) (hygiene guile)) - (cons e11562 - e21563)))) - tmp1560) - ((lambda (_1566) + (cons e11565 + e21566)))) + tmp1563) + ((lambda (_1569) (syntax-violation 'case "bad clause" - x1542 - clause1552)) - tmp1555))) + x1545 + clause1555)) + tmp1558))) ($sc-dispatch - tmp1555 + tmp1558 '(each-any any . each-any))))) ($sc-dispatch - tmp1555 + tmp1558 '(#(free-id #(syntax-object else @@ -10724,15 +10796,15 @@ any . each-any)))) - clause1552) - ((lambda (tmp1567) - ((lambda (rest1568) - ((lambda (tmp1569) - ((lambda (tmp1570) - (if tmp1570 - (apply (lambda (k1571 - e11572 - e21573) + clause1555) + ((lambda (tmp1570) + ((lambda (rest1571) + ((lambda (tmp1572) + ((lambda (tmp1573) + (if tmp1573 + (apply (lambda (k1574 + e11575 + e21576) (list '#(syntax-object if ((top) @@ -10949,7 +11021,7 @@ #("i"))) (hygiene guile)) - k1571)) + k1574)) (cons '#(syntax-object begin ((top) @@ -11004,46 +11076,46 @@ #("i"))) (hygiene guile)) - (cons e11572 - e21573)) - rest1568)) - tmp1570) - ((lambda (_1576) + (cons e11575 + e21576)) + rest1571)) + tmp1573) + ((lambda (_1579) (syntax-violation 'case "bad clause" - x1542 - clause1552)) - tmp1569))) + x1545 + clause1555)) + tmp1572))) ($sc-dispatch - tmp1569 + tmp1572 '(each-any any . each-any)))) - clause1552)) - tmp1567)) - (f1551 (car clauses1553) - (cdr clauses1553))))))) - (f1551 m11547 m21548)))) - tmp1544) + clause1555)) + tmp1570)) + (f1554 (car clauses1556) + (cdr clauses1556))))))) + (f1554 m11550 m21551)))) + tmp1547) (syntax-violation #f "source expression failed to match any pattern" - tmp1543))) + tmp1546))) ($sc-dispatch - tmp1543 + tmp1546 '(any any any . each-any)))) - x1542)))) + x1545)))) (define identifier-syntax (make-syncase-macro 'macro - (lambda (x1577) - ((lambda (tmp1578) - ((lambda (tmp1579) - (if tmp1579 - (apply (lambda (_1580 e1581) + (lambda (x1580) + ((lambda (tmp1581) + ((lambda (tmp1582) + (if tmp1582 + (apply (lambda (_1583 e1584) (list '#(syntax-object lambda ((top) @@ -11132,8 +11204,8 @@ #((top)) #("i"))) (hygiene guile)) - e1581)) - (list (cons _1580 + e1584)) + (list (cons _1583 '(#(syntax-object x ((top) @@ -11173,7 +11245,7 @@ #((top)) #("i"))) (hygiene guile)) - (cons e1581 + (cons e1584 '(#(syntax-object x ((top) @@ -11201,11 +11273,11 @@ #("i"))) (hygiene guile))))))))) - tmp1579) + tmp1582) (syntax-violation #f "source expression failed to match any pattern" - tmp1578))) - ($sc-dispatch tmp1578 (quote (any any))))) - x1577)))) + tmp1581))) + ($sc-dispatch tmp1581 (quote (any any))))) + x1580)))) diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm index e1352d8c5..f1f6e9ae0 100644 --- a/module/ice-9/psyntax.scm +++ b/module/ice-9/psyntax.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -337,39 +337,46 @@ ) +(define (decorate-source e s) + (if (and (pair? e) s) + (set-source-properties! e s)) + e) + ;;; output constructors (define build-void (lambda (source) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-void) source)) - (else '(if #f #f))))) + (else (decorate-source '(if #f #f) source))))) (define build-application (lambda (source fun-exp arg-exps) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-application) source fun-exp arg-exps)) - (else `(,fun-exp . ,arg-exps))))) + (else (decorate-source `(,fun-exp . ,arg-exps) source))))) (define build-conditional (lambda (source test-exp then-exp else-exp) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-conditional) source test-exp then-exp else-exp)) - (else (if (equal? else-exp '(if #f #f)) - `(if ,test-exp ,then-exp) - `(if ,test-exp ,then-exp ,else-exp)))))) + (else (decorate-source + (if (equal? else-exp '(if #f #f)) + `(if ,test-exp ,then-exp) + `(if ,test-exp ,then-exp ,else-exp)) + source))))) (define build-lexical-reference (lambda (type source name var) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-lexical-ref) source name var)) - (else var)))) + (else (decorate-source var source))))) (define build-lexical-assignment (lambda (source name var exp) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-lexical-set) source name var exp)) - (else `(set! ,var ,exp))))) + (else (decorate-source `(set! ,var ,exp) source))))) ;; Before modules are booted, we can't expand into data structures from ;; (language tree-il) -- we need to give the evaluator the @@ -403,11 +410,11 @@ (lambda (mod var public?) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-module-ref) source mod var public?)) - (else (list (if public? '@ '@@) mod var)))) + (else (decorate-source (list (if public? '@ '@@) mod var) source)))) (lambda (var) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-toplevel-ref) source var)) - (else var)))))) + (else (decorate-source var source))))))) (define build-global-assignment (lambda (source var exp mod) @@ -416,11 +423,11 @@ (lambda (mod var public?) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-module-set) source mod var public? exp)) - (else `(set! ,(list (if public? '@ '@@) mod var) ,exp)))) + (else (decorate-source `(set! ,(list (if public? '@ '@@) mod var) ,exp) source)))) (lambda (var) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-toplevel-set) source var exp)) - (else `(set! ,var ,exp))))))) + (else (decorate-source `(set! ,var ,exp) source))))))) ;; FIXME: there is a bug that prevents (set! ((@ (foo) bar) baz) quz) ;; from working. Hack around it. @@ -439,7 +446,7 @@ ((c) (maybe-name-value! var exp) ((@ (language tree-il) make-toplevel-define) source var exp)) - (else `(define ,var ,exp))))) + (else (decorate-source `(define ,var ,exp) source))))) (define build-lambda (lambda (src ids vars docstring exp) @@ -447,25 +454,29 @@ ((c) ((@ (language tree-il) make-lambda) src ids vars (if docstring `((documentation . ,docstring)) '()) exp)) - (else `(lambda ,vars ,@(if docstring (list docstring) '()) - ,exp))))) + (else (decorate-source + `(lambda ,vars ,@(if docstring (list docstring) '()) + ,exp) + src))))) (define build-primref (lambda (src name) (if (equal? (module-name (current-module)) '(guile)) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-toplevel-ref) src name)) - (else name)) + (else (decorate-source name src))) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-module-ref) src '(guile) name #f)) - (else `(@@ (guile) ,name)))))) + (else (decorate-source `(@@ (guile) ,name) src)))))) (define (build-data src exp) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-const) src exp)) - (else (if (and (self-evaluating? exp) (not (vector? exp))) - exp - (list 'quote exp))))) + (else (decorate-source + (if (and (self-evaluating? exp) (not (vector? exp))) + exp + (list 'quote exp)) + src)))) (define build-sequence (lambda (src exps) @@ -473,7 +484,7 @@ (car exps) (case (fluid-ref *mode*) ((c) ((@ (language tree-il) make-sequence) src exps)) - (else `(begin ,@exps)))))) + (else (decorate-source `(begin ,@exps) src)))))) (define build-let (lambda (src ids vars val-exps body-exp) @@ -483,7 +494,9 @@ ((c) (for-each maybe-name-value! ids val-exps) ((@ (language tree-il) make-let) src ids vars val-exps body-exp)) - (else `(let ,(map list vars val-exps) ,body-exp)))))) + (else (decorate-source + `(let ,(map list vars val-exps) ,body-exp) + src)))))) (define build-named-let (lambda (src ids vars val-exps body-exp) @@ -500,7 +513,9 @@ (list f-name) (list f) (list proc) (build-application src (build-lexical-reference 'fun src f-name f) val-exps)))) - (else `(let ,f ,(map list vars val-exps) ,body-exp)))))) + (else (decorate-source + `(let ,f ,(map list vars val-exps) ,body-exp) + src)))))) (define build-letrec (lambda (src ids vars val-exps body-exp) @@ -510,7 +525,9 @@ ((c) (for-each maybe-name-value! ids val-exps) ((@ (language tree-il) make-letrec) src ids vars val-exps body-exp)) - (else `(letrec ,(map list vars val-exps) ,body-exp)))))) + (else (decorate-source + `(letrec ,(map list vars val-exps) ,body-exp) + src)))))) ;; FIXME: wingo: use make-lexical ? (define-syntax build-lexical-var @@ -924,9 +941,7 @@ (define source-wrap (lambda (x w s defmod) - (if (and s (pair? x)) - (set-source-properties! x s)) - (wrap x w defmod))) + (wrap (decorate-source x s) w defmod))) ;;; expanding @@ -1084,7 +1099,9 @@ (valid-bound-ids? (lambda-var-list (syntax args)))) ; need lambda here... (values 'define-form (wrap (syntax name) w mod) - (cons (syntax lambda) (wrap (syntax (args e1 e2 ...)) w mod)) + (decorate-source + (cons (syntax lambda) (wrap (syntax (args e1 e2 ...)) w mod)) + s) empty-wrap s mod)) ((_ name) (id? (syntax name)) diff --git a/module/ice-9/q.scm b/module/ice-9/q.scm index 0c12d7f40..4dc5d4953 100644 --- a/module/ice-9/q.scm +++ b/module/ice-9/q.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/r4rs.scm b/module/ice-9/r4rs.scm index 7b1c11cc1..c23f31af1 100644 --- a/module/ice-9/r4rs.scm +++ b/module/ice-9/r4rs.scm @@ -6,7 +6,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/r5rs.scm b/module/ice-9/r5rs.scm index 2b40515d3..c867f9a3c 100644 --- a/module/ice-9/r5rs.scm +++ b/module/ice-9/r5rs.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/rdelim.scm b/module/ice-9/rdelim.scm index d21d45c38..71aae3c8b 100644 --- a/module/ice-9/rdelim.scm +++ b/module/ice-9/rdelim.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/receive.scm b/module/ice-9/receive.scm index 693dfe3f4..d550c6f36 100644 --- a/module/ice-9/receive.scm +++ b/module/ice-9/receive.scm @@ -2,19 +2,19 @@ ;;; Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc. ;;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (ice-9 receive) :export (receive) diff --git a/module/ice-9/regex.scm b/module/ice-9/regex.scm index 61937d04f..2327bfe17 100644 --- a/module/ice-9/regex.scm +++ b/module/ice-9/regex.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/runq.scm b/module/ice-9/runq.scm index eb1e2203f..c14eb8967 100644 --- a/module/ice-9/runq.scm +++ b/module/ice-9/runq.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/rw.scm b/module/ice-9/rw.scm index 2731e889a..b76282a47 100644 --- a/module/ice-9/rw.scm +++ b/module/ice-9/rw.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/safe-r5rs.scm b/module/ice-9/safe-r5rs.scm index 13a44d23d..f728533cb 100644 --- a/module/ice-9/safe-r5rs.scm +++ b/module/ice-9/safe-r5rs.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/safe.scm b/module/ice-9/safe.scm index 15b77990a..1ce8f9ed9 100644 --- a/module/ice-9/safe.scm +++ b/module/ice-9/safe.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/serialize.scm b/module/ice-9/serialize.scm index 3c70f4421..008a70a9e 100644 --- a/module/ice-9/serialize.scm +++ b/module/ice-9/serialize.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/session.scm b/module/ice-9/session.scm index aaa4f0761..1f3ec2795 100644 --- a/module/ice-9/session.scm +++ b/module/ice-9/session.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/slib.scm b/module/ice-9/slib.scm index a2b526562..78c734e2a 100644 --- a/module/ice-9/slib.scm +++ b/module/ice-9/slib.scm @@ -5,13 +5,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/module/ice-9/stack-catch.scm b/module/ice-9/stack-catch.scm index a54267617..f7b207535 100644 --- a/module/ice-9/stack-catch.scm +++ b/module/ice-9/stack-catch.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/streams.scm b/module/ice-9/streams.scm index 317d47245..e0a17d488 100644 --- a/module/ice-9/streams.scm +++ b/module/ice-9/streams.scm @@ -6,7 +6,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/string-fun.scm b/module/ice-9/string-fun.scm index d8ba21f75..c27ff847f 100644 --- a/module/ice-9/string-fun.scm +++ b/module/ice-9/string-fun.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/syncase.scm b/module/ice-9/syncase.scm index 22391a8c8..210a23280 100644 --- a/module/ice-9/syncase.scm +++ b/module/ice-9/syncase.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/test.scm b/module/ice-9/test.scm index bed39b621..f6080e4cf 100644 --- a/module/ice-9/test.scm +++ b/module/ice-9/test.scm @@ -1,18 +1,18 @@ ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 2006 Free Software Foundation, Inc. ;; -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;;; "test.scm" Test correctness of scheme implementations. ;;; Author: Aubrey Jaffer diff --git a/module/ice-9/threads.scm b/module/ice-9/threads.scm index e07d766eb..292d3c27a 100644 --- a/module/ice-9/threads.scm +++ b/module/ice-9/threads.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/time.scm b/module/ice-9/time.scm index 86ebcbff1..0fad8dfca 100644 --- a/module/ice-9/time.scm +++ b/module/ice-9/time.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/ice-9/weak-vector.scm b/module/ice-9/weak-vector.scm index 92d40d840..09e2e0a8d 100644 --- a/module/ice-9/weak-vector.scm +++ b/module/ice-9/weak-vector.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/language/assembly.scm b/module/language/assembly.scm index 3f72cf6aa..3a0b3873e 100644 --- a/module/language/assembly.scm +++ b/module/language/assembly.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/assembly/compile-bytecode.scm b/module/language/assembly/compile-bytecode.scm index e4458a992..73ed620d6 100644 --- a/module/language/assembly/compile-bytecode.scm +++ b/module/language/assembly/compile-bytecode.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/assembly/decompile-bytecode.scm b/module/language/assembly/decompile-bytecode.scm index e65b2cbaa..fdf27ec62 100644 --- a/module/language/assembly/decompile-bytecode.scm +++ b/module/language/assembly/decompile-bytecode.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: @@ -23,6 +22,7 @@ #:use-module (system vm instruction) #:use-module (system base pmatch) #:use-module (srfi srfi-4) + #:use-module (rnrs bytevector) #:use-module (language assembly) #:export (decompile-bytecode)) @@ -98,14 +98,24 @@ ((eq? inst 'load-program) (decode-load-program pop)) ((< (instruction-length inst) 0) - (let* ((len (let* ((a (pop)) (b (pop)) (c (pop))) + (let* ((make-sequence + (if (eq? inst 'load-array) + make-bytevector + make-string)) + (sequence-set! + (if (eq? inst 'load-array) + bytevector-u8-set! + (lambda (str pos value) + (string-set! str pos (integer->char value))))) + + (len (let* ((a (pop)) (b (pop)) (c (pop))) (+ (ash a 16) (ash b 8) c))) - (str (make-string len))) + (seq (make-sequence len))) (let lp ((i 0)) (if (= i len) - `(,inst ,str) + `(,inst ,seq) (begin - (string-set! str i (integer->char (pop))) + (sequence-set! seq i (pop)) (lp (1+ i))))))) (else ;; fixed length diff --git a/module/language/assembly/disassemble.scm b/module/language/assembly/disassemble.scm index df6199977..0a35050b3 100644 --- a/module/language/assembly/disassemble.scm +++ b/module/language/assembly/disassemble.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/assembly/spec.scm b/module/language/assembly/spec.scm index c12808e0c..286c80511 100644 --- a/module/language/assembly/spec.scm +++ b/module/language/assembly/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/brainfuck/compile-scheme.scm b/module/language/brainfuck/compile-scheme.scm new file mode 100644 index 000000000..86bc35fdd --- /dev/null +++ b/module/language/brainfuck/compile-scheme.scm @@ -0,0 +1,126 @@ +;;; Brainfuck for GNU Guile + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. +;; +;; This library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +;;; Code: + +(define-module (language brainfuck compile-scheme) + #:export (compile-scheme)) + +;; Compilation of Brainfuck to Scheme is pretty straight-forward. For all of +;; brainfuck's instructions, there are basic representations in Scheme we +;; only have to generate. +;; +;; Brainfuck's pointer and data-tape are stored in the variables pointer and +;; tape, where tape is a vector of integer values initially set to zero. Pointer +;; starts out at position 0. +;; Our tape is thus of finite length, with an address range of 0..n for +;; some defined upper bound n depending on the length of our tape. + + +;; Define the length to use for the tape. + +(define tape-size 30000) + + +;; This compiles a whole brainfuck program. This constructs a Scheme code like: +;; (let ((pointer 0) +;; (tape (make-vector tape-size 0))) +;; (begin +;; +;; (write-char #\newline))) +;; +;; So first the pointer and tape variables are set up correctly, then the +;; program's body is executed in this context, and finally we output an +;; additional newline character in case the program does not output one. +;; +;; TODO: Find out and explain the details about env, the three return values and +;; how to use the options. Implement options to set the tape-size, maybe. + +(define (compile-scheme exp env opts) + (values + `(let ((pointer 0) + (tape (make-vector ,tape-size 0))) + ,@(if (not (eq? ' (car exp))) + (error "expected brainfuck program") + `(begin + ,@(compile-body (cdr exp)) + (write-char #\newline)))) + env + env)) + + +;; Compile a list of instructions to get a list of Scheme codes. As we always +;; strip off the car of the instructions-list and cons the result onto the +;; result-list, it will get out in reversed order first; so we have to (reverse) +;; it on return. + +(define (compile-body instructions) + (let iterate ((cur instructions) + (result '())) + (if (null? cur) + (reverse result) + (let ((compiled (compile-instruction (car cur)))) + (iterate (cdr cur) (cons compiled result)))))) + + +;; Compile a single instruction to Scheme, using the direct representations +;; all of Brainfuck's instructions have. + +(define (compile-instruction ins) + (case (car ins) + + ;; Pointer moval >< is done simply by something like: + ;; (set! pointer (+ pointer +-1)) + (() + (let ((dir (cadr ins))) + `(set! pointer (+ pointer ,dir)))) + + ;; Cell increment +- is done as: + ;; (vector-set! tape pointer (+ (vector-ref tape pointer) +-1)) + (() + (let ((inc (cadr ins))) + `(vector-set! tape pointer (+ (vector-ref tape pointer) ,inc)))) + + ;; Output . is done by converting the cell's integer value to a character + ;; first and then printing out this character: + ;; (write-char (integer->char (vector-ref tape pointer))) + (() + '(write-char (integer->char (vector-ref tape pointer)))) + + ;; Input , is done similarly, read in a character, get its ASCII code and + ;; store it into the current cell: + ;; (vector-set! tape pointer (char->integer (read-char))) + (() + '(vector-set! tape pointer (char->integer (read-char)))) + + ;; For loops [...] we use a named let construction to execute the body until + ;; the current cell gets zero. The body is compiled via a recursive call + ;; back to (compile-body). + ;; (let iterate () + ;; (if (not (= (vector-ref! tape pointer) 0)) + ;; (begin + ;; + ;; (iterate)))) + (() + `(let iterate () + (if (not (= (vector-ref tape pointer) 0)) + (begin + ,@(compile-body (cdr ins)) + (iterate))))) + + (else (error "unknown brainfuck instruction " (car ins))))) diff --git a/module/language/brainfuck/compile-tree-il.scm b/module/language/brainfuck/compile-tree-il.scm new file mode 100644 index 000000000..0aaa11274 --- /dev/null +++ b/module/language/brainfuck/compile-tree-il.scm @@ -0,0 +1,181 @@ +;;; Brainfuck for GNU Guile + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. +;; +;; This library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301 USA + +;;; Commentary: + +;; Brainfuck is a simple language that mostly mimics the operations of a +;; Turing machine. This file implements a compiler from Brainfuck to +;; Guile's Tree-IL. + +;;; Code: + +(define-module (language brainfuck compile-tree-il) + #:use-module (system base pmatch) + #:use-module (language tree-il) + #:export (compile-tree-il)) + +;; Compilation of Brainfuck is pretty straight-forward. For all of +;; brainfuck's instructions, there are basic representations in Tree-IL +;; we only have to generate. +;; +;; Brainfuck's pointer and data-tape are stored in the variables pointer and +;; tape, where tape is a vector of integer values initially set to zero. Pointer +;; starts out at position 0. +;; Our tape is thus of finite length, with an address range of 0..n for +;; some defined upper bound n depending on the length of our tape. + + +;; Define the length to use for the tape. + +(define tape-size 30000) + + +;; This compiles a whole brainfuck program. This constructs a Tree-IL +;; code equivalent to Scheme code like this: +;; +;; (let ((pointer 0) +;; (tape (make-vector tape-size 0))) +;; (begin +;; +;; (write-char #\newline))) +;; +;; So first the pointer and tape variables are set up correctly, then the +;; program's body is executed in this context, and finally we output an +;; additional newline character in case the program does not output one. +;; +;; The fact that we are compiling to Guile primitives gives this +;; implementation a number of interesting characteristics. First, the +;; values of the tape cells do not underflow or overflow. We could make +;; them do otherwise via compiling calls to "modulo" at certain points. +;; +;; In addition, tape overruns or underruns will be detected, and will +;; throw an error, whereas a number of Brainfuck compilers do not detect +;; this. +;; +;; Note that we're generating the S-expression representation of +;; Tree-IL, then using parse-tree-il to turn it into the actual Tree-IL +;; data structures. This makes the compiler more pleasant to look at, +;; but we do lose is the ability to propagate source information. Since +;; Brainfuck is so obtuse anyway, this shouldn't matter ;-) +;; +;; `compile-tree-il' takes as its input the read expression, the +;; environment, and some compile options. It returns the compiled +;; expression, the environment appropriate for the next pass of the +;; compiler -- in our case, just the environment unchanged -- and the +;; continuation environment. +;; +;; The normal use of a continuation environment is if compiling one +;; expression changes the environment, and that changed environment +;; should be passed to the next compiled expression -- for example, +;; changing the current module. But Brainfuck is incapable of that, so +;; for us, the continuation environment is just the same environment we +;; got in. +;; +;; FIXME: perhaps use options or the env to set the tape-size? + +(define (compile-tree-il exp env opts) + (values + (parse-tree-il + `(let (pointer tape) (pointer tape) + ((const 0) + (apply (primitive make-vector) (const ,tape-size) (const 0))) + ,(compile-body exp))) + env + env)) + + +;; Compile a list of instructions to a Tree-IL expression. + +(define (compile-body instructions) + (let lp ((in instructions) (out '())) + (define (emit x) + (lp (cdr in) (cons x out))) + (cond + ((null? in) + ;; No more input, build our output. + (cond + ((null? out) '(void)) ; no output + ((null? (cdr out)) (car out)) ; single expression + (else `(begin ,@(reverse out)))) ; sequence + ) + (else + (pmatch (car in) + + ;; Pointer moves >< are done simply by something like: + ;; (set! pointer (+ pointer +-1)) + (( ,dir) + (emit `(set! (lexical pointer) + (apply (primitive +) (lexical pointer) (const ,dir))))) + + ;; Cell increment +- is done as: + ;; (vector-set! tape pointer (+ (vector-ref tape pointer) +-1)) + (( ,inc) + (emit `(apply (primitive vector-set!) (lexical tape) (lexical pointer) + (apply (primitive +) + (apply (primitive vector-ref) + (lexical tape) (lexical pointer)) + (const ,inc))))) + + ;; Output . is done by converting the cell's integer value to a + ;; character first and then printing out this character: + ;; (write-char (integer->char (vector-ref tape pointer))) + (() + (emit `(apply (primitive write-char) + (apply (primitive integer->char) + (apply (primitive vector-ref) + (lexical tape) (lexical pointer)))))) + + ;; Input , is done similarly, read in a character, get its ASCII + ;; code and store it into the current cell: + ;; (vector-set! tape pointer (char->integer (read-char))) + (() + (emit `(apply (primitive vector-set!) + (lexical tape) (lexical pointer) + (apply (primitive char->integer) + (apply (primitive read-char)))))) + + ;; For loops [...] we use a letrec construction to execute the body until + ;; the current cell gets zero. The body is compiled via a recursive call + ;; back to (compile-body). + ;; (let iterate () + ;; (if (not (= (vector-ref! tape pointer) 0)) + ;; (begin + ;; + ;; (iterate)))) + ;; + ;; Indeed, letrec is the only way we have to loop in Tree-IL. + ;; Note that this does not mean that the closure must actually + ;; be created; later passes can compile tail-recursive letrec + ;; calls into inline code with gotos. Admittedly, that part of + ;; the compiler is not yet in place, but it will be, and in the + ;; meantime the code is still reasonably efficient. + (( . ,body) + (let ((iterate (gensym))) + (emit `(letrec (iterate) (,iterate) + ((lambda () () + (if (apply (primitive =) + (apply (primitive vector-ref) + (lexical tape) (lexical pointer)) + (const 0)) + (void) + (begin ,(compile-body body) + (apply (lexical ,iterate)))))) + (apply (lexical ,iterate)))))) + + (else (error "unknown brainfuck instruction" (car in)))))))) diff --git a/module/language/brainfuck/parse.scm b/module/language/brainfuck/parse.scm new file mode 100644 index 000000000..0a71638d8 --- /dev/null +++ b/module/language/brainfuck/parse.scm @@ -0,0 +1,91 @@ +;;; Brainfuck for GNU Guile. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. +;; +;; This library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301 USA + +;;; Code: + +(define-module (language brainfuck parse) + #:export (read-brainfuck)) + +; Purpose of the parse module is to read in brainfuck in text form and produce +; the corresponding tree representing the brainfuck code. +; +; Each object (representing basically a single instruction) is structured like: +; ( [arguments]) +; where is a symbolic name representing the type of instruction +; and the optional arguments represent further data (for instance, the body of +; a [...] loop as a number of nested instructions). +; +; A full brainfuck program is represented by the ( instructions) +; object. + + +; While reading a number of instructions in sequence, all of them are cons'ed +; onto a list of instructions; thus this list gets out in reverse order. +; Additionally, for "comment characters" (everything not an instruction) we +; generate NOP instructions. +; +; This routine reverses a list of instructions and removes all 's on the +; way to fix these two issues for a read-in list. + +(define (reverse-without-nops lst) + (let iterate ((cur lst) + (result '())) + (if (null? cur) + result + (let ((head (car cur)) + (tail (cdr cur))) + (if (eq? (car head) ') + (iterate tail result) + (iterate tail (cons head result))))))) + + +; Read in a set of instructions until a terminating ] character is found (or +; end of file is reached). This is used both for loop bodies and whole +; programs, so that a program has to be either terminated by EOF or an +; additional ], too. +; +; For instance, the basic program so just echo one character would be: +; ,.] + +(define (read-brainfuck p) + (let iterate ((parsed '())) + (let ((chr (read-char p))) + (if (or (eof-object? chr) (eq? #\] chr)) + (reverse-without-nops parsed) + (iterate (cons (process-input-char chr p) parsed)))))) + + +; This routine processes a single character of input and builds the +; corresponding instruction. Loop bodies are read by recursively calling +; back (read-brainfuck). +; +; For the poiner movement commands >< and the cell increment/decrement +- +; commands, we only use one instruction form each and specify the direction of +; the pointer/value increment using an argument to the instruction form. + +(define (process-input-char chr p) + (case chr + ((#\>) '( 1)) + ((#\<) '( -1)) + ((#\+) '( 1)) + ((#\-) '( -1)) + ((#\.) '()) + ((#\,) '()) + ((#\[) `( ,@(read-brainfuck p))) + (else '()))) diff --git a/module/language/brainfuck/spec.scm b/module/language/brainfuck/spec.scm new file mode 100644 index 000000000..a4ba60f82 --- /dev/null +++ b/module/language/brainfuck/spec.scm @@ -0,0 +1,44 @@ +;;; Brainfuck for GNU Guile. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. +;; +;; This library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301 USA + +;;; Code: + +(define-module (language brainfuck spec) + #:use-module (language brainfuck compile-tree-il) + #:use-module (language brainfuck compile-scheme) + #:use-module (language brainfuck parse) + #:use-module (system base language) + #:export (brainfuck)) + + +; The new language is integrated into Guile via this (define-language) +; specification in the special module (language [lang] spec). +; Provided is a parser-routine in #:reader, a output routine in #:printer +; and one or more compiler routines (as target-language - routine pairs) +; in #:compilers. This is the basic set of fields needed to specify a new +; language. + +(define-language brainfuck + #:title "Guile Brainfuck" + #:version "1.0" + #:reader (lambda () (read-brainfuck (current-input-port))) + #:compilers `((tree-il . ,compile-tree-il) + (scheme . ,compile-scheme)) + #:printer write + ) diff --git a/module/language/bytecode/spec.scm b/module/language/bytecode/spec.scm index dff724a63..184565b04 100644 --- a/module/language/bytecode/spec.scm +++ b/module/language/bytecode/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/array.scm b/module/language/ecmascript/array.scm index a9f499a22..e9fc3c6f4 100644 --- a/module/language/ecmascript/array.scm +++ b/module/language/ecmascript/array.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/base.scm b/module/language/ecmascript/base.scm index 1463d358b..1d031fcde 100644 --- a/module/language/ecmascript/base.scm +++ b/module/language/ecmascript/base.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/compile-ghil.scm b/module/language/ecmascript/compile-ghil.scm index 92d71ec16..ab04ba80c 100644 --- a/module/language/ecmascript/compile-ghil.scm +++ b/module/language/ecmascript/compile-ghil.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: @@ -50,17 +49,6 @@ (and (not (null? props)) props)))) -;; The purpose, you ask? To avoid non-tail recursion when expanding a -;; long pmatch sequence. -(define-macro (ormatch x . clauses) - (let ((X (gensym))) - `(let ((,X ,x)) - (or ,@(map (lambda (c) - (if (eq? (car c) 'else) - `(begin . ,(cdr c)) - `(pmatch ,X ,c (else #f)))) - clauses))))) - (define (comp x e) (let ((l (location x))) (define (let1 what proc) @@ -74,7 +62,7 @@ (-> (bind vars (list what) (-> (begin (list (proc (car vars)) (-> (ref (car vars))))))))))) - (ormatch x + (pmatch x (null ;; FIXME, null doesn't have much relation to EOL... (-> (quote '()))) diff --git a/module/language/ecmascript/function.scm b/module/language/ecmascript/function.scm index 1e2d726ca..710c5cb1c 100644 --- a/module/language/ecmascript/function.scm +++ b/module/language/ecmascript/function.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/impl.scm b/module/language/ecmascript/impl.scm index be4c751cb..27c077aed 100644 --- a/module/language/ecmascript/impl.scm +++ b/module/language/ecmascript/impl.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/parse-lalr.scm b/module/language/ecmascript/parse-lalr.scm index 6378d087c..b702511ca 100644 --- a/module/language/ecmascript/parse-lalr.scm +++ b/module/language/ecmascript/parse-lalr.scm @@ -2,18 +2,19 @@ ;; Copyright (C) 1984,1989,1990 Free Software Foundation, Inc. ;; Copyright (C) 1996-2002 Dominique Boucher -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;; ---------------------------------------------------------------------- ;; diff --git a/module/language/ecmascript/parse.scm b/module/language/ecmascript/parse.scm index 169c992fd..ce731a736 100644 --- a/module/language/ecmascript/parse.scm +++ b/module/language/ecmascript/parse.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/spec.scm b/module/language/ecmascript/spec.scm index 0112af5a4..6e9470f38 100644 --- a/module/language/ecmascript/spec.scm +++ b/module/language/ecmascript/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ecmascript/tokenize.scm b/module/language/ecmascript/tokenize.scm index 2beda23b7..63f180b14 100644 --- a/module/language/ecmascript/tokenize.scm +++ b/module/language/ecmascript/tokenize.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/elisp/spec.scm b/module/language/elisp/spec.scm index 7309a80ac..061bcb830 100644 --- a/module/language/elisp/spec.scm +++ b/module/language/elisp/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ghil.scm b/module/language/ghil.scm index 273d0aa20..84cc83de5 100644 --- a/module/language/ghil.scm +++ b/module/language/ghil.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ghil/compile-glil.scm b/module/language/ghil/compile-glil.scm index 02187be05..47e15c797 100644 --- a/module/language/ghil/compile-glil.scm +++ b/module/language/ghil/compile-glil.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/ghil/spec.scm b/module/language/ghil/spec.scm index c9d38aa69..f2bc19b61 100644 --- a/module/language/ghil/spec.scm +++ b/module/language/ghil/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/glil.scm b/module/language/glil.scm index 625760eaa..38b915f9e 100644 --- a/module/language/glil.scm +++ b/module/language/glil.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/glil/compile-assembly.scm b/module/language/glil/compile-assembly.scm index 96c6383c0..0b92a4e7d 100644 --- a/module/language/glil/compile-assembly.scm +++ b/module/language/glil/compile-assembly.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/glil/decompile-assembly.scm b/module/language/glil/decompile-assembly.scm index a47bd80b2..502ef8034 100644 --- a/module/language/glil/decompile-assembly.scm +++ b/module/language/glil/decompile-assembly.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/glil/spec.scm b/module/language/glil/spec.scm index dbe379e70..d5291a211 100644 --- a/module/language/glil/spec.scm +++ b/module/language/glil/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/objcode.scm b/module/language/objcode.scm index aea546c66..d8bcda879 100644 --- a/module/language/objcode.scm +++ b/module/language/objcode.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/objcode/spec.scm b/module/language/objcode/spec.scm index c60829974..76c1cbcb9 100644 --- a/module/language/objcode/spec.scm +++ b/module/language/objcode/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/r5rs/core.il b/module/language/r5rs/core.il index ad40fcc1a..c614a6fe2 100644 --- a/module/language/r5rs/core.il +++ b/module/language/r5rs/core.il @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/r5rs/expand.scm b/module/language/r5rs/expand.scm index 45b722717..e8910ae1b 100644 --- a/module/language/r5rs/expand.scm +++ b/module/language/r5rs/expand.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/r5rs/null.il b/module/language/r5rs/null.il index efdc5f398..a290025de 100644 --- a/module/language/r5rs/null.il +++ b/module/language/r5rs/null.il @@ -2,19 +2,18 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/r5rs/spec.scm b/module/language/r5rs/spec.scm index b5d19e6d4..67f8d74cf 100644 --- a/module/language/r5rs/spec.scm +++ b/module/language/r5rs/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/scheme/compile-ghil.scm b/module/language/scheme/compile-ghil.scm index 8d8332c34..dc03af6cf 100644 --- a/module/language/scheme/compile-ghil.scm +++ b/module/language/scheme/compile-ghil.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/scheme/compile-tree-il.scm b/module/language/scheme/compile-tree-il.scm index 4635abc8a..4ac33d77e 100644 --- a/module/language/scheme/compile-tree-il.scm +++ b/module/language/scheme/compile-tree-il.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/scheme/decompile-tree-il.scm b/module/language/scheme/decompile-tree-il.scm index c4903d87f..9243f4e6a 100644 --- a/module/language/scheme/decompile-tree-il.scm +++ b/module/language/scheme/decompile-tree-il.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001,2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/scheme/inline.scm b/module/language/scheme/inline.scm index 462fe7f2f..b178b2adc 100644 --- a/module/language/scheme/inline.scm +++ b/module/language/scheme/inline.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/scheme/spec.scm b/module/language/scheme/spec.scm index cec2693aa..21aa023a5 100644 --- a/module/language/scheme/spec.scm +++ b/module/language/scheme/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/tree-il.scm b/module/language/tree-il.scm index 971892020..0f8448a44 100644 --- a/module/language/tree-il.scm +++ b/module/language/tree-il.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -94,6 +94,9 @@ ((lexical ,name ,sym) (guard (symbol? name) (symbol? sym)) (make-lexical-ref loc name sym)) + ((set! (lexical ,name) ,exp) (guard (symbol? name)) + (make-lexical-set loc name name (retrans exp))) + ((set! (lexical ,name ,sym) ,exp) (guard (symbol? name) (symbol? sym)) (make-lexical-set loc name sym (retrans exp))) diff --git a/module/language/tree-il/analyze.scm b/module/language/tree-il/analyze.scm index 90843f75a..976807718 100644 --- a/module/language/tree-il/analyze.scm +++ b/module/language/tree-il/analyze.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001,2008,2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/tree-il/compile-glil.scm b/module/language/tree-il/compile-glil.scm index 78a841dd2..e0df038d8 100644 --- a/module/language/tree-il/compile-glil.scm +++ b/module/language/tree-il/compile-glil.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001,2008,2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: @@ -23,6 +22,7 @@ #:use-module (system base syntax) #:use-module (ice-9 receive) #:use-module (language glil) + #:use-module (system vm instruction) #:use-module (language tree-il) #:use-module (language tree-il optimize) #:use-module (language tree-il analyze) @@ -81,7 +81,53 @@ (list . list) (vector . vector) ((@slot-ref . 2) . slot-ref) - ((@slot-set! . 3) . slot-set))) + ((@slot-set! . 3) . slot-set) + ((vector-ref . 2) . vector-ref) + ((vector-set! . 3) . vector-set) + + ((bytevector-u8-ref . 2) . bv-u8-ref) + ((bytevector-u8-set! . 3) . bv-u8-set) + ((bytevector-s8-ref . 2) . bv-s8-ref) + ((bytevector-s8-set! . 3) . bv-s8-set) + + ((bytevector-u16-ref . 3) . bv-u16-ref) + ((bytevector-u16-set! . 4) . bv-u16-set) + ((bytevector-u16-native-ref . 2) . bv-u16-native-ref) + ((bytevector-u16-native-set! . 3) . bv-u16-native-set) + ((bytevector-s16-ref . 3) . bv-s16-ref) + ((bytevector-s16-set! . 4) . bv-s16-set) + ((bytevector-s16-native-ref . 2) . bv-s16-native-ref) + ((bytevector-s16-native-set! . 3) . bv-s16-native-set) + + ((bytevector-u32-ref . 3) . bv-u32-ref) + ((bytevector-u32-set! . 4) . bv-u32-set) + ((bytevector-u32-native-ref . 2) . bv-u32-native-ref) + ((bytevector-u32-native-set! . 3) . bv-u32-native-set) + ((bytevector-s32-ref . 3) . bv-s32-ref) + ((bytevector-s32-set! . 4) . bv-s32-set) + ((bytevector-s32-native-ref . 2) . bv-s32-native-ref) + ((bytevector-s32-native-set! . 3) . bv-s32-native-set) + + ((bytevector-u64-ref . 3) . bv-u64-ref) + ((bytevector-u64-set! . 4) . bv-u64-set) + ((bytevector-u64-native-ref . 2) . bv-u64-native-ref) + ((bytevector-u64-native-set! . 3) . bv-u64-native-set) + ((bytevector-s64-ref . 3) . bv-s64-ref) + ((bytevector-s64-set! . 4) . bv-s64-set) + ((bytevector-s64-native-ref . 2) . bv-s64-native-ref) + ((bytevector-s64-native-set! . 3) . bv-s64-native-set) + + ((bytevector-ieee-single-ref . 3) . bv-f32-ref) + ((bytevector-ieee-single-set! . 4) . bv-f32-set) + ((bytevector-ieee-single-native-ref . 2) . bv-f32-native-ref) + ((bytevector-ieee-single-native-set! . 3) . bv-f32-native-set) + ((bytevector-ieee-double-ref . 3) . bv-f64-ref) + ((bytevector-ieee-double-set! . 4) . bv-f64-set) + ((bytevector-ieee-double-native-ref . 2) . bv-f64-native-ref) + ((bytevector-ieee-double-native-set! . 3) . bv-f64-native-set))) + + + (define (make-label) (gensym ":L")) @@ -306,10 +352,20 @@ => (lambda (op) (for-each comp-push args) (emit-code src (make-glil-call op (length args))) - (case context - ((tail) (emit-code #f (make-glil-call 'return 1))) - ((drop) (emit-code #f (make-glil-call 'drop 1)))))) - + (case (instruction-pushes op) + ((0) + (case context + ((tail) (emit-code #f (make-glil-void)) + (emit-code #f (make-glil-call 'return 1))) + ((push vals) (emit-code #f (make-glil-void))))) + ((1) + (case context + ((tail) (emit-code #f (make-glil-call 'return 1))) + ((drop) (emit-code #f (make-glil-call 'drop 1))))) + (else + (error "bad primitive op: too many pushes" + op (instruction-pushes op)))))) + (else (comp-push proc) (for-each comp-push args) diff --git a/module/language/tree-il/optimize.scm b/module/language/tree-il/optimize.scm index 3a02e021e..ac16a9e39 100644 --- a/module/language/tree-il/optimize.scm +++ b/module/language/tree-il/optimize.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/tree-il/primitives.scm b/module/language/tree-il/primitives.scm index 8960c2802..9ccd2720d 100644 --- a/module/language/tree-il/primitives.scm +++ b/module/language/tree-il/primitives.scm @@ -2,23 +2,24 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This library is free software; you can redistribute it and/or -;; modify it under the terms of the GNU Lesser General Public -;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. -;; -;; This library is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; Lesser General Public License for more details. -;; -;; You should have received a copy of the GNU Lesser General Public -;; License along with this library; if not, write to the Free Software -;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: (define-module (language tree-il primitives) + #:use-module (rnrs bytevector) #:use-module (system base syntax) #:use-module (language tree-il) #:use-module (srfi srfi-16) @@ -47,11 +48,37 @@ caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr - cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr)) + cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr + + vector-ref vector-set! + + bytevector-u8-ref bytevector-u8-set! + bytevector-s8-ref bytevector-s8-set! + + bytevector-u16-ref bytevector-u16-set! + bytevector-u16-native-ref bytevector-u16-native-set! + bytevector-s16-ref bytevector-s16-set! + bytevector-s16-native-ref bytevector-s16-native-set! + + bytevector-u32-ref bytevector-u32-set! + bytevector-u32-native-ref bytevector-u32-native-set! + bytevector-s32-ref bytevector-s32-set! + bytevector-s32-native-ref bytevector-s32-native-set! + + bytevector-u64-ref bytevector-u64-set! + bytevector-u64-native-ref bytevector-u64-native-set! + bytevector-s64-ref bytevector-s64-set! + bytevector-s64-native-ref bytevector-s64-native-set! + + bytevector-ieee-single-ref bytevector-ieee-single-set! + bytevector-ieee-single-native-ref bytevector-ieee-single-native-set! + bytevector-ieee-double-ref bytevector-ieee-double-set! + bytevector-ieee-double-native-ref bytevector-ieee-double-native-set!)) (define (add-interesting-primitive! name) (hashq-set! *interesting-primitive-vars* - (module-variable (current-module) name) name)) + (module-variable (current-module) name) + name)) (define *interesting-primitive-vars* (make-hash-table)) diff --git a/module/language/tree-il/spec.scm b/module/language/tree-il/spec.scm index c1f098230..2d24f7bf6 100644 --- a/module/language/tree-il/spec.scm +++ b/module/language/tree-il/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/language/value/spec.scm b/module/language/value/spec.scm index 51f5e6c66..aebba8c8d 100644 --- a/module/language/value/spec.scm +++ b/module/language/value/spec.scm @@ -2,20 +2,19 @@ ;; Copyright (C) 2001 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Code: diff --git a/module/oop/goops.scm b/module/oop/goops.scm index 6e3b15009..c1754da3e 100644 --- a/module/oop/goops.scm +++ b/module/oop/goops.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/accessors.scm b/module/oop/goops/accessors.scm index a7baa5c62..5b05d3b15 100644 --- a/module/oop/goops/accessors.scm +++ b/module/oop/goops/accessors.scm @@ -1,19 +1,18 @@ ;;;; Copyright (C) 1999, 2000, 2005, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;;; diff --git a/module/oop/goops/active-slot.scm b/module/oop/goops/active-slot.scm index e6b409ad0..5cd2afe10 100644 --- a/module/oop/goops/active-slot.scm +++ b/module/oop/goops/active-slot.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/compile.scm b/module/oop/goops/compile.scm index 732c1bccd..5db406cd0 100644 --- a/module/oop/goops/compile.scm +++ b/module/oop/goops/compile.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/composite-slot.scm b/module/oop/goops/composite-slot.scm index 9bf5cf8f8..b3f8cc038 100644 --- a/module/oop/goops/composite-slot.scm +++ b/module/oop/goops/composite-slot.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/describe.scm b/module/oop/goops/describe.scm index 184fef214..fa7bc466c 100644 --- a/module/oop/goops/describe.scm +++ b/module/oop/goops/describe.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm index ed9f3077e..0dd169d59 100644 --- a/module/oop/goops/dispatch.scm +++ b/module/oop/goops/dispatch.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/internal.scm b/module/oop/goops/internal.scm index d996805e4..15919d44b 100644 --- a/module/oop/goops/internal.scm +++ b/module/oop/goops/internal.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/save.scm b/module/oop/goops/save.scm index 2aedd7698..0c7d71a2d 100644 --- a/module/oop/goops/save.scm +++ b/module/oop/goops/save.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/simple.scm b/module/oop/goops/simple.scm index c0cb76fbb..bc5405a8d 100644 --- a/module/oop/goops/simple.scm +++ b/module/oop/goops/simple.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/stklos.scm b/module/oop/goops/stklos.scm index ef943cf96..835969f13 100644 --- a/module/oop/goops/stklos.scm +++ b/module/oop/goops/stklos.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/oop/goops/util.scm b/module/oop/goops/util.scm index b6276aa37..69bb898bf 100644 --- a/module/oop/goops/util.scm +++ b/module/oop/goops/util.scm @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/rnrs/bytevector.scm b/module/rnrs/bytevector.scm index 7728a1581..32929c698 100644 --- a/module/rnrs/bytevector.scm +++ b/module/rnrs/bytevector.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/rnrs/io/ports.scm b/module/rnrs/io/ports.scm index 73843ee55..d1b96b31a 100644 --- a/module/rnrs/io/ports.scm +++ b/module/rnrs/io/ports.scm @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/scripts/PROGRAM.scm b/module/scripts/PROGRAM.scm index af1a583bb..56e5cf334 100644 --- a/module/scripts/PROGRAM.scm +++ b/module/scripts/PROGRAM.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: J.R.Hacker diff --git a/module/scripts/api-diff.scm b/module/scripts/api-diff.scm index de750e14a..b842b03ff 100644 --- a/module/scripts/api-diff.scm +++ b/module/scripts/api-diff.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/autofrisk.scm b/module/scripts/autofrisk.scm index e280be4d9..e29ccc992 100644 --- a/module/scripts/autofrisk.scm +++ b/module/scripts/autofrisk.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/compile.scm b/module/scripts/compile.scm index 84d235b8a..311e35bad 100644 --- a/module/scripts/compile.scm +++ b/module/scripts/compile.scm @@ -3,19 +3,19 @@ ;; Copyright 2005,2008,2009 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Ludovic Courtès ;;; Author: Andy Wingo diff --git a/module/scripts/disassemble.scm b/module/scripts/disassemble.scm index 46ef0c744..8907f6d08 100644 --- a/module/scripts/disassemble.scm +++ b/module/scripts/disassemble.scm @@ -1,23 +1,23 @@ ;;; Disassemble --- Disassemble .go files into something human-readable -;; Copyright 2005,2008 Free Software Foundation, Inc. +;; Copyright 2005, 2008, 2009 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA -;;; Author: Ludovic Courtès +;;; Author: Ludovic Courtès ;;; Author: Andy Wingo ;;; Commentary: @@ -28,12 +28,13 @@ (define-module (scripts disassemble) #:use-module (system vm objcode) - #:use-module (language assembly disassemble) + #:use-module ((language assembly disassemble) + #:renamer (symbol-prefix-proc 'asm:)) #:export (disassemble)) -(define (disassemble args) +(define (disassemble . files) (for-each (lambda (file) - (disassemble (load-objcode file))) - (cdr args))) + (asm:disassemble (load-objcode file))) + files)) (define main disassemble) diff --git a/module/scripts/display-commentary.scm b/module/scripts/display-commentary.scm index fd1ffd004..5bd249ce9 100644 --- a/module/scripts/display-commentary.scm +++ b/module/scripts/display-commentary.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/doc-snarf.scm b/module/scripts/doc-snarf.scm index 4ceddc152..b5665b973 100644 --- a/module/scripts/doc-snarf.scm +++ b/module/scripts/doc-snarf.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Martin Grabmueller diff --git a/module/scripts/frisk.scm b/module/scripts/frisk.scm index 374bb4e3c..0cf50d6a8 100644 --- a/module/scripts/frisk.scm +++ b/module/scripts/frisk.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/generate-autoload.scm b/module/scripts/generate-autoload.scm index 10f158c98..781931015 100644 --- a/module/scripts/generate-autoload.scm +++ b/module/scripts/generate-autoload.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/lint.scm b/module/scripts/lint.scm index 2ee9b7863..b4a7f530a 100644 --- a/module/scripts/lint.scm +++ b/module/scripts/lint.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Neil Jerram diff --git a/module/scripts/punify.scm b/module/scripts/punify.scm index 098c4b935..1627722d3 100644 --- a/module/scripts/punify.scm +++ b/module/scripts/punify.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/read-rfc822.scm b/module/scripts/read-rfc822.scm index ed3aced7d..c0a54f28c 100644 --- a/module/scripts/read-rfc822.scm +++ b/module/scripts/read-rfc822.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/read-scheme-source.scm b/module/scripts/read-scheme-source.scm index c593d64e3..b48a88f9b 100644 --- a/module/scripts/read-scheme-source.scm +++ b/module/scripts/read-scheme-source.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/read-text-outline.scm b/module/scripts/read-text-outline.scm index 579fb6934..64221fbe1 100644 --- a/module/scripts/read-text-outline.scm +++ b/module/scripts/read-text-outline.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/scan-api.scm b/module/scripts/scan-api.scm index ceaac43d4..9236f8742 100644 --- a/module/scripts/scan-api.scm +++ b/module/scripts/scan-api.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/snarf-check-and-output-texi.scm b/module/scripts/snarf-check-and-output-texi.scm index 049d08411..0e7efae47 100644 --- a/module/scripts/snarf-check-and-output-texi.scm +++ b/module/scripts/snarf-check-and-output-texi.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Michael Livshin diff --git a/module/scripts/snarf-guile-m4-docs.scm b/module/scripts/snarf-guile-m4-docs.scm index 11fb82b3d..05c305ebd 100644 --- a/module/scripts/snarf-guile-m4-docs.scm +++ b/module/scripts/snarf-guile-m4-docs.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/summarize-guile-TODO.scm b/module/scripts/summarize-guile-TODO.scm index bf4f14535..a67c92ede 100644 --- a/module/scripts/summarize-guile-TODO.scm +++ b/module/scripts/summarize-guile-TODO.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/scripts/use2dot.scm b/module/scripts/use2dot.scm index bf1fdbddb..ab97afbc7 100644 --- a/module/scripts/use2dot.scm +++ b/module/scripts/use2dot.scm @@ -3,19 +3,19 @@ ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or +;; modify it under the terms of the GNU Lesser General Public License +;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301 USA +;; You should have received a copy of the GNU Lesser General Public +;; License along with this software; see the file COPYING.LESSER. If +;; not, write to the Free Software Foundation, Inc., 51 Franklin +;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen diff --git a/module/srfi/Makefile.am b/module/srfi/Makefile.am index 0fc926e40..7cbac6630 100644 --- a/module/srfi/Makefile.am +++ b/module/srfi/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/module/srfi/srfi-1.scm b/module/srfi/srfi-1.scm index 7c55d9923..db21122b9 100644 --- a/module/srfi/srfi-1.scm +++ b/module/srfi/srfi-1.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-10.scm b/module/srfi/srfi-10.scm index 8e7181a3b..533d9f769 100644 --- a/module/srfi/srfi-10.scm +++ b/module/srfi/srfi-10.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-11.scm b/module/srfi/srfi-11.scm index afa1730f1..c8422eeaf 100644 --- a/module/srfi/srfi-11.scm +++ b/module/srfi/srfi-11.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-13.scm b/module/srfi/srfi-13.scm index 1036a0f47..a2d64cba3 100644 --- a/module/srfi/srfi-13.scm +++ b/module/srfi/srfi-13.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-14.scm b/module/srfi/srfi-14.scm index 100b43b8e..ecc21e52e 100644 --- a/module/srfi/srfi-14.scm +++ b/module/srfi/srfi-14.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-16.scm b/module/srfi/srfi-16.scm index 0b213fde7..dc3c70920 100644 --- a/module/srfi/srfi-16.scm +++ b/module/srfi/srfi-16.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-17.scm b/module/srfi/srfi-17.scm index c9cb2abfe..a14c5c33b 100644 --- a/module/srfi/srfi-17.scm +++ b/module/srfi/srfi-17.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-18.scm b/module/srfi/srfi-18.scm index dd92079be..26acb6300 100644 --- a/module/srfi/srfi-18.scm +++ b/module/srfi/srfi-18.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-19.scm b/module/srfi/srfi-19.scm index 29c604fcd..b91824976 100644 --- a/module/srfi/srfi-19.scm +++ b/module/srfi/srfi-19.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-2.scm b/module/srfi/srfi-2.scm index 0dfe38305..c09323fbb 100644 --- a/module/srfi/srfi-2.scm +++ b/module/srfi/srfi-2.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-26.scm b/module/srfi/srfi-26.scm index 410d2e2f8..324a5dc37 100644 --- a/module/srfi/srfi-26.scm +++ b/module/srfi/srfi-26.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-31.scm b/module/srfi/srfi-31.scm index 54c2f9fd4..4238dc269 100644 --- a/module/srfi/srfi-31.scm +++ b/module/srfi/srfi-31.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-34.scm b/module/srfi/srfi-34.scm index 18a2fda1c..7fb9d1dd6 100644 --- a/module/srfi/srfi-34.scm +++ b/module/srfi/srfi-34.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-35.scm b/module/srfi/srfi-35.scm index d7e6a4da0..873b08b13 100644 --- a/module/srfi/srfi-35.scm +++ b/module/srfi/srfi-35.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-37.scm b/module/srfi/srfi-37.scm index 5e6d512a2..565b44cb9 100644 --- a/module/srfi/srfi-37.scm +++ b/module/srfi/srfi-37.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-39.scm b/module/srfi/srfi-39.scm index 87154d6df..61e67b820 100644 --- a/module/srfi/srfi-39.scm +++ b/module/srfi/srfi-39.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-4.scm b/module/srfi/srfi-4.scm index f30e83952..b133f2106 100644 --- a/module/srfi/srfi-4.scm +++ b/module/srfi/srfi-4.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-6.scm b/module/srfi/srfi-6.scm index 1e455bb5c..098b586cc 100644 --- a/module/srfi/srfi-6.scm +++ b/module/srfi/srfi-6.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-60.scm b/module/srfi/srfi-60.scm index 177f97681..c9eb60f8b 100644 --- a/module/srfi/srfi-60.scm +++ b/module/srfi/srfi-60.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-69.scm b/module/srfi/srfi-69.scm index d26393576..0d835d09b 100644 --- a/module/srfi/srfi-69.scm +++ b/module/srfi/srfi-69.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-8.scm b/module/srfi/srfi-8.scm index c15cbe9c0..ced123894 100644 --- a/module/srfi/srfi-8.scm +++ b/module/srfi/srfi-8.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-88.scm b/module/srfi/srfi-88.scm index ebde81d0b..0fec19ee1 100644 --- a/module/srfi/srfi-88.scm +++ b/module/srfi/srfi-88.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-9.scm b/module/srfi/srfi-9.scm index 59d23bf53..c64be5e51 100644 --- a/module/srfi/srfi-9.scm +++ b/module/srfi/srfi-9.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/srfi/srfi-98.scm b/module/srfi/srfi-98.scm index 924a20578..944f40261 100644 --- a/module/srfi/srfi-98.scm +++ b/module/srfi/srfi-98.scm @@ -5,7 +5,7 @@ ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public ;; License as published by the Free Software Foundation; either -;; version 2.1 of the License, or (at your option) any later version. +;; version 3 of the License, or (at your option) any later version. ;; ;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm index 9f0ff2f3d..22f8e04f1 100644 --- a/module/system/base/compile.scm +++ b/module/system/base/compile.scm @@ -131,7 +131,11 @@ (else (car %load-compiled-extensions)))) (and %compile-fallback-path (let ((f (string-append - %compile-fallback-path "/" file (compiled-extension)))) + %compile-fallback-path + ;; no need for '/' separator here, canonicalize-path + ;; will give us an absolute path + (canonicalize-path file) + (compiled-extension)))) (and (false-if-exception (ensure-writable-dir (dirname f))) f)))) diff --git a/module/system/base/language.scm b/module/system/base/language.scm index 8ae4d9667..3670c53d9 100644 --- a/module/system/base/language.scm +++ b/module/system/base/language.scm @@ -1,21 +1,21 @@ ;;; Multi-language support -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. ;; -;; This program is distributed in the hope that it will be useful, +;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301 USA ;;; Code: diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm index 47f1a9aa2..6f45bd7f6 100644 --- a/module/system/repl/command.scm +++ b/module/system/repl/command.scm @@ -1,21 +1,21 @@ ;;; Repl commands -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. ;; -;; This program is distributed in the hope that it will be useful, +;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301 USA ;;; Code: @@ -27,7 +27,7 @@ #:use-module (system vm objcode) #:use-module (system vm program) #:use-module (system vm vm) - #:autoload (system base language) (lookup-language) + #:autoload (system base language) (lookup-language language-reader) #:autoload (system vm debug) (vm-debugger vm-backtrace) #:autoload (system vm trace) (vm-trace vm-trace-on vm-trace-off) #:autoload (system vm profile) (vm-profile) @@ -35,6 +35,7 @@ #:use-module (ice-9 session) #:use-module (ice-9 documentation) #:use-module (ice-9 and-let-star) + #:use-module (ice-9 rdelim) #:export (meta-command)) @@ -109,33 +110,66 @@ (let ((abbrev (if abbrev (format #f "[,~A]" abbrev) ""))) (format #t " ,~24A ~8@A - ~A\n" usage abbrev summary))) -(define (meta-command repl line) - (let ((input (call-with-input-string (string-append "(" line ")") read))) - (if (not (null? input)) - (do ((key (car input)) - (args (cdr input) (cdr args)) - (opts '() (cons (make-keyword-from-dash-symbol (car args)) opts))) - ((or (null? args) - (not (symbol? (car args))) - (not (eq? (string-ref (symbol->string (car args)) 0) #\-))) - (let ((c (lookup-command key))) - (if c - (cond ((memq #:h opts) (display-command c)) - (else (apply (command-procedure c) - repl (append! args (reverse! opts))))) - (user-error "Unknown meta command: ~A" key)))))))) +(define (read-datum repl) + (read)) + +(define read-line + (let ((orig-read-line read-line)) + (lambda (repl) + (orig-read-line)))) + +(define (meta-command repl) + (let ((command (read-datum repl))) + (if (not (symbol? command)) + (user-error "Meta-command not a symbol: ~s" command)) + (let ((c (lookup-command command))) + (if c + ((command-procedure c) repl) + (user-error "Unknown meta command: ~A" command))))) + +(define-syntax define-meta-command + (syntax-rules () + ((_ (name repl (expression0 ...) . datums) docstring b0 b1 ...) + (define (name repl) + docstring + (let* ((expression0 + (with-fluid* current-reader + (language-reader (repl-language repl)) + (lambda () (repl-reader "")))) + ...) + (apply (lambda datums b0 b1 ...) + (let ((port (open-input-string (read-line repl)))) + (let lp ((out '())) + (let ((x (read port))) + (if (eof-object? x) + (reverse out) + (lp (cons x out)))))))))) + ((_ (name repl . datums) docstring b0 b1 ...) + (define-meta-command (name repl () . datums) + docstring b0 b1 ...)))) + ;;; ;;; Help commands ;;; -(define (help repl . args) - "help [GROUP] -List available meta commands. -A command group name can be given as an optional argument. +(define-meta-command (help repl . args) + "help +help GROUP +help [-c] COMMAND + +Gives help on the meta-commands available at the REPL. + +With one argument, tries to look up the argument as a group name, giving +help on that group if successful. Otherwise tries to look up the +argument as a command, giving help on the command. + +If there is a command whose name is also a group name, use the ,help +-c COMMAND form to give help on the command instead of the group. + Without any argument, a list of help commands and command groups -are displayed, as you have already seen ;)" +are displayed." (pmatch args (() (display-group (lookup-group 'help)) @@ -154,23 +188,30 @@ are displayed, as you have already seen ;)" (for-each display-group *command-table*)) ((,group) (guard (lookup-group group)) (display-group (lookup-group group))) + ((,command) (guard (lookup-command command)) + (display-command (lookup-command command))) + ((-c ,command) (guard (lookup-command command)) + (display-command (lookup-command command))) + ((,command) + (user-error "Unknown command or group: ~A" command)) + ((-c ,command) + (user-error "Unknown command: ~A" command)) (else - (user-error "Unknown command group: ~A" (car args))))) + (user-error "Bad arguments: ~A" args)))) (define guile:apropos apropos) -(define (apropos repl regexp) +(define-meta-command (apropos repl regexp) "apropos REGEXP Find bindings/modules/packages." (guile:apropos (->string regexp))) -(define (describe repl obj) +(define-meta-command (describe repl (form)) "describe OBJ Show description/documentation." - (display (object-documentation - (repl-eval repl (repl-parse repl obj)))) + (display (object-documentation (repl-eval repl (repl-parse repl form)))) (newline)) -(define (option repl . args) +(define-meta-command (option repl . args) "option [KEY VALUE] List/show/set options." (pmatch args @@ -190,7 +231,7 @@ List/show/set options." (apply vm-trace-on vm val) (vm-trace-off vm)))))))) -(define (quit repl) +(define-meta-command (quit repl) "quit Quit this session." (throw 'quit)) @@ -200,7 +241,7 @@ Quit this session." ;;; Module commands ;;; -(define (module repl . args) +(define-meta-command (module repl . args) "module [MODULE] Change modules / Show current module." (pmatch args @@ -209,7 +250,7 @@ Change modules / Show current module." (set-current-module (resolve-module mod-name))) (,mod-name (set-current-module (resolve-module mod-name))))) -(define (import repl . args) +(define-meta-command (import repl . args) "import [MODULE ...] Import modules / List those imported." (let () @@ -222,7 +263,7 @@ Import modules / List those imported." (for-each puts (map module-name (module-uses (current-module)))) (for-each use args)))) -(define (load repl file . opts) +(define-meta-command (load repl file . opts) "load FILE Load a file in the current module. @@ -233,7 +274,7 @@ Load a file in the current module. (apply load-file file opts)))) (vm-load (repl-vm repl) objcode))) -(define (binding repl . opts) +(define-meta-command (binding repl) "binding List current bindings." (module-for-each (lambda (k v) (format #t "~23A ~A\n" k v)) @@ -244,7 +285,7 @@ List current bindings." ;;; Language commands ;;; -(define (language repl name) +(define-meta-command (language repl name) "language LANGUAGE Change languages." (set! (repl-language repl) (lookup-language name)) @@ -255,7 +296,7 @@ Change languages." ;;; Compile commands ;;; -(define (compile repl form . opts) +(define-meta-command (compile repl (form) . opts) "compile FORM Generate compiled code. @@ -266,11 +307,11 @@ Generate compiled code. -O Enable optimization -D Add debug information" (let ((x (apply repl-compile repl (repl-parse repl form) opts))) - (cond ((objcode? x) (disassemble-objcode x)) + (cond ((objcode? x) (guile:disassemble x)) (else (repl-print repl x))))) (define guile:compile-file compile-file) -(define (compile-file repl file . opts) +(define-meta-command (compile-file repl file . opts) "compile-file FILE Compile a file." (guile:compile-file (->string file) #:opts opts)) @@ -278,12 +319,12 @@ Compile a file." (define (guile:disassemble x) ((@ (language assembly disassemble) disassemble) x)) -(define (disassemble repl prog) +(define-meta-command (disassemble repl (form)) "disassemble PROGRAM Disassemble a program." - (guile:disassemble (repl-eval repl (repl-parse repl prog)))) + (guile:disassemble (repl-eval repl (repl-parse repl form)))) -(define (disassemble-file repl file) +(define-meta-command (disassemble-file repl file) "disassemble-file FILE Disassemble a file." (guile:disassemble (load-objcode (->string file)))) @@ -293,7 +334,7 @@ Disassemble a file." ;;; Profile commands ;;; -(define (time repl form) +(define-meta-command (time repl (form)) "time FORM Time execution." (let* ((vms-start (vm-stats (repl-vm repl))) @@ -316,7 +357,7 @@ Time execution." (get identity gc-start gc-end)) result)) -(define (profile repl form . opts) +(define-meta-command (profile repl form . opts) "profile FORM Profile execution." (apply vm-profile @@ -329,17 +370,17 @@ Profile execution." ;;; Debug commands ;;; -(define (backtrace repl) +(define-meta-command (backtrace repl) "backtrace Display backtrace." (vm-backtrace (repl-vm repl))) -(define (debugger repl) +(define-meta-command (debugger repl) "debugger Start debugger." (vm-debugger (repl-vm repl))) -(define (trace repl form . opts) +(define-meta-command (trace repl form . opts) "trace FORM Trace execution. @@ -351,7 +392,7 @@ Trace execution. (repl-compile repl (repl-parse repl form)) opts)) -(define (step repl) +(define-meta-command (step repl) "step FORM Step execution." (display "Not implemented yet\n")) @@ -362,12 +403,12 @@ Step execution." ;;; (define guile:gc gc) -(define (gc repl) +(define-meta-command (gc repl) "gc Garbage collection." (guile:gc)) -(define (statistics repl) +(define-meta-command (statistics repl) "statistics Display statistics." (let ((this-tms (times)) diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm index 0a06e3dd0..2f4a3783a 100644 --- a/module/system/repl/repl.scm +++ b/module/system/repl/repl.scm @@ -1,21 +1,21 @@ ;;; Read-Eval-Print Loop -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. ;; -;; This program is distributed in the hope that it will be useful, +;; This library is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. ;; -;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; You should have received a copy of the GNU Lesser General Public +;; License along with this library; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301 USA ;;; Code: @@ -28,7 +28,6 @@ #:use-module (system repl command) #:use-module (system vm vm) #:use-module (system vm debug) - #:use-module (ice-9 rdelim) #:export (start-repl call-with-backtrace)) (define meta-command-token (cons 'meta 'command)) @@ -103,11 +102,14 @@ (cond ((eqv? exp (if #f #f))) ; read error, pass ((eq? exp meta-command-token) - (with-backtrace (meta-command repl (read-line)))) + (with-backtrace (meta-command repl))) ((eof-object? exp) (newline) (set! status '())) (else + ;; since the input port is line-buffered, consume up to the + ;; newline + (flush-to-newline) (with-backtrace (catch 'quit (lambda () @@ -135,3 +137,14 @@ ((char-whitespace? ch) (read-char) (next-char wait)) (else ch))) #f)) + +(define (flush-to-newline) + (if (char-ready?) + (let ((ch (peek-char))) + (if (and (not (eof-object? ch)) (char-whitespace? ch)) + (begin + (read-char) + (if (not (char=? ch #\newline)) + (flush-to-newline))))))) + + \ No newline at end of file diff --git a/qt/Makefile.am b/qt/Makefile.am index fc9951d30..8a15fb6ff 100644 --- a/qt/Makefile.am +++ b/qt/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/qt/md/Makefile.am b/qt/md/Makefile.am index 7500dc66c..e5b29e96e 100644 --- a/qt/md/Makefile.am +++ b/qt/md/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/qt/time/Makefile.am b/qt/time/Makefile.am index 735620330..bdce61f38 100644 --- a/qt/time/Makefile.am +++ b/qt/time/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. -## +## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/srfi/Makefile.am b/srfi/Makefile.am index 02fa12b04..648603007 100644 --- a/srfi/Makefile.am +++ b/srfi/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or ## (at your option) any later version. ## ## GUILE is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA AUTOMAKE_OPTIONS = gnu diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c index dc218ab04..02f46fca0 100644 --- a/srfi/srfi-1.c +++ b/srfi/srfi-1.c @@ -4,18 +4,19 @@ * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/srfi/srfi-1.h b/srfi/srfi-1.h index 936586697..5797579cc 100644 --- a/srfi/srfi-1.h +++ b/srfi/srfi-1.h @@ -5,18 +5,19 @@ * Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/srfi/srfi-13.c b/srfi/srfi-13.c index dd5ce9b15..61a960e5d 100644 --- a/srfi/srfi-13.c +++ b/srfi/srfi-13.c @@ -3,18 +3,19 @@ * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/srfi/srfi-13.h b/srfi/srfi-13.h index 8007d565b..a110ffd6d 100644 --- a/srfi/srfi-13.h +++ b/srfi/srfi-13.h @@ -6,18 +6,19 @@ * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 1a7297b82..9f6ad8bc0 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -3,18 +3,19 @@ * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/srfi/srfi-14.h b/srfi/srfi-14.h index b1f4ae726..a793159c5 100644 --- a/srfi/srfi-14.h +++ b/srfi/srfi-14.h @@ -5,18 +5,19 @@ * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/srfi/srfi-4.c b/srfi/srfi-4.c index f40c6b319..9b32b61a9 100644 --- a/srfi/srfi-4.c +++ b/srfi/srfi-4.c @@ -3,18 +3,19 @@ * Copyright (C) 2001, 2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* This file is now empty since all its procedures are now in the diff --git a/srfi/srfi-4.h b/srfi/srfi-4.h index 079219ace..0439675da 100644 --- a/srfi/srfi-4.h +++ b/srfi/srfi-4.h @@ -5,18 +5,19 @@ * Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/srfi/srfi-60.c b/srfi/srfi-60.c index 7d89ca039..989898f9c 100644 --- a/srfi/srfi-60.c +++ b/srfi/srfi-60.c @@ -3,18 +3,19 @@ * Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifdef HAVE_CONFIG_H diff --git a/srfi/srfi-60.h b/srfi/srfi-60.h index 030b32525..47a8cf766 100644 --- a/srfi/srfi-60.h +++ b/srfi/srfi-60.h @@ -3,18 +3,19 @@ * Copyright (C) 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index 8ac209339..7bfef16c9 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or -## (at your option) any later version. +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or +## (at your option) any later version. ## -## GUILE is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GUILE is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA SUBDIRS = standalone diff --git a/test-suite/guile-test b/test-suite/guile-test index 1e1c70a77..65b0533c8 100755 --- a/test-suite/guile-test +++ b/test-suite/guile-test @@ -7,20 +7,20 @@ ;;;; ;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This program is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3, or (at your option) any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; GNU Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this software; see the file COPYING.LESSER. +;;;; If not, write to the Free Software Foundation, Inc., 51 Franklin +;;;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;;; Usage: [guile -e main -s] guile-test [OPTIONS] [TEST ...] diff --git a/test-suite/lib.scm b/test-suite/lib.scm index 3f09ce48a..8190d1fd0 100644 --- a/test-suite/lib.scm +++ b/test-suite/lib.scm @@ -1,20 +1,20 @@ ;;;; test-suite/lib.scm --- generic support for testing -;;;; Copyright (C) 1999, 2000, 2001, 2004, 2006, 2007 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2000, 2001, 2004, 2006, 2007, 2009 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This program is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3, or (at your option) any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; GNU Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this software; see the file COPYING.LESSER. +;;;; If not, write to the Free Software Foundation, Inc., 51 Franklin +;;;; Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite lib) :use-module (ice-9 stack-catch) @@ -32,6 +32,7 @@ exception:system-error exception:miscellaneous-error exception:string-contains-nul + exception:read-error ;; Reporting passes and failures. run-test @@ -265,6 +266,8 @@ (cons 'system-error ".*")) (define exception:miscellaneous-error (cons 'misc-error "^.*")) +(define exception:read-error + (cons 'read-error "^.*$")) ;; as per throw in scm_to_locale_stringn() (define exception:string-contains-nul diff --git a/test-suite/standalone/Makefile.am b/test-suite/standalone/Makefile.am index 9bfd801d8..37b9cb5e6 100644 --- a/test-suite/standalone/Makefile.am +++ b/test-suite/standalone/Makefile.am @@ -4,20 +4,20 @@ ## ## This file is part of GUILE. ## -## GUILE is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as -## published by the Free Software Foundation; either version 2, or -## (at your option) any later version. +## GUILE is free software; you can redistribute it and/or modify it +## under the terms of the GNU Lesser General Public License as +## published by the Free Software Foundation; either version 3, or +## (at your option) any later version. ## -## GUILE is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## GUILE is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. ## -## You should have received a copy of the GNU General Public -## License along with GUILE; see the file COPYING. If not, write -## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth -## Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public +## License along with GUILE; see the file COPYING.LESSER. If not, +## write to the Free Software Foundation, Inc., 51 Franklin Street, +## Fifth Floor, Boston, MA 02110-1301 USA # initializations so we can use += below. diff --git a/test-suite/standalone/test-asmobs-lib.c b/test-suite/standalone/test-asmobs-lib.c index b85f923cd..c88556ab2 100644 --- a/test-suite/standalone/test-asmobs-lib.c +++ b/test-suite/standalone/test-asmobs-lib.c @@ -1,18 +1,19 @@ /* Copyright (C) 1999,2000,2001,2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef HAVE_CONFIG_H diff --git a/test-suite/standalone/test-conversion.c b/test-suite/standalone/test-conversion.c index 41f99d3bc..0dfa80a23 100644 --- a/test-suite/standalone/test-conversion.c +++ b/test-suite/standalone/test-conversion.c @@ -1,18 +1,19 @@ /* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H diff --git a/test-suite/standalone/test-extensions-lib.c b/test-suite/standalone/test-extensions-lib.c index 25b3a38a9..7c8678895 100644 --- a/test-suite/standalone/test-extensions-lib.c +++ b/test-suite/standalone/test-extensions-lib.c @@ -1,18 +1,19 @@ /* Copyright (C) 1999,2000,2001,2003, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef HAVE_CONFIG_H diff --git a/test-suite/standalone/test-fast-slot-ref.in b/test-suite/standalone/test-fast-slot-ref.in index 774cfe269..e0708ab9d 100644 --- a/test-suite/standalone/test-fast-slot-ref.in +++ b/test-suite/standalone/test-fast-slot-ref.in @@ -2,19 +2,20 @@ # Copyright (C) 2006 Free Software Foundation, Inc. # -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation; either version 3 of +# the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -# License for more details. +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA # Test for %fast-slot-ref, which was previously implemented such that # an out-of-range slot index could escape being properly detected, and diff --git a/test-suite/standalone/test-list.c b/test-suite/standalone/test-list.c index 02634f676..824463447 100644 --- a/test-suite/standalone/test-list.c +++ b/test-suite/standalone/test-list.c @@ -3,18 +3,19 @@ /* Copyright (C) 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef HAVE_CONFIG_H diff --git a/test-suite/standalone/test-num2integral.c b/test-suite/standalone/test-num2integral.c index 1e8a016d5..8b69b071d 100644 --- a/test-suite/standalone/test-num2integral.c +++ b/test-suite/standalone/test-num2integral.c @@ -1,18 +1,19 @@ /* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef HAVE_CONFIG_H diff --git a/test-suite/standalone/test-round.c b/test-suite/standalone/test-round.c index 1340fffa7..862e7d0fd 100644 --- a/test-suite/standalone/test-round.c +++ b/test-suite/standalone/test-round.c @@ -1,18 +1,19 @@ /* Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H diff --git a/test-suite/standalone/test-scm-c-read.c b/test-suite/standalone/test-scm-c-read.c index 1b4caa1c7..4111cd0f5 100644 --- a/test-suite/standalone/test-scm-c-read.c +++ b/test-suite/standalone/test-scm-c-read.c @@ -1,18 +1,19 @@ /* Copyright (C) 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* Exercise `scm_c_read ()' and the port type API. Verify assumptions that diff --git a/test-suite/standalone/test-scm-take-locale-symbol.c b/test-suite/standalone/test-scm-take-locale-symbol.c index 715f7f984..808068fbf 100644 --- a/test-suite/standalone/test-scm-take-locale-symbol.c +++ b/test-suite/standalone/test-scm-take-locale-symbol.c @@ -1,18 +1,19 @@ /* Copyright (C) 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ /* Exercise `scm_take_locale_symbol ()', making sure it returns an interned diff --git a/test-suite/standalone/test-scm-with-guile.c b/test-suite/standalone/test-scm-with-guile.c index 7fe16b351..a78458e6c 100644 --- a/test-suite/standalone/test-scm-with-guile.c +++ b/test-suite/standalone/test-scm-with-guile.c @@ -1,18 +1,19 @@ /* Copyright (C) 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ diff --git a/test-suite/standalone/test-unwind.c b/test-suite/standalone/test-unwind.c index 472887abe..2b0291dd5 100644 --- a/test-suite/standalone/test-unwind.c +++ b/test-suite/standalone/test-unwind.c @@ -1,18 +1,19 @@ /* Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #if HAVE_CONFIG_H diff --git a/test-suite/standalone/test-use-srfi.in b/test-suite/standalone/test-use-srfi.in index 7186b5a24..ab9d5cd5e 100755 --- a/test-suite/standalone/test-use-srfi.in +++ b/test-suite/standalone/test-use-srfi.in @@ -2,19 +2,20 @@ # Copyright (C) 2006 Free Software Foundation, Inc. # -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation; either version 3 of +# the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -# License for more details. +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA # Test that two srfi numbers on the command line work. diff --git a/test-suite/standalone/test-with-guile-module.c b/test-suite/standalone/test-with-guile-module.c index babc22b22..154f4f23f 100644 --- a/test-suite/standalone/test-with-guile-module.c +++ b/test-suite/standalone/test-with-guile-module.c @@ -1,18 +1,19 @@ /* Copyright (C) 2008 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef HAVE_CONFIG_H diff --git a/test-suite/tests/alist.test b/test-suite/tests/alist.test index a9e9b0d24..699c10ef4 100644 --- a/test-suite/tests/alist.test +++ b/test-suite/tests/alist.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/and-let-star.test b/test-suite/tests/and-let-star.test index 0f74934f7..150600c34 100644 --- a/test-suite/tests/and-let-star.test +++ b/test-suite/tests/and-let-star.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2004, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-and-let-star) #:use-module (test-suite lib) diff --git a/test-suite/tests/arbiters.test b/test-suite/tests/arbiters.test index 7591f02f0..36dc7edbd 100644 --- a/test-suite/tests/arbiters.test +++ b/test-suite/tests/arbiters.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/asm-to-bytecode.test b/test-suite/tests/asm-to-bytecode.test index 2af3152ff..1c2a5994b 100644 --- a/test-suite/tests/asm-to-bytecode.test +++ b/test-suite/tests/asm-to-bytecode.test @@ -3,7 +3,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/bit-operations.test b/test-suite/tests/bit-operations.test index 8e35257b3..8815dc65b 100644 --- a/test-suite/tests/bit-operations.test +++ b/test-suite/tests/bit-operations.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/bytevectors.test b/test-suite/tests/bytevectors.test index b2ae65c1f..8b336bb5b 100644 --- a/test-suite/tests/bytevectors.test +++ b/test-suite/tests/bytevectors.test @@ -6,26 +6,46 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-bytevector) :use-module (test-suite lib) + :use-module (system base compile) :use-module (rnrs bytevector)) ;;; Some of the tests in here are examples taken from the R6RS Standard ;;; Libraries document. +(define-syntax c&e + (syntax-rules (pass-if pass-if-exception) + ((_ (pass-if test-name exp)) + (begin (pass-if (string-append test-name " (eval)") + (primitive-eval 'exp)) + (pass-if (string-append test-name " (compile)") + (compile 'exp #:to 'value)))) + ((_ (pass-if-exception test-name exc exp)) + (begin (pass-if-exception (string-append test-name " (eval)") + exc (primitive-eval 'exp)) + (pass-if-exception (string-append test-name " (compile)") + exc (compile 'exp #:to 'value)))))) + +(define-syntax with-test-prefix/c&e + (syntax-rules () + ((_ section-name exp ...) + (with-test-prefix section-name (c&e exp) ...)))) + + -(with-test-prefix "2.2 General Operations" +(with-test-prefix/c&e "2.2 General Operations" (pass-if "native-endianness" (not (not (memq (native-endianness) '(big little))))) @@ -44,7 +64,7 @@ (make-bytevector 20 0)))))) -(with-test-prefix "2.3 Operations on Bytes and Octets" +(with-test-prefix/c&e "2.3 Operations on Bytes and Octets" (pass-if "bytevector-{u8,s8}-ref" (equal? '(-127 129 -1 255) @@ -123,10 +143,15 @@ (bytevector-sint-set! b 0 -16 (endianness big) 2) (bytevector-sint-set! b 1 -16 (endianness little) 2) (equal? (bytevector->u8-list b) - '(#xff #xf0 #xff))))) + '(#xff #xf0 #xff)))) + + (pass-if "equal?" + (let ((bv1 (u8-list->bytevector (iota 123))) + (bv2 (u8-list->bytevector (iota 123)))) + (equal? bv1 bv2)))) -(with-test-prefix "2.4 Operations on Integers of Arbitrary Size" +(with-test-prefix/c&e "2.4 Operations on Integers of Arbitrary Size" (pass-if "bytevector->sint-list" (let ((b (u8-list->bytevector '(1 2 3 255 1 2 1 2)))) @@ -180,7 +205,7 @@ (uint-list->bytevector '(0 -1) (endianness big) 2))) -(with-test-prefix "2.5 Operations on 16-Bit Integers" +(with-test-prefix/c&e "2.5 Operations on 16-Bit Integers" (pass-if "bytevector-u16-ref" (let ((b (u8-list->bytevector @@ -228,7 +253,7 @@ -77)))) -(with-test-prefix "2.6 Operations on 32-bit Integers" +(with-test-prefix/c&e "2.6 Operations on 32-bit Integers" (pass-if "bytevector-u32-ref" (let ((b (u8-list->bytevector @@ -265,7 +290,7 @@ (- 2222222222 (expt 2 32))))))) -(with-test-prefix "2.7 Operations on 64-bit Integers" +(with-test-prefix/c&e "2.7 Operations on 64-bit Integers" (pass-if "bytevector-u64-ref" (let ((b (u8-list->bytevector @@ -310,7 +335,7 @@ (= 0 (bytevector-u64-ref b 0 (endianness big)))))) -(with-test-prefix "2.8 Operations on IEEE-754 Representations" +(with-test-prefix/c&e "2.8 Operations on IEEE-754 Representations" (pass-if "bytevector-ieee-single-native-{ref,set!}" (let ((b (make-bytevector 4)) @@ -525,6 +550,131 @@ 4))))))) + +(with-test-prefix "Datum Syntax" + + (pass-if "empty" + (equal? (with-input-from-string "#vu8()" read) + (make-bytevector 0))) + + (pass-if "simple" + (equal? (with-input-from-string "#vu8(1 2 3 4 5)" read) + (u8-list->bytevector '(1 2 3 4 5)))) + + (pass-if ">127" + (equal? (with-input-from-string "#vu8(0 255 127 128)" read) + (u8-list->bytevector '(0 255 127 128)))) + + (pass-if "self-evaluating" + (equal? (eval (with-input-from-string "#vu8(1 2 3 4 5)" read) + (current-module)) + (u8-list->bytevector '(1 2 3 4 5)))) + + (pass-if "quoted" + (equal? (eval (with-input-from-string "'#vu8(1 2 3 4 5)" read) + (current-module)) + (u8-list->bytevector '(1 2 3 4 5)))) + + (pass-if "literal simple" + (equal? #vu8(1 2 3 4 5) + (u8-list->bytevector '(1 2 3 4 5)))) + + (pass-if "literal >127" + (equal? #vu8(0 255 127 128) + (u8-list->bytevector '(0 255 127 128)))) + + (pass-if "literal quoted" + (equal? '#vu8(1 2 3 4 5) + (u8-list->bytevector '(1 2 3 4 5)))) + + (pass-if-exception "incorrect prefix" + exception:read-error + (with-input-from-string "#vi8(1 2 3)" read)) + + (pass-if-exception "extraneous space" + exception:read-error + (with-input-from-string "#vu8 (1 2 3)" read)) + + (pass-if-exception "negative integers" + exception:wrong-type-arg + (with-input-from-string "#vu8(-1 -2 -3)" read)) + + (pass-if-exception "out-of-range integers" + exception:wrong-type-arg + (with-input-from-string "#vu8(0 256)" read))) + + +(with-test-prefix "Generalized Vectors" + + (pass-if "generalized-vector?" + (generalized-vector? #vu8(1 2 3))) + + (pass-if "generalized-vector-length" + (equal? (iota 16) + (map generalized-vector-length + (map make-bytevector (iota 16))))) + + (pass-if "generalized-vector-ref" + (let ((bv #vu8(255 127))) + (and (= 255 (generalized-vector-ref bv 0)) + (= 127 (generalized-vector-ref bv 1))))) + + (pass-if-exception "generalized-vector-ref [index out-of-range]" + exception:out-of-range + (let ((bv #vu8(1 2))) + (generalized-vector-ref bv 2))) + + (pass-if "generalized-vector-set!" + (let ((bv (make-bytevector 2))) + (generalized-vector-set! bv 0 255) + (generalized-vector-set! bv 1 77) + (equal? '(255 77) + (bytevector->u8-list bv)))) + + (pass-if-exception "generalized-vector-set! [index out-of-range]" + exception:out-of-range + (let ((bv (make-bytevector 2))) + (generalized-vector-set! bv 2 0))) + + (pass-if-exception "generalized-vector-set! [value out-of-range]" + exception:out-of-range + (let ((bv (make-bytevector 2))) + (generalized-vector-set! bv 0 256))) + + (pass-if "array-type" + (eq? 'vu8 (array-type #vu8()))) + + (pass-if "array-contents" + (let ((bv (u8-list->bytevector (iota 10)))) + (eq? bv (array-contents bv)))) + + (pass-if "array-ref" + (let ((bv (u8-list->bytevector (iota 10)))) + (equal? (iota 10) + (map (lambda (i) (array-ref bv i)) + (iota 10))))) + + (pass-if "array-set!" + (let ((bv (make-bytevector 10))) + (for-each (lambda (i) + (array-set! bv i i)) + (iota 10)) + (equal? (iota 10) + (bytevector->u8-list bv)))) + + (pass-if "make-typed-array" + (let ((bv (make-typed-array 'vu8 77 33))) + (equal? bv (u8-list->bytevector (make-list 33 77))))) + + (pass-if-exception "make-typed-array [out-of-range]" + exception:out-of-range + (make-typed-array 'vu8 256 77)) + + (pass-if "uniform-array->bytevector" + (let ((bv #vu8(0 1 128 255))) + (equal? bv (uniform-array->bytevector bv))))) + + ;;; Local Variables: ;;; coding: latin-1 ;;; mode: scheme diff --git a/test-suite/tests/c-api.test b/test-suite/tests/c-api.test index 4a165d4cb..7c1b3bbd1 100644 --- a/test-suite/tests/c-api.test +++ b/test-suite/tests/c-api.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define srcdir (cdr (assq 'srcdir %guile-build-info))) diff --git a/test-suite/tests/chars.test b/test-suite/tests/chars.test index f14c832dd..b52b384c5 100644 --- a/test-suite/tests/chars.test +++ b/test-suite/tests/chars.test @@ -3,21 +3,19 @@ ;;;; ;;;; Copyright (C) 2000, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA - +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/common-list.test b/test-suite/tests/common-list.test index c6f659b1e..dae806844 100644 --- a/test-suite/tests/common-list.test +++ b/test-suite/tests/common-list.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/compiler.test b/test-suite/tests/compiler.test index 7324d7795..1252c2881 100644 --- a/test-suite/tests/compiler.test +++ b/test-suite/tests/compiler.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/continuations.test b/test-suite/tests/continuations.test index 7d76b762b..20a7a5ac1 100644 --- a/test-suite/tests/continuations.test +++ b/test-suite/tests/continuations.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-continuations) :use-module (test-suite lib)) diff --git a/test-suite/tests/dynamic-scope.test b/test-suite/tests/dynamic-scope.test index d7a06a411..77be3b480 100644 --- a/test-suite/tests/dynamic-scope.test +++ b/test-suite/tests/dynamic-scope.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-dynamic-scope) :use-module (test-suite lib)) diff --git a/test-suite/tests/elisp.test b/test-suite/tests/elisp.test index 9e0997087..fd028dac6 100644 --- a/test-suite/tests/elisp.test +++ b/test-suite/tests/elisp.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/environments.test b/test-suite/tests/environments.test index 646efc56a..61ced3596 100644 --- a/test-suite/tests/environments.test +++ b/test-suite/tests/environments.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/eval.test b/test-suite/tests/eval.test index e5ef34bb0..47d7ca99f 100644 --- a/test-suite/tests/eval.test +++ b/test-suite/tests/eval.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/exceptions.test b/test-suite/tests/exceptions.test index 4a9c1cb55..c2ec5f48d 100644 --- a/test-suite/tests/exceptions.test +++ b/test-suite/tests/exceptions.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/filesys.test b/test-suite/tests/filesys.test index b9913c2f2..a6bfb6eb5 100644 --- a/test-suite/tests/filesys.test +++ b/test-suite/tests/filesys.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/format.test b/test-suite/tests/format.test index cc3b6684b..04b31f138 100644 --- a/test-suite/tests/format.test +++ b/test-suite/tests/format.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-format) #:use-module (test-suite lib) diff --git a/test-suite/tests/fractions.test b/test-suite/tests/fractions.test index 0e1a4d6c1..3ee1347d8 100644 --- a/test-suite/tests/fractions.test +++ b/test-suite/tests/fractions.test @@ -1,17 +1,18 @@ ;;;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License version 2 as -;;;; published by the Free Software Foundation; see file GNU-GPL. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this program; if not, write to the Free Software Foundation, -;;;; Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;;; Based in part on code from GNU CLISP, Copyright (C) 1993 Michael Stoll diff --git a/test-suite/tests/ftw.test b/test-suite/tests/ftw.test index c0cbb92cd..847fb9ff4 100644 --- a/test-suite/tests/ftw.test +++ b/test-suite/tests/ftw.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test index badf2b79c..5c485abe8 100644 --- a/test-suite/tests/gc.test +++ b/test-suite/tests/gc.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/getopt-long.test b/test-suite/tests/getopt-long.test index fe4a8872b..2c6f41515 100644 --- a/test-suite/tests/getopt-long.test +++ b/test-suite/tests/getopt-long.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib) (ice-9 getopt-long) diff --git a/test-suite/tests/goops.test b/test-suite/tests/goops.test index 7cdc396aa..c060d12a6 100644 --- a/test-suite/tests/goops.test +++ b/test-suite/tests/goops.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2001,2003,2004, 2006, 2008, 2009 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-goops) #:use-module (test-suite lib) diff --git a/test-suite/tests/guardians.test b/test-suite/tests/guardians.test index d60f638b7..b675f02f5 100644 --- a/test-suite/tests/guardians.test +++ b/test-suite/tests/guardians.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; These tests make some questionable assumptions. ;;; - They assume that a GC will find all dead objects, so they diff --git a/test-suite/tests/hash.test b/test-suite/tests/hash.test index ccfd24ece..d2bde481c 100644 --- a/test-suite/tests/hash.test +++ b/test-suite/tests/hash.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/hooks.test b/test-suite/tests/hooks.test index f8ed39919..68c724704 100644 --- a/test-suite/tests/hooks.test +++ b/test-suite/tests/hooks.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/i18n.test b/test-suite/tests/i18n.test index 78d7e54fb..c4777c21c 100644 --- a/test-suite/tests/i18n.test +++ b/test-suite/tests/i18n.test @@ -6,13 +6,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/test-suite/tests/import.test b/test-suite/tests/import.test index 4c4be02b2..1f2d26445 100644 --- a/test-suite/tests/import.test +++ b/test-suite/tests/import.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/interp.test b/test-suite/tests/interp.test index a091515b9..5f3e2aaf7 100644 --- a/test-suite/tests/interp.test +++ b/test-suite/tests/interp.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (pass-if "Internal defines 1" (letrec ((foo (lambda (arg) diff --git a/test-suite/tests/list.test b/test-suite/tests/list.test index 7dc0ef0f8..d7b7801c9 100644 --- a/test-suite/tests/list.test +++ b/test-suite/tests/list.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/load.test b/test-suite/tests/load.test index a71a34716..59f9dbb61 100644 --- a/test-suite/tests/load.test +++ b/test-suite/tests/load.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-load) :use-module (test-suite lib) diff --git a/test-suite/tests/modules.test b/test-suite/tests/modules.test index 43e35d8b7..696c35ca2 100644 --- a/test-suite/tests/modules.test +++ b/test-suite/tests/modules.test @@ -5,13 +5,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/test-suite/tests/multilingual.nottest b/test-suite/tests/multilingual.nottest index 46a3ee2d3..cc911a108 100644 --- a/test-suite/tests/multilingual.nottest +++ b/test-suite/tests/multilingual.nottest @@ -4,20 +4,19 @@ ;;;; ;;;; Copyright (C) 1999, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test index 32627ed8c..57e2f9b28 100644 --- a/test-suite/tests/numbers.test +++ b/test-suite/tests/numbers.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/optargs.test b/test-suite/tests/optargs.test index 040b68ba4..5929ce909 100644 --- a/test-suite/tests/optargs.test +++ b/test-suite/tests/optargs.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-optargs) :use-module (test-suite lib) diff --git a/test-suite/tests/options.test b/test-suite/tests/options.test index f2f87143b..a795109ce 100644 --- a/test-suite/tests/options.test +++ b/test-suite/tests/options.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/pairs.test b/test-suite/tests/pairs.test index af2f3e275..a317307b2 100644 --- a/test-suite/tests/pairs.test +++ b/test-suite/tests/pairs.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/poe.test b/test-suite/tests/poe.test index 6c7625602..707dc0272 100644 --- a/test-suite/tests/poe.test +++ b/test-suite/tests/poe.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/popen.test b/test-suite/tests/popen.test index 9cc68f21c..0a20cff7a 100644 --- a/test-suite/tests/popen.test +++ b/test-suite/tests/popen.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test index f1ba80be0..67df5b979 100644 --- a/test-suite/tests/ports.test +++ b/test-suite/tests/ports.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2001, 2004, 2006, 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-ports) :use-module (test-suite lib) diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test index e93d1689f..06b70baa0 100644 --- a/test-suite/tests/posix.test +++ b/test-suite/tests/posix.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright 2003, 2004, 2006, 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-posix) :use-module (test-suite lib)) diff --git a/test-suite/tests/procprop.test b/test-suite/tests/procprop.test index 40e89c792..5768e1a64 100644 --- a/test-suite/tests/procprop.test +++ b/test-suite/tests/procprop.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-procpop) :use-module (test-suite lib)) diff --git a/test-suite/tests/q.test b/test-suite/tests/q.test index 5c24e5202..03f1bebe9 100644 --- a/test-suite/tests/q.test +++ b/test-suite/tests/q.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/r4rs.test b/test-suite/tests/r4rs.test index e47364c66..e26fdada3 100644 --- a/test-suite/tests/r4rs.test +++ b/test-suite/tests/r4rs.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/r5rs_pitfall.test b/test-suite/tests/r5rs_pitfall.test index 1357345b2..0bae630b5 100644 --- a/test-suite/tests/r5rs_pitfall.test +++ b/test-suite/tests/r5rs_pitfall.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/r6rs-ports.test b/test-suite/tests/r6rs-ports.test index 204f37144..df12e5cbc 100644 --- a/test-suite/tests/r6rs-ports.test +++ b/test-suite/tests/r6rs-ports.test @@ -6,13 +6,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -342,6 +342,7 @@ close!))) (close-port port) + (gc) ; Test for marking a closed port. closed?))) diff --git a/test-suite/tests/ramap.test b/test-suite/tests/ramap.test index d923bc1f2..948a77870 100644 --- a/test-suite/tests/ramap.test +++ b/test-suite/tests/ramap.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test index bd34e4db0..0eb851508 100644 --- a/test-suite/tests/reader.test +++ b/test-suite/tests/reader.test @@ -6,13 +6,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/test-suite/tests/receive.test b/test-suite/tests/receive.test index 4b55bdf9f..3fb4abe20 100644 --- a/test-suite/tests/receive.test +++ b/test-suite/tests/receive.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2004, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-receive) #:use-module (test-suite lib) diff --git a/test-suite/tests/regexp.test b/test-suite/tests/regexp.test index 15f77a34c..730839970 100644 --- a/test-suite/tests/regexp.test +++ b/test-suite/tests/regexp.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-regexp) #:use-module (test-suite lib) diff --git a/test-suite/tests/socket.test b/test-suite/tests/socket.test index 4bfc41557..7626ceebf 100644 --- a/test-suite/tests/socket.test +++ b/test-suite/tests/socket.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/sort.test b/test-suite/tests/sort.test index a49c04857..292836d88 100644 --- a/test-suite/tests/sort.test +++ b/test-suite/tests/sort.test @@ -1,20 +1,19 @@ ;;;; sort.test --- tests Guile's sort functions -*- scheme -*- ;;;; Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/srcprop.test b/test-suite/tests/srcprop.test index 5bfe68080..8ec298960 100644 --- a/test-suite/tests/srcprop.test +++ b/test-suite/tests/srcprop.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/srfi-1.test b/test-suite/tests/srfi-1.test index 4f2838744..c163e7b69 100644 --- a/test-suite/tests/srfi-1.test +++ b/test-suite/tests/srfi-1.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-1) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-10.test b/test-suite/tests/srfi-10.test index 248c04ff7..ab3cb884e 100644 --- a/test-suite/tests/srfi-10.test +++ b/test-suite/tests/srfi-10.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (srfi srfi-10)) diff --git a/test-suite/tests/srfi-11.test b/test-suite/tests/srfi-11.test index ec2ed86c8..40563dc18 100644 --- a/test-suite/tests/srfi-11.test +++ b/test-suite/tests/srfi-11.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright 2004, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-srfi-11) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-13.test b/test-suite/tests/srfi-13.test index 89759d0d3..9dbf5bf40 100644 --- a/test-suite/tests/srfi-13.test +++ b/test-suite/tests/srfi-13.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-strings) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-14.test b/test-suite/tests/srfi-14.test index fc6307149..8c678cdd5 100644 --- a/test-suite/tests/srfi-14.test +++ b/test-suite/tests/srfi-14.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-srfi-14) :use-module (srfi srfi-14) diff --git a/test-suite/tests/srfi-17.test b/test-suite/tests/srfi-17.test index 4841f2ef1..d9e0054ba 100644 --- a/test-suite/tests/srfi-17.test +++ b/test-suite/tests/srfi-17.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-srfi-17) :use-module (test-suite lib) diff --git a/test-suite/tests/srfi-18.test b/test-suite/tests/srfi-18.test index 3c7090643..b769ce1a2 100644 --- a/test-suite/tests/srfi-18.test +++ b/test-suite/tests/srfi-18.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2007, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-srfi-18) #:use-module (test-suite lib)) diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test index 259a88a4e..f48ce6286 100644 --- a/test-suite/tests/srfi-19.test +++ b/test-suite/tests/srfi-19.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;; SRFI-19 overrides current-date, so we have to do the test in a ;; separate module, or later tests will fail. diff --git a/test-suite/tests/srfi-31.test b/test-suite/tests/srfi-31.test index b23d3e20f..6d65ce2bc 100644 --- a/test-suite/tests/srfi-31.test +++ b/test-suite/tests/srfi-31.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/srfi-34.test b/test-suite/tests/srfi-34.test index 2195d9471..17864b642 100644 --- a/test-suite/tests/srfi-34.test +++ b/test-suite/tests/srfi-34.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-srfi-34) :duplicates (last) ;; avoid warning about srfi-34 replacing `raise' diff --git a/test-suite/tests/srfi-35.test b/test-suite/tests/srfi-35.test index 83efd61d9..24ee60248 100644 --- a/test-suite/tests/srfi-35.test +++ b/test-suite/tests/srfi-35.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2007, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-35) :use-module (test-suite lib) diff --git a/test-suite/tests/srfi-37.test b/test-suite/tests/srfi-37.test index d7745876d..1f739c5c5 100644 --- a/test-suite/tests/srfi-37.test +++ b/test-suite/tests/srfi-37.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2007, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-37) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-39.test b/test-suite/tests/srfi-39.test index 277a3c60d..0153e58b4 100644 --- a/test-suite/tests/srfi-39.test +++ b/test-suite/tests/srfi-39.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-39) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-4.test b/test-suite/tests/srfi-4.test index ee773a3f9..8a9d53a61 100644 --- a/test-suite/tests/srfi-4.test +++ b/test-suite/tests/srfi-4.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (srfi srfi-4) (test-suite lib)) diff --git a/test-suite/tests/srfi-6.test b/test-suite/tests/srfi-6.test index 217fc9f78..68fc70dff 100644 --- a/test-suite/tests/srfi-6.test +++ b/test-suite/tests/srfi-6.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/srfi-60.test b/test-suite/tests/srfi-60.test index fff89f1ca..940934f3e 100644 --- a/test-suite/tests/srfi-60.test +++ b/test-suite/tests/srfi-60.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright 2005, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-60) #:duplicates (last) ;; avoid warning about srfi-60 replacing `bit-count' diff --git a/test-suite/tests/srfi-69.test b/test-suite/tests/srfi-69.test index 1d240d28c..e99b76c6d 100644 --- a/test-suite/tests/srfi-69.test +++ b/test-suite/tests/srfi-69.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-69) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-88.test b/test-suite/tests/srfi-88.test index 63f40cc40..b879941b2 100644 --- a/test-suite/tests/srfi-88.test +++ b/test-suite/tests/srfi-88.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-88) :use-module (test-suite lib) diff --git a/test-suite/tests/srfi-9.test b/test-suite/tests/srfi-9.test index c212ea6aa..f8cb0b491 100644 --- a/test-suite/tests/srfi-9.test +++ b/test-suite/tests/srfi-9.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-numbers) #:use-module (test-suite lib) diff --git a/test-suite/tests/srfi-98.test b/test-suite/tests/srfi-98.test index 3fbb1ef03..ac0d5178e 100644 --- a/test-suite/tests/srfi-98.test +++ b/test-suite/tests/srfi-98.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright 2009 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-srfi-98) #:use-module (srfi srfi-98) diff --git a/test-suite/tests/streams.test b/test-suite/tests/streams.test index 92277c19c..780021c7e 100644 --- a/test-suite/tests/streams.test +++ b/test-suite/tests/streams.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2004, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-streams) :use-module (test-suite lib) diff --git a/test-suite/tests/strings.test b/test-suite/tests/strings.test index 51f163254..ffc6955ca 100644 --- a/test-suite/tests/strings.test +++ b/test-suite/tests/strings.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-strings) #:use-module (test-suite lib)) diff --git a/test-suite/tests/structs.test b/test-suite/tests/structs.test index 127115eb2..e114abb1a 100644 --- a/test-suite/tests/structs.test +++ b/test-suite/tests/structs.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2006, 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-structs) :use-module (test-suite lib)) diff --git a/test-suite/tests/symbols.test b/test-suite/tests/symbols.test index 3fe3402f8..5be2743b2 100644 --- a/test-suite/tests/symbols.test +++ b/test-suite/tests/symbols.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-symbols) #:use-module (test-suite lib) diff --git a/test-suite/tests/syncase.test b/test-suite/tests/syncase.test index c681fc381..4cd93369a 100644 --- a/test-suite/tests/syncase.test +++ b/test-suite/tests/syncase.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;; These tests are in a module so that the syntax transformer does not ;; affect code outside of this file. diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test index aa2e05127..0593ea6a6 100644 --- a/test-suite/tests/syntax.test +++ b/test-suite/tests/syntax.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2001,2003,2004, 2005, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-syntax) :use-module (test-suite lib)) diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test index 6400d2dd8..26efe8580 100644 --- a/test-suite/tests/threads.test +++ b/test-suite/tests/threads.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright 2003, 2006, 2007 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. -;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. -;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-threads) :use-module (ice-9 threads) diff --git a/test-suite/tests/time.test b/test-suite/tests/time.test index d5639eb68..38a49d384 100644 --- a/test-suite/tests/time.test +++ b/test-suite/tests/time.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 1999, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite test-time) #:use-module (test-suite lib) diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test index 18b67d6c8..ec410b52b 100644 --- a/test-suite/tests/tree-il.test +++ b/test-suite/tests/tree-il.test @@ -6,13 +6,13 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. -;;;; +;;;; version 3 of the License, or (at your option) any later version. +;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/test-suite/tests/unif.test b/test-suite/tests/unif.test index 576a9286c..61dbeb89e 100644 --- a/test-suite/tests/unif.test +++ b/test-suite/tests/unif.test @@ -5,7 +5,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/test-suite/tests/vectors.test b/test-suite/tests/vectors.test index 738a0828a..22434bfc6 100644 --- a/test-suite/tests/vectors.test +++ b/test-suite/tests/vectors.test @@ -2,20 +2,19 @@ ;;;; ;;;; Copyright (C) 2003, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (test-suite vectors) :use-module (test-suite lib)) diff --git a/test-suite/tests/version.test b/test-suite/tests/version.test index b2a491950..5b7acc93d 100644 --- a/test-suite/tests/version.test +++ b/test-suite/tests/version.test @@ -3,20 +3,19 @@ ;;;; ;;;; Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. ;;;; -;;;; This program is free software; you can redistribute it and/or modify -;;;; it under the terms of the GNU General Public License as published by -;;;; the Free Software Foundation; either version 2, or (at your option) -;;;; any later version. +;;;; This library is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. ;;;; -;;;; This program is distributed in the hope that it will be useful, +;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;;; GNU General Public License for more details. +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. ;;;; -;;;; You should have received a copy of the GNU General Public License -;;;; along with this software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this library; if not, write to the Free Software +;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (use-modules (test-suite lib)) diff --git a/test-suite/tests/weaks.test b/test-suite/tests/weaks.test index 7bb77b07c..b469887c2 100644 --- a/test-suite/tests/weaks.test +++ b/test-suite/tests/weaks.test @@ -4,7 +4,7 @@ ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either -;;;; version 2.1 of the License, or (at your option) any later version. +;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/testsuite/run-vm-tests.scm b/testsuite/run-vm-tests.scm index 1485fc1e6..c6c7a5dfe 100644 --- a/testsuite/run-vm-tests.scm +++ b/testsuite/run-vm-tests.scm @@ -3,17 +3,17 @@ ;;; Copyright 2005 Ludovic Courtès ;;; ;;; -;;; This program is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2 of the License, or -;;; (at your option) any later version. +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 3 of +;;; the License, or (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. +;;; GNU Lesser General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License +;;; You should have received a copy of the GNU Lesser General Public License ;;; along with this program; if not, write to the Free Software ;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA