eperl-2.2.14/ANNOUNCE100664 1750 1750 5530 6557043232 115510ustar rseen ============================================================================== NEWSGROUPS (REGULAR) -------------------- Subject: ANNOUNCE: ePerl 2.2.0 (Embedded Perl 5 Language) Newsgroup: comp.infosystems.www.servers.unix, comp.lang.perl.misc, de.comp.lang.perl, sdm.announce NEWSGROUPS (MODERATED) ---------------------- Subject: SOFTWARE: ePerl 2.2.0 (Embedded Perl 5 Language) To: www-announce@boutell.com Subject: ePerl 2.2.0 (Embedded Perl 5 Language) To: linux-announce@news.ornl.gov MAILING-LISTS ------------- Subject: ANNOUNCE: ePerl 2.2.0 (Embedded Perl 5 Language) To: new-httpd@hyperreal.com, perl5-porters@perl.org ============================================================================== After a long 2.2 beta cycle I'm proud to release... ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language Version 2.2.0 (18-07-1997) ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. Copyright (c) 1996-1997 Ralf S. Engelschall, All rights reserved. Summary of Program ================== o Implementation: - ANSI C o Min Requirements: - underlaying Unix derivate - ANSI C compiler - already installed Perl 5.004 (full functionality) or at least 5.003+EMBED (minimum functionality) o Distribution: - freely available - no charge - GNU General Public License or Artistic License o Status: - Genesis: March 1996 - First major release: March 1996 (1.0) - Last major release: April 1997 (2.1) - stable Major Changes from Version 2.1 to 2.2 ===================================== o Changed Quotation/Delimiter Parsing o Smarter and Optimized Parser o Support for '=' block prefix o HTML entity conversion inside ePerl blocks o Perl Taint and Warning modes now available o New ePerl Preprocessor o New option -I for include path o New Perl 5 interface module for ePerl parser: Parse::ePerl o New ePerl emulation handler for Apache+mod_perl: Apache::ePerl o New option -h for consistency ;-) o First attempt to write a converter from (X)SSI to ePerl o Built-in GIF images o Enhanced portability o Compiles and runs out-of-the-box on major Unix derivates. eperl-2.2.14/ARTISTIC100664 1750 1750 13737 6330400072 116010ustar rseen The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End eperl-2.2.14/COPYING100664 1750 1750 43127 6316360420 114710ustar rseen GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 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 Program or any portion of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, 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 Program, 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 Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) 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; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, 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 executable. However, as a special exception, the source code 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. If distribution of executable or 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 counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program 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. 5. 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 Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program 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 to this License. 7. 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 Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program 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 Program. 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. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program 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. 9. The Free Software Foundation may publish revised and/or new versions of the 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 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 Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, 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 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. 12. 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 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. 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 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) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This 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 Library General Public License instead of this License. eperl-2.2.14/CREDITS100664 1750 1750 2650 6557042666 114520ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language CREDITS ======= Credit has to be given to the following people who contributed ideas, stuff, bugfixes, hints etc. (in alphabetical order): o Steve Dodd o J. Douglas Dunlop o Anthony Fok o Eric Howe o Michael Lazar o Joerg Lenneis o Doug MacEachern o Ewan McPhail o Joseph W. Norton o Mike Pheasant o Andrew Pimlott o Tiago Luz Pinto o Jim O'Quinn o Christian Reiber o Phil Ritzenthaler o Heiko Schlittermann o Marc Singer o Jarom Smith o Sone Takeshi o Karl Wallner o Ian Wojtowicz ...and all other ePerl users who gave me feedback but I've forgot... eperl-2.2.14/ChangeLog100664 1750 1750 65644 6561074520 122250ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language ChangeLog ========= Changes between 2.2.13 and 2.2.14 --------------------------------- [Bugfixes only] 970727 o Fixed HTTP header parsing: Now beside the header/body delimiter "\n\n" also "\r\n\r\n" is recogized correctly. This fixes especially the communication between CGI.pm and ePerl. [Thanks to Steve Dodd for hints and initial patches] o Fixed examples in Apache::ePerl manual [Thanks to Ian Wojtowicz for hints] o Fixed recognization of CGI situation where GET is used instead of POST to send data to ePerl scripts. [Thanks to Steve Dodd for hint] o Added a CREDITS file to give explicit credits to the people who contributed stuff in the past 970802 o Replaced build user/host/domain/time determination stuff with a new `buildinfo' script I've written for Apache which is more robust. o Replaced mkinstalldirs and install-sh with the cleaned up versions I've done for Apache 1.3's APACI stuff. o Ported to Perl 5.005 where variables start with PL_, etc. Changes between 2.2.12 and 2.2.13 --------------------------------- [Security and Bug Fixes] 980120 o Fixed construction of URLs inside Apache::ePerl for cases where the server port is not 80. [Thanks to Jim O'Quinn for hint] 980202 o Changed .so generation to be more compatible 980404 o Made etc/newvers more portable 980605 o Fix a minor comparison bug in Apache::ePerl [Thanks to Eric Howe for hint] 980705 o Fixed copyright statements by adding 1998 and removing the "All Rights Reserved" part because this is incompatible with the GPL. 980710 o Fix again a non-trivial-to-fix security bug related to the inconsitency way webservers handle QUERY_STRINGs: this time by making more exact parameter comparison. Now we check back even the argv[optind] against the provided QUERY_STRING, etc. Now the determination of the three runtime modes (CGI, NPH-CGI, FILTER) should be correct. [Thanks to Tiago Luz Pinto who reported this security hole on bugtraq] Changes between 2.2.11 and 2.2.12 --------------------------------- [Bugfix only] 971231 o ARGL! We really need 1998 now: Yesterday I've released 2.2.11 with two nasty syntax errors in the configure script. Hmmmmm... 1998 is now really needed, I think. [Thanks to Anthony Fok and ??? for quick response and patch] Changes between 2.2.10 and 2.2.11 --------------------------------- [Bugfix only] 971230 o Activated Perl Locale support for both Perl 5.003 and Perl 5.004 variants. o Fixed owner determination in eperl_main.c: ePerl core dumped when the owner of the script does not exists in the passwd database. o Updated contrib/pkg/ files o Updated VERSIONS file Changes between 2.2.9 and 2.2.10 -------------------------------- [Bugfix only] 971228 o little distribution bug: the asc2c was not run before the 2.2.9 release, so it has to be run by the builder which is not what was intended. Changes between 2.2.8 and 2.2.9 ------------------------------- [Bugfix only] 971120 o fixed demo.image.phtml description 971221 o fixed a really nasty fclose() bug in eperl_main.c which caused core dumps under Debian GNU/Linux with libc6. [Thanks to and Anthony Fok for hints] Changes between 2.2.7 and 2.2.8 ------------------------------- [Bugfix and Minor Enhancement] 971107 o ported to AIX 4.1.x by adding a fix for Perl's ccdlflags 971108 o again made Apache::ePerl even more complete: added the following env variables similar to nph-eperl: SCRIPT_SRC_URL, SCRIPT_SRC_URL_DIR, SCRIPT_SRC_URL_FILE, SCRIPT_SRC_PATH, SCRIPT_SRC_PATH_DIR, SCRIPT_SRC_PATH_FILE, SCRIPT_SRC_MODIFIED, SCRIPT_SRC_MODIFIED_CTIME, SCRIPT_SRC_MODIFIED_ISOTIME, SCRIPT_SRC_SIZE, SCRIPT_SRC_OWNER o enhanced the Apache::ePerl status page: now displays also the cache size 971116 o fixed shebang mode for webserver environment. [Thanks to J. Douglas Dunlop for hint] o added hint to INSTALL file that PerlIO+SfIO is currently not supported. o fixed HTTP header parsing: now setting of cookies (e.g. via Perl's CGI module) work correctly. o fixed HTTP header parsing in Apache::ePerl. Now even the special-case "Content-type: ..." works as expected. 971117 o fixed typos in eperl.pod o fixed preprocessing for Apache::ePerl o overhauled the demo webpages under eg/. Now the CGI::Cookie is used an example for CGI.pm. o adjusted VERSIONS file Changes between 2.2.6 and 2.2.7 ------------------------------- [Bugfix and Minor Enhancement] 971102 o reduced memory consumption of Apache::ePerl by specificing detailed import flags o fixed prototype bug in Parse::ePerl's XS part [Thanks to Doug MacEachern for patch] o removed the not needed AUTOLOAD facility from Parse::ePerl because this causes problems. [Thanks to Doug MacEachern for hint] 971104 o added VERSION_LANGUAGE and VERSION_INTERPRETER environment variables to Apache::ePerl the same way it is provides by the stand-alone program. 971105 o adjusted the URL to the Perl homepage in the PODs. o fixed Content-length header generation in Apache::ePerl o minor cleanup to Parse::ePerl 971106 o added workarounds to Parse::ePerl for tainted environments like the "PerlTaintCheck On" under Apache/mod_perl where Parse::ePerl is called from Apache::ePerl. o made the Apache::ePerl error page similar to the one nph-eperl displays. Changes between 2.2.5 and 2.2.6 ------------------------------- [Bugfix and Minor Enhancement] 970903 o merged ANNOUNCE and ANNOUNCE.ADDR files o slightly fixed comments in eperl_getopt.[ch] 970911 o added mod/README with CPAN module snipppet o changed the $VERSION variables to hold a real floating point number like 2.0206 instead of 2.2.6 o updated contrib/pkg/fbsdpkg/ stuff o fixed a bug in the preprocessor: filedescriptors were not closed for #include directive [Thanks to mhalperi@bbnplanet.com for patch] 971024 o fixed configure's Perl version check because of Perl 5.004_04's changed -v output. o added Apache->request($r) to Apache::ePerl for Apache::Registry modules like new CGI.pm under mod_perl-1.02. o updated PORTING file o added GNU long options o changed -i (nocase on delimiters) to -n o cleaned up source by sorted options o now the usage is only displayed on -h/--help o now the copyright and disclaimer is displayed on -V, too. o now configure removes -D_POSIX_SOURCE from Perl's ccflags under IRIX 5.3 because this causes problems with strdup. o now configure explicitly removed newlines at the end of the determined hostname/domainname pair because these would lead to a failure for GNU autoconfs final sed-part. [Thanks to for bug report] o added another -f test inside configure when trying to find a perl binary because when /tmp/perl is a directory -x alone fails. o added eperl_config.[ch] and moved some code from eperl_global to this file. o added test for strdup() to configure and a private replacement version to eperl_config.c (from FreeBSD 2.2) because Ultrix is missing strdup(). [Thanks to Joerg Lenneis for hint] o now the XS-Init function in eperl_perl5.c has a variable list of newXS() calls which come from the new eperl_perl5_sm.h file which itself is generated by eperl_perl5_sm.pl. This way we're now really able to use static module when no DynaLoader is available. [Thanks to Joerg Lenneis for hint] 971027 o fixed also PORTING.test for new "perl -v" output o changed "prefix" stuff in Makefile.in to make the life of our Debian friends a little bit easier... ;_) o added Debian stuff to contrib/pkg/dpkg/ o added workaround in aclocal.m4 for SunOS's braindead "date" o sucessfully run PORTING.test on platforms found in PORTING Changes between 2.2.4 and 2.2.5 ------------------------------- [Bugfix and Minor Enhancement] 970902 o fixed error catching for Parse::ePerl::Precompile. [Thanks to Joseph W. Norton for hint] 970903 o added better support for PerlIO/StdIO. The combination PerlIO/SfIO is currently untested and may be broken because the I/O redirection for SfIO is very different from StdIO. o added Perl I/O layer info to eperl -V o added built time/user info to configure and eperl -V Changes between 2.2.3 and 2.2.4 ------------------------------- [Bugfix and Major Enhancement] 970901 o added more hints to PORTING file o fixed a bug in Parse::ePerl for case where $error was undefined [Thanks to Joseph W. Norton for patch] o fixed -I option: now it works as expected even for cases where you want to add stuff to @INC which is needed at _parse_ time. o now the webmaster can configure the delimiters and other stuff via Apache::ePerl::Config hash from within ... sections in Apache. An example is added to the synopsis of Apache::ePerl manpage. Changes between 2.2.2 and 2.2.3 ------------------------------- [Security Bugfix and Minor Enhancement] 970821 o fixed installation section in Apache::ePerl manpage o ***** SECURITY BUGFIX ***** ePerl versions <= 2.2.2 have a heavy security hole when running under a webserver's CGI/1.1 interface. Because ePerl assumed here there are not command line arguments. THIS IS WRONG! According to the CGI/1.1 spec when an ISINDEX document is used (QUERY_STRING!) the query is provided on the command line by the webserver. So, when only one query existed, there was exactly one command line argument and ePerl switched to stand-alone runtime mode and all CGI-mode restrictions are falling down!! ***** SECURITY BUGFIX ***** [Thanks to Andrew Pimlott for finding this security bug!] o now a chdir is done before the preprocessor is run so relative paths in #include directives work as expected. [Thanks to Marc Singer for patch] Changes between 2.2.1 and 2.2.2 ------------------------------- [Bugfix and Porting Enhancement] 970804 o removed bad demo.errsync.phtml 970806 o fixed a few spaces in Makefile.in 970807 o removed wrong $AUTOLOAD from Apache::ePerl o fixed a few other things in Apache::ePerl and Parse::ePerl o added 2.2.1 to VERSIONS file o moved the place of the release macros in Makefile.in before any targets because some braindead Make variants don't like it in the middle of targets. o added a new test 09-dynaloader.t for testing if dynamic loading works correctly. o added error capturing for Parse::ePerl::Evaluate via __DIE__ hook. o fixed the PODs o moved -lperl at linking after DynaLoader 970808 o fixed configure help string for --with-perl=PATH o added missing .eperl extension in eperl_security.h [Thanks to Heiko Schlittermann for hint] o added more stuff to INSTALL.APACHE 970811 o fixed wrong coding in setuid check [Thanks to SONE Takeshi for patch] Changes between 2.2.0 and 2.2.1 ------------------------------- [Bugfix and Enhancement] 970721 o fixed eg/demo.net.phtml 970727 o optimized the Perl 5 internal stuff in eperl_eperl5.c [Thanks to Doug McEachern for patches] o added support for Cwd parameter to Parse::ePerl::Precompile and use this also in Apache::ePerl when precompiling. [Thanks to Michael Lazar for idea] o added support for quotation marks and angle brackets in #include and #sinclude directives: these are just skipped. [Thanks to Karl Wallner for idea] o now DOCUMENT_ROOT is automatically added to @INC in CGI modes. [Thanks to Karl Wallner for idea] o now Apache::ePerl always uses option "ConvertEntities=1" when calling Parse::ePerl::Translate. [Thanks to Mike Pheasant for hint] o fixed demos for strict variables and added both .phtml and .iphtml files (same contents!) for easier testing with both nph-eperl and Apache::ePerl. o added support for generated custom HTTP headers to Apache::ePerl. 970801 o added "/eperl" to $libdir for installation o now "make install" installs the demo pages into $libdir/eg o added PORTING.test script for making porting tests easier o changed test for Perl in configure from "test -f" to "test -x" o fixed the examples again. o fixed a few things in eperl.pod 970802 o enhanced the overwriting of the perl and cc programs for the build process. See INSTALL for more details. o enhanced PORTING.test to be able to set perl and cc. o added overview to INSTALL Changes between 2.2b9 and 2.2.0 ------------------------------- [Bugfix only] 970706 o added missing eperl_getopt.h include for eperl_main.c which caused the compilation at least under SunOS 4.x to fail. o added more descriptive error message to configure when Perl version is to old o added hint to INSTALL that the same environment have to be used for compiling ePerl as for Perl. 970709 o added klduge to support Perl+SFIO where fwrite has to be replaced by PerlIO_write o enabled ``CC=/path/to/cc ./configure'' again for cases where one wants to overwrite the used C compiler. 970714 o removed some unused defines in eperl_global.h which lead to problems under AIX 4.1.4 o removed the P_ macros in eperl_proto.h because AIX 4.1.4 is not happy about it because of PrintError defines which has "...". Should be ok without P_ because we need an ANSI compiler since the first days. 970715 o changed Perl requirement from 5.00390 to 5.00325 970718 o added ANNOUNCE.ADDR file o updated NEWS file and updated ANNOUNCE file o updated VERSIONS file o slightly adjusted NEWS file o created contrib/utils/00README file o added the package files to contrib/pkg/ o updated the demo files Changes between 2.2b8 and 2.2b9 ------------------------------- 970623 o added docs about #elsif to eperl.pod and NEWS file 970628 o added VERSIONS file with ePerl history o shit happens: the preprocessor parsing had nasty bugs where a string "#include" somewhere in the text leads to a total skip of all real "^#include" directives :-( Changes between 2.2b7 and 2.2b8 ------------------------------- 970615 o added hint about Options +ExecCGI to mod/Apache/ePerl.pm o split the ChangeLog file into seperated files o added old stuff from 2.1.2 to end of NEWS file o created a KNOWN.BUGS file o created a INSTALL.NSAPI o slightly fixed the POD in mod/Apache/ePerl.pm o created a new set of demo files in eg/ o fixed some README headers 970620 o created a contrib/ dir and initially started to write a shtml2phtml script which converts (X)SSI to ePerl o fixed tabs in top-level Makefile 970622 o changed red colors to blue ones in error page o added the new powered-by-ePerl image which can be retrieved via URL nph-eperl/powered.gif o added del2del script to contrib/ o added a #elsif to the preprocessor Changes between 2.2b6 and 2.2b7 ------------------------------- 970602 o now etc/newvers always removes /tmp/genopt [Thanks to Phil Ritzenthaler for hint] o now configure determines the full operating system id from Perl's Config.pm 970604 o set -Wl,-woff 85 only for IRIX 6.x because IRIX 5.x hates this option.. [Thanks to Ewan McPhail and Phil Ritzenthaler for hint] o fixed the preprocessor: the inital searching of the directives was broken, only worked when a specific order was used. So some directives were skipped :-( o added a #sinclude (secure include) directive which is the same as #include but removes all begin and end delimiters, so this one is a secure way of including stuff from foreign servers. o rewritten the preprocessor part of eperl.pod Changes between 2.2b5 and 2.2b6 ------------------------------- 970601 o added a #c preprocessor directive to be able to comment out stuff (even to use "#c #include..." to disable an include directive) [Thanks to J. Douglas Dunlop for hint] o now the preprocessor checks the HTTP response code when http://.. is uses as the file: - when 301 and 302 are returned it searches for the new URL in the Location-header and restarts with this one - when a response code other than 200 (OK) is returned it fails the same way as it fails when a local file it not found: with an error. [Thanks to J. Douglas Dunlop for hint] o removed the Bash check in configure because this it not used Changes between 2.2b4 and 2.2b5 ------------------------------- 970530 o fixed perlvers -> perl_vers stuff o fixed again problem with VERSION stuff: ePerl.pm's were broken (ARGL!) Changes between 2.2b3 and 2.2b4 ------------------------------- 970529 o fixed preprocessor: #include only valid at column 0, i.e. at start of line o added a test 08 for the preprocessor o now any characters are skipped at end of #include lines up to the newline o added new parsing feature: "_" as the last non-whitespace command disables the automatic adding of the final semicolon. This is to be able to writeo <: if { :> ... <: } :> etc. o added new optional(!) parsing feature which is per-default disabled(!): "\" directly before a newline character outside ePerl blocks prevent the newline to be printed, i.e. the line is continued in the output This feature can be turned on via new option -L. o added new parsing feature: when an end delimiter is directly followed by ``//'' this discards all data up to and including the following newline. o added three new commands to preprocessor which gets converted to ePerl blocks: ``#if expr'' -> ``<: if (expr) { _:>//' ``#else'' -> ``<: } else { _:>//'' ``#endif'' -> ``<: } _:>//'' o imported the patch from ePerl 2.1.2 which fixes a problem under non-GCC compilers with a semicolon in eperl_security.h o removed the sin_len stuff 970530 o !! Essential Change !! configure now imports all essential compilation flags from Perl's Config.pm, including the compiler. This is necessary to make ePerl work even under HP-UX and IRIX where they need the special compiler and special compiler flags. The point is that Perl already determined the correct flags, so we can use it. o changed C++ style comments in eperl_parse.c to C style o fixed a missing "int" in eperl_sys.c o renamed eperl_getopt.c to original eperl_egetopt.c and make the namespace clean, i.e. renamed optXXX to egetopt_optXXX. This is needed at least for IRIX o changes egetopt() slightly o replaced the old egetopt() by the GNU getopt() because egetopt() was broken under some systems like IRIX. o option -h now never displays the version o added a missing semicolon in mod/Parse/ePerl.pm o renamed and fixed mod/Parse/t/04_compile.t o now etc/newvers resets the LANG variable to prevent LOCALE warnings o provided an own copy of perl_eval_pv() which is too new. It was introduced in Perl 5.003_97e. Now plain old Perl 5.003 will work again. o the Perl 5 interface modules can only be used with Perl 5.003_90 or higher because of the TIEHANDLE stuff which is not working in prior releases. o fixed update-version target in Makefile.i Changes between 2.2b2 and 2.2b3 ------------------------------- 970521 o fixed NEWS and ANNOUNCE files o spellchecked INSTALL, INSTALL.APACHE and eperl.pod 970522 o fixed eperl.pod =back stuff and added a paragraph about software leverage. 970523 o added reference for Parse::ePerl and Apache::ePerl to eperl.pod o changed abstract in all source files 970525 o ** added new option -P for an own #include preprocessor. ** o added new option -I: same as for "perl" to add directories to @INC and preprocessor 970526 o ** added support for URLs to #include ** o added a kludge to etc/newvers for systems like BSDI where no "getopt" program is available 970527 o added Parse::ePerl::Preprocess which is the interface to the new preprocessor o added six new environment variables: SCRIPT_SRC_PATH, SCRIPT_SRC_PATH_DIR and SCRIPT_SRC_PATH_FILE SCRIPT_SRC_URL, SCRIPT_SRC_URL_DIR and SCRIPT_SRC_URL_FILE o fixed a long-standing bug: temporary files were not removed :-( o added new option -C for HTML entity conversions inside ePerl blocks. This is for people who use HTML editors which have now knowledge of ePerl code. 970529 o slightly fixed eperl.pod at some places Changes between 2.2b1 and 2.2b2 ------------------------------- 970518 o fixed ``make install UNINST=1'' case for Makefile.PL 970520 o added more POD to Apache::ePerl Changes between 2.2a2 and 2.2b1 ------------------------------- 970505 o again reorganized the source code and renamed a lot of functions. o created modules/ with h2xs for a Parse::ePerl module o created generation of libeperl.a containing shared objects for Parse::ePerl 970506 o created a top-level Makefile.PL for faking a MakeMaker distribution 970509 o created a Apache::ePerl module 970510 o added option -i for making the delimiters case-sensitive in more explicit way 970511 o added t/05* to Parse::ePerl and made delimiter case variable 970513 o enhanced Parse::ePerl and finished Apache::ePerl 970515 o fixed tests 4 and 5 for non-Bash users and fixed a char/int problem in eperl_main.c and eperl_sys.c [Thanks to Jarom Smith ] 970516 o finished Apache::ePerl and Parse::ePerl 970517 o added a INSTALL.APACHE which describes the installation of ePerl as an SSSL under Apache Changes between 2.2a1 and 2.2a2 ------------------------------- 970504 o removed -s and added -m 755 to install in configure o optimized the parser; no ``print "";'' constructs are never created which at least slightly speeds up processing. Changes between 2.2a0 and 2.2a1 ------------------------------- 970503 o now the begin and end delimiters are searched case-insensitive. o added -h for displaying the usage list. Just to be consequent with options. o added leading and trailing whitespaces for Perl blocks when translating the source file to make the -x display more readable. Changes between 2.1.1 and 2.2a0 ------------------------------- 970502 o added support for '=' prefix: now <:= ... :> automatically gets converted to "print ...". Now one can interpolate variables in a more shorter way via instead of the long (in conjunction with the next enhancements) o now ePerl is much smarter when converting the ePerl blocks, i.e. it now recognizes final semicolons and automatically puts one if missing. Now <: cmd;cmd :> is also valid. o Whitespaces are not only stripped from the beginning of a ePerl block. Now they are stripped from the end, too. o !!CHANGED THE PARSING AGAIN!! Now again (as in 2.0.3) ePerl block end delimiters are found via plain forward search. No quoted strings are recognized. The reason is that constructs with odd number of quoting characters are more often seen than end delimiters in quoted string. And one more fact: It is easier to escape the end delimiter in a quotes string (e.g. via backslahes) than to rewrite a complex construct (e.g. m|"[^"]+"| !!). o added -T (Tainting) and -w (Warnings) options which can be used like the same in "perl". o added alpha and snap releases to NEWVERS eperl-2.2.14/ChangeLog.1x100664 1750 1750 2535 6351465106 125230ustar rseen C h a n g e L o g o f e P e r l ___________________________________________________________________________ Changes between 1.4 and 1.5 --------------------------- 9609xx o started with the work to split the ePerl functionality into a library and create a stand-alone CGI-program and a Apache module which use this library. Changes between 1.3 and 1.4 --------------------------- 960906 o changed source from PATH_INFO to PATH_TRANSLATED o cleanup the sources and released it the first time officially on the Web Changes between 1.2 and 1.3 --------------------------- 960622 o created WWW pages o changed all old EPL references to ePerl o added a lot of comments to the source o made the begin and end delimiters variable o changed the end delimiter from ">" to "!>" because ">" makes problems if it occurs inside the ePerl block Changes between 1.1 and 1.2 --------------------------- 960510 o created GNU autoconf files, Makefiles, etc. Changes between 1.0 and 1.1 --------------------------- 960415 o fixed a bug in the escape code: more chars have to be escaped! Changes between *GENESIS* and 1.0 --------------------------------- 960323 o adapted for Apache 1.1b0+ak 960310 o *GENESIS* eperl-2.2.14/ChangeLog.20100664 1750 1750 5524 6351465116 124160ustar rseen C h a n g e L o g o f e P e r l ___________________________________________________________________________ Changes between 2.0.2 and 2.0.3 ------------------------------- 970104 o added some documentation from the webpages to misc/doc/ o added a FreeBSD ports area to the webpages Changes between 2.0.1 and 2.0.2 ------------------------------- 970104 o remove of the temporary files were disabled for debugging purposes. Fixed. Changes between 2.0.0 and 2.0.1 ------------------------------- 970103 o removed unused variables Changes between 1.0 and 2.0.0 ----------------------------- 970102 o ePerl now supports the Perl 5 DynaLoader interface for dynamic linking and loading of shared modules. This provides ePerl with the complete power of the underlying Perl 5 installation, including the shared objects. o ePerl now runs as NPH-CGI/1.1 script, i.e. as a Non-Parsed-Header CGI-script. This means that it is able to create its own HTTP header. Implications of this include: - To create HTTP headers just put them on the first lines in your script as plain text or just generate them on the fly by a ePerl block at the beginning of your script. With this feature you can for instance write pages which create images instead of HTML code. - If no headers were created by the script, it outputs it with MIME-type "text/html", including an additional calculated "Content-Length" header. - It automatically adds "Date" and "Server" headers. o ePerl now saves and checks the STDERR output of the script. If this contains data this implies an error and leads to the display of the error HTML page, displaying the STDERR output. o ePerl now saves the STDOUT output of the script (the real contents). This implies that it can calculate the Content-Length or ignore it if STDERR was created and the error page have to be displayed. o Additional environment variables will be set by ePerl prior to the execution of the bristled Perl blocks: SCRIPT_SRC_SIZE ....... the byte size of the original source file SCRIPT_SRC_MTIME ...... the integer value of the last modify time SCRIPT_SRC_MTIME_FMT .. the formatted string of the last modify time SCRIPT_SRC_OWNER ...... the owner of the original source file VERSION_INTERPRETER ... the ePerl version string VERSION_LANGUAGE ...... the Perl version string o The ePerl sources were split into distinct peaces to allow further development, e.g. a standalone program or a Apache API module. eperl-2.2.14/ChangeLog.21100664 1750 1750 25013 6351465126 124330ustar rseen C h a n g e L o g o f e P e r l ___________________________________________________________________________ Changes between 2.1.1 and 2.1.2 ------------------------------- 970529 o fixed a typo in eperl_security.h which caused problems for non GCC compilers, e.g. under IRIX. [Thanks to Ewan McPhail for hint] Changes between 2.1.0 and 2.1.1 ------------------------------- 970501 o added -P option to etc/newsvers o removed \n at SCRIPT_.._CTIME 970502 o replaced the $| = 1 stuff in eperl_perl5.c to the way mod_perl does it [Thanks to Doug MacEachern for patch] o enhanced the SetUID-based UID/GID checking: now in eperl_global.h is an option DO_ON_FAILED_STEP which either forces ePerl to error on any failed checks or go on but finally don't do the UID/GID switching o moved the security definitions from eperl_global.h to a new eperl_security.h and changed the references in eperl.pod Changes between 2.1b8 and 2.1.0 ------------------------------- 970426 o removed more obsolete @logfile@ stuff o again revised eperl.pod o !! CHANGED LICENSE !! NOW ePerl IS DISTRIBUTED AT THE TERMS OF EITHER THE GPL OR THE ARTISTIC LICENSE LIKE THE Perl 5.0 INTERPRETER ITSELF o fixed /tmp/x usage in configure o created PORTING file o tested ePerl on various platforms o made seteuid/setegid configureable via GNU autoconf for HP/UX and others o made the include files in eperl_globa.h conditional o made the -O2 conditional for GCC only Changes between 2.1b7 and 2.1b8 ------------------------------- 970425 o fixed installation manpath o fixed a security hole: the effective uid/gid have to be eliminated independend of mode and uid switching o fixed some typos in eperl.pod o rewritten the NEWS file o renamed the options: -D => -d, -E => -D (more intuitive) -b => -B, -e => -E (prevent conflicts) o fixed the order of command line option descriptions o removed the @logfile@ stuff from Makefile Changes between 2.1b6 and 2.1b7 ------------------------------- 970425 o fixed error page colors o changed some aux files: NEWS, TODO o added .cgi to allowed extensions for using shebang CGI/ePerl scripts o added more clear info about shebang to eperl.pod o fixed more bugs in eperl.pod o removed the exit on debug o finished the test suite o slightly fixed the usage output o added support for HEAD requests in case the server does not do it for us o documented provided env variables o created new isotime() function for SCRIPT_SRC_MODIFIED_ISOTIME variable o removed eperl_log.c because this will be used in later versions only Changes between 2.1b5 and 2.1b6 ------------------------------- 970414 o slightly changed the error message page 970418 o created -c for syntax check like "perl -c" o now the default delimiters are for CGI modes and <: ...:> for Filter mode o removed the delimiters defs in eperl_global.h but added a table to eperl.pod o completely rewritten the setuid security stuff !! o added security information to eperl.pod o now -x does something useful: it outputs the internally generated Perl script to /dev/tty and exits Changes between 2.1b4 and 2.1b5 ------------------------------- 970404 o now when used as a Unix filter the exit code is != 0 on error while for CGI scripts it is still 0 (needed to make the webserver happy and to force him to accept your HTML error page). o now prints the error message on stderr instead of stdout in Unix filter mode o fixed "make distclean", now t/Makefile is also removed. Changes between 2.1b3 and 2.1b4 ------------------------------- 970403 o fixed a bug in the b3 distribution: autoheader was not run, so to _compile_ ePerl GNU autoconf was needed. :-( o slight adjustments to eperl.pod Changes between 2.1b2 and 2.1b3 ------------------------------- 970402 o starting with Perl 5.003_96 the dXSUB_SYS define is empty. Removed the call and the gcc -Wall kludge from eperl_perl5.c o fixed etc/newvers o add "none" to configure DynaLoader check Changes between 2.1b1 and 2.1b2 ------------------------------- 970330 o reduced the logo GIF image in size to fit betteri into the browser window. The reduced one also has 10 KB less bytes. o made the Error HTML page nicer o removed the not used -a (age) option Changes between 2.1b0 and 2.1b1 ------------------------------- 970326 o added "-o file" to the usage message o when running as a Unix filter the current working directory is restored before the final outputfile (-o) is created. o documented that "-o outputfile" is relative to source file dir when runtime mode is CGI or NPH-CGI o added new-betalevel to Makefile.in Changes between 2.0.3 and 2.1b0 ------------------------------- 970322 o released as 2.1b0 for first test 970310 o added --with-perl=/path/to/perl option to ./configure to force a specific perl 970302 o removed getdate.c stuff :-( o added more tests o changed aux dir to etc for porting to WinNT :-( 970228 o debugged and cleanup up eperl_parse.c o fixed the core-dump under SunOS which comes from SunOS' non-POSIX vsprintf(). o removed the sdbm and md5 stuff because this should be introduced in 3.0 later only. o removed brainfile stuff o fixed another coredump in eperl_parse.c o fixed mode determination and mode-dependend error message 970227 o debugged and cleanup up eperl_parse.c 970226 o added dmalloc support for debugging 970224 o changed sprintf stuff to more portable variant in eperl_main.c o now autoconf checks for memmove and if not found eperl_parse.c uses bcopy. 970219 o changed bool checking to Autoconf stuff 970216 o ported to Linux: now bool is defined, prefix was replaced by AC_prefix to avoid collisions and the ccdlflags from Perl are used which need to be -rdynamic under Linux. Now ePerl compiles out of the box on Linux and runs fine, even with dynamic loading. 970210 o added getdate() code o added --enable-brainfile=/path/to/brainfile which sets the brain file where timestamps and md5 etc. are stored. o added -a option to set an age 970209 o added MD5 code o added SDBM code 970207 o changed -c and -s options to -m c and -m f o adding -m n for NPH/CGI, -m c is no only CGI o added stdin support via "-" and tmpfiles o added automatic tmpfile support with remove on interrupts or errors o now the old tempfiles are also created with new mechanism o added -o option for specifying an explicit outputfile instead of stdout o greatly imporved the manpage and brroght it to the latest status o created a test suite with Perl Test::Harness o now ePerl also accepts an empty file o added a security logfile which can be optionally enabled via "--enable-logfile=/path/to/logfile" at compile time. o added configure support for debug compilation via --enable-debug. This adds -g -ggdb3 to the CFLAGS and LDFLAGS and prevents the executable from being stripped. o removed the old doc/ subdir with the old FAQ and About file. 970206 o removed the generation of libeperl.a o added a real installation target to Makefile o removed eperl_parse.h, because it is still replaced by the generated eperl_proto.h o added -V option which now displays the compile parameters o removed the .. tags from error output because for the stand-alone version is looks bad. o added experimental TAINT...TAINT_NOT around perl_run. o added -d option to set real Perl variables and not just $ENV{'...'}; 970128 o added support to configure for Perl snapshot releases named 5.003_XX. o added a first security check: If operating in NPH-CGI mode the source file has to be one of the predefined valid file extensions. o now when ePerl runs as a setuid program (seteuid = 0) it switches to the uid/gid of the file owner 970127 o added -D option to set environment variables. (this is needed for my WML project where in pass 3 eperl gets called via -D...) o added -k option to keep CWD. (this is needed for my WML project where ePerl should not chdir to the /tmp/xxx files). 970118 o make the BEGIN/END_DELIMITER strings variables which now can be set via -b and -e (this is needed for my WML project where I use two variants of embedded Perl blocks) 970107 o fixed this changelog file o added test directory o cleanup of Makefile o removed obsolete prototypes in eperl_lib.h o cleaned up eperl_global.h o make eperl_getopt.[ch] gcc -Wall clean o added support for shebang usage, i.e. you can use #!/path/to/eperl at the top of your pages and use them as a CGI script now. ePerl will ignore the shebang line. o moved the system IO and env functions out to new eperl_sys.c o renamed eperl_lib to eperl_parse o Hups! all references to the CGI/1.0 standard were wrong, it actually is CGI/1.1... 970106 o added stand-alone interpreter with options o added -x and -v options o added README and LICENSE display o now ePerl reads the file from stdin if the argument is "-" o added a ePerl manual page for the stand-alone interpreter eperl-2.2.14/INSTALL100664 1750 1750 11146 6557043055 114740ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language Installation ============ OVERVIEW FOR THE IMPATIENT ========================== To install the stand-alone program into /path/to/eperl/root/{bin,man}/: $ ./configure --prefix=/path/to/eperl/root $ make $ make test $ make install To install the integrated Perl 5 modules into a) your existing Perl system under /path/to/existing/perl/area/lib/site_perl/{Parse,Apache}/: $ perl Makefile.PL $ make $ make test $ make install b) a private area of your own under /path/to/your/perl/area/lib/site_perl/{Parse,Apache}/: $ perl Makefile.PL PREFIX=/path/to/private/perl/area/ $ make $ make test $ make install DETAILED DESCRIPTION ==================== 1. Requirements ------------ Make sure you have a up-to-date release of Perl already installed on your system. Perl 5.004 is highly recommended to make use of the complete ePerl functionality. Previous releases are only supported partially: for the stand-alone program you need at least Perl 5.003 compiled with -DEMBED while for the Perl 5 interface modules you need at least Perl 5.003_90. Also make sure (``perl -V | grep sfio'')that your Perl-Interpreter doesn't use PerlIO in combination with SfIO, because this currently is not supported by ePerl. As a summary the following table shows the details of support grade: Perl stand-alone Perl 5 version ePerl program interface modules ------------------ ------------------ ----------------- 5.003 no no 5.003+-DEMBED yes (minimum) no 5.003_01-5.003_25 yes (minimum) no 5.003_25-5.003_99 yes yes 5.004 yes yes 5.005-... still untested still untested 2. Configuring the source ---------------------- The ePerl distribution is a hybrid source tree. It can be used to either install the stand-alone program "eperl" or the Perl 5 interface modules "Parse::ePerl" and "Apache::ePerl". Decide which one you want or just install both. First make sure that the ``perl'' program is in your path, so ``configure'' can find it. If you have different Perl binaries in your path the one with the latest version number will be used. If you want to force ePerl to be build with a specific Perl on your system (if you have more then one installed), you can also use option ``--with-perl=/path/to/bin/perl'' with ``configure'' or specify this specific one when running "Makefile.PL". Additionally you need a real ANSI C compiler like GCC to compile ePerl, but most of the vendor compilers also work. Per default the C compiler is used which was used for compiling your Perl itself. To overwrite this use ``CC=/path/to/bin/cc''. Now do _ONLY ONE_ of these steps: a) Configure the ePerl source via standard GNU conding style procedure for building the stand-alone program: $ [CC=/path/to/bin/cc] ./configure --prefix=/path/to/eperl/root [--with-perl=/path/to/bin/perl] b) Configure the ePerl sources via standard MakeMaker procedure for building the Perl 5 interface modules: $ [/path/to/bin/]perl Makefile.PL [PREFIX=/path/to/private/perl/area/] [CC=/path/to/bin/cc] 3. Build the object files ---------------------- Now you are ready to run the build process. Start it with a simple ``Make'' call: $ make 4. Run the Test suite ------------------ You can now run a test suite which will check if the programs work correctly before they get finally installed. I highly recommend you to do this step, even it is optional and not really required. $ make test 5. Installation ------------ Finally install ePerl into /path/to/eperl/root/{bin,man}/ (in case of the stand-alone program) or /path/to/private/perl/area/lib/site_perl/{Parse,Apache}/ (in case of the Perl 5 interface modules). _NO_ third-party files are changed on your system. $ make install 6. Cleanup ------- Now cleanup the source tree to make it a vanilla distribution again. $ make distclean eperl-2.2.14/INSTALL.APACHE100664 1750 1750 12446 6557316773 124320ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language I N S T A L L A T I O N as an integrated Server-Side-Scripting-Language for the Apache webserver (Version 1.2) =============================================== Actually you have two options to install ePerl inside an Apache webserver environment as a Server-Side-Scripting-Language (SSSL): a) ePerl as a NPH-CGI/1.1 complaint on-the-fly filter This is the preferred standard method of using ePerl as a SSSL. Here the original ePerl interpreter gets used by just installing the stand-alone program "eperl" as a on-the-fly filter for Apache. Use this when high performance is not the major option to you and when you want to use the Security features of ePerl (Extension-Checks, SetUID). Also notice that only this variant is fully supported by the author. b) ePerl as an Apache/mod_perl handler This is a special method of using ePerl as a SSSL by making use of the mod_perl package which already integrates a complete Perl 5 interpreter into Apache. This method is intended to be used for special purposes and situations where the webmaster really knows what you does. I RECOMMEND YOU NOT TO USE THIS VARIANT WHEN SECURITY IS AN IMPORTANT POINT TO YOU. Usually this means in practice that this variant is only used _additionally_ to the one in (a) in high-performance situations for scripts provided by the webmaster only. Don't use this variant for providing ePerl to Joe Average. So, this variant is not fully supported by the author, because it is (and can) not be a 100% compatible ePerl variant. This is because of principle restrictions, for instance this variant cannot provide the SetUID feature, etc. WHEN USING THIS VARIANT YOU SHOULD REALLY KNOW WHAT YOU ARE DOING! DON'T BLAME THE AUTHOR FOR ANY RISKS OR DAMAGES. Ok, here are the installation steps for the two variants. You can also follow both processes to install ePerl as variant (a) for your users and additionally as variant (b) for yourself (the webmaster). ePerl as a NPH-CGI/1.1 complaint on-the-fly filter -------------------------------------------------- 1. Proceed the standard installation as described in file ``INSTALL'' for the stand-alone program "eperl". In short: $ ./configure --prefix=/path/to/eperl/ $ make $ make test $ make install 2. Now install "eperl" as a special private version for Apache. First copy it to the CGI directory of Apache and use the NPH-CGI/1.1 complaint interface: $ cp /path/to/eperl/bin/eperl /path/to/apache/cgi-bin/nph-eperl 3. Additionally when you also want UID/GID-switching (see eperl(1) for more details), you have to set the Unix setuid bit: $ chown root /path/to/apache/cgi-bin/nph-eperl $ chmod u+s /path/to/apache/cgi-bin/nph-eperl 4. Finally configure Apache to process all pages with extension '.phtml' via the ePerl NPH-CGI/1.1 program. To accomplish this you have to add the following to your httpd.conf file of Apache: AddType application/x-httpd-eperl .phtml .eperl .epl Action application/x-httpd-eperl /internal/cgi/nph-eperl ScriptAlias /internal/cgi /path/to/apache/cgi-bin 5. Now test it by coping the files from the eg/ subdirectory of the ePerl distribution to an area which is accessible by Apache and request the ``demo-xx.phtml'' files through your webbrowser. They should be implicitly pipes on-the-fly through the ePerl interpreter. ePerl as an Apache/mod_perl handler ----------------------------------- 1. Proceed the standard installation as described in file ``INSTALL'' for the Perl 5 interface modules. In short: $ perl Makefile.PL $ make $ make test $ make install ATTENTION! For mod_perl to find the modules later you the "perl" in "perl Makefile.PL" should be the one which was also used when you have installed Apache/mod_perl. If not you have to supply paths later of add the paths to @INC inside your mod_perl init script. 2. Now configure Apache to process all pages with extension '.iphtml' (for internal .phtml) via the mod_perl handler Apache::ePerl. To accomplish this you have to add the following to your httpd.conf file of Apache: PerlModule Apache::ePerl SetHandler perl-script PerlHandler Apache::ePerl This forces all files under /root/of/webmaster/area/ with extension .iphtml to be processed by the Apache::ePerl::handler function which emulates the runtime behavior of the stand-alone "eperl" program (when run as a SSSL) up to 90%. If you're not paranoid about security (for instance driving a stand-alone webserver without user accounts) you can also just use PerlModule Apache::ePerl SetHandler perl-script PerlHandler Apache::ePerl which enabled .iphtml files everywhere. eperl-2.2.14/INSTALL.NSAPI100664 1750 1750 16451 6557043105 123450ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language I N S T A L L A T I O N as a Server-Side-Scripting-Language for a Netscape Server via the NSAPI =================================== OVERVIEW -------- This is the documentation and source of a standard NSAPI module written by Rasmus Lerdorf which allows you to redirect any request to a given CGI program based on the extension of the requested file. Please note that neither the author of ePerl nor Rasmus Lerdorf use Netscape servers, so they won't be able to answer specific installation questions for you. You are pretty much on your own here. If you want support from authors writing free software, then you have to use a free webserver as well ;-) INSTALLATION ------------ Your first step is save the two files appended at the end of this document as ``Makefile'' and ``redirect_cgi.c'' to any location. Then compile the module. The Makefile is configured for Solaris. You will need to modify it to reflect your local compiler conventions for creating shared libraries. Read the Makefile. There are some hints for other operating systems. Once you have a redirect_cgi.so shared library, you need to edit three different server configuration files. These are in your ns-home config directory. 1. In mime.types, add the following line to the end of the file to create a new mime type to be used internally by the server. type=magnus-internal/eperl exts=phtml 2. In magnus.conf add the following line to the end of the file to make the link between the Netscape server core and the new module (only one line, backslashes are are written down for readability only): Init fn=load-modules \ shlib=/www/nsapi/redirect_cgi.so \ funcs=redirect-cgi Replace the /www/nsapi with the path to your redirect_cgi.so file. It can be anywhere on your system. 3. In obj.conf insert the following line (only one line, backslashes are are written down for readability only): ObjectType fn="redirect-cgi" \ cgi_path="/www/cgi-bin/eperl.cgi" \ type="magnus-internal/eperl" Here, replace /www/cgi-bin/eperl.cgi with the path to your ePerl program. The line should be inserted after the "type-by-extension" line, but before the "force-type" line. HINTS ----- Note that if you are running multiple servers, you will need to configure each one individually according to the above instructions. The most recent version of this module can be found in the file archive at http://www.vex.net/php/. FILES ----- --Makefile-------------------------------------- # # Edit the following to reflect the location of your nsapi include directory. # INCLUDEDIR=/opt/www/etc/ns-home/nsapi/include # # Now, pick your operating system # # For Solaris (using Sun's compiler) CC_CMD=cc -DSOLARIS SHARED=-G # # I haven't tested on any platform except Solaris. If you find # that some of these work, or if you make it work on any platform # except Solaris, please e-mail me at: rasmus@vex.net # so I can update this file. # # For Irix #CC_CMD=cc -DIRIX #SHARED=-shared # For SunOS (using gcc) #CC_CMD=gcc -DSUNOS4 -fpic #LD_SHAREDCMD=ld -assert pure-text # For OSF/1 #CC_CMD=cc -DOSF #SHARED=-all -shared -expect_unresolved "*" # For HP-UX #CC_CMD=cc -DHPUX #SHARED=-b # For AIX (good luck) #CC_CMD=cc -DAIX #SHARED=-bM:SRE -bE:module.exp -bI:module.imp -e _nostart ##module.exp is a file you create which lists each function in your module ##module.imp is a function you create which lists each function which ## should be exported from the server into the module. INCLUDE_FLAGS=-I$(INCLUDEDIR) COMMON_DEFS=-DMCC_HTTPD -DXP_UNIX # # For Solaris, use single-step compile and link with the following all: redirect_cgi.so redirect_cgi.so: redirect_cgi.c $(CC_CMD) $(COMMON_DEFS) $(INCLUDE_FLAGS) $(SHARED) -o redirect_cgi.so redirect_cgi.c # # For SUNOS, use two-step compile and link. uncomment the following: # #OBJS=redirect_cgi.o # #all: redirect_cgi.so # #redirect_cgi.so: $(OBJS) # $(LD_SHAREDCMD) $(OBJS) -o redirect_cgi.so # #.c.o: # $(CC_CMD) $(COMMON_DEFS) $(INCLUDE_FLAGS) -c $< clean: rm redirect_cgi.so --Makefile-------------------------------------- --redirect_cgi.c-------------------------------- /***[redirect_cgi.c]**********************************************[TAB=4]****\ * * * NSAPI CGI Redirection Module * * * * Copyright 1995,1996,1997 Rasmus Lerdorf * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * \****************************************************************************/ #include "base/pblock.h" #include "frame/http.h" #include "frame/log.h" #include int redirect_cgi(pblock *pb, Session *sn, Request *rq) { int l=0, lr=0, lq=0, lc=0; char *rpath, *pi; pb_param *path = pblock_find("path", rq->vars); pb_param *rqpath = pblock_find("uri", rq->reqpb); pb_param *query = pblock_find("query", rq->reqpb); pb_param *ctype = pblock_find("content-type", rq->srvhdrs); char *cgi_path = pblock_findval("cgi_path", pb); char *type = pblock_findval("type", pb); if(!cgi_path || !type) { log_error(LOG_MISCONFIG, "redirect-cgi", sn, rq, "missing parameters (need cgi_path and type)"); return REQ_ABORTED; } l = strlen(path->value); lr = strlen(rqpath->value); if(query) lq = strlen(query->value); lc = strlen(cgi_path); if(l && !strcmp(ctype->value,type)) { rpath = (char *)MALLOC(lc + 1); pi = (char *)MALLOC(lr + lq + 2); strcpy(rpath,cgi_path); if(query) sprintf(pi,"%s?%s",rqpath->value,query->value); else strcpy(pi,rqpath->value); FREE(path->value); path->value = rpath; FREE(ctype->value); ctype->value = STRDUP("magnus-internal/cgi"); pblock_nvinsert("path-info", pi, rq->vars); } return REQ_PROCEED; } --redirect_cgi.c-------------------------------- eperl-2.2.14/KNOWN.BUGS100664 1750 1750 1713 6557042735 120040ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language Known Bugs ========== o Under BSD/OS 2.1 and 3.0 there is no real support for dynamic loading of objects. Perl does some tricks to achieve it which ePerl should emulate but still doesn't. o When using - ePerl as a server-side scripting language - running under Apache 1.2 - on a FreeBSD 2.1.5 system - ** with SetUID root enabled ** then it hangs on any `cmd` or system("cmd") commands. => Observation: When removing the SetUID bit on nph-eperl all works fine. THIS PROBLEM SEEMS TO BE RELATED TO THE SETUID BIT IN CONJUNCTION WITH THE WAY THE PERL LIBRARY IMPLEMENTS THE SHELL ENTRY. I was unable to find the bug inside ePerl. Instead I think it is outside ePerl.... eperl-2.2.14/Makefile.PL100664 1750 1750 3427 6551345621 123760ustar rseen## ## faked Perl 5 MakeMaker Makefile ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. ## require 5.00325; use Config; $vers = `etc/newvers -l c -D eperl_version.c`; $vers =~ s|\n$||; print STDERR "Configuring for ePerl $vers\n"; $perl = $Config{bin} . "/perl"; $args = join(' ', @ARGV); $cc = $Config{cc}; $ccarg = ""; if ($args =~ m|CC=(\S+)|) { $cc = $1; $ccarg = "CC=$1 "; } unlink("Makefile"); unlink("Makefile.stand"); open(MK, ">Makefile"); print MK <<"EOT"; all: \@if [ ! -f Makefile.stand ]; then \\ cp Makefile Makefile.perl; \\ echo "${ccarg}./configure --with-perl=$perl"; \\ ${ccarg}./configure --with-perl=$perl; \\ mv Makefile Makefile.stand; \\ cp Makefile.perl Makefile; \\ rm Makefile.perl; \\ fi @\$(MAKE) -f Makefile.stand libeperl.a \@if [ ! -f mod/Makefile ]; then \\ echo "cd mod && $perl Makefile.PL $args"; \\ cd mod && $perl Makefile.PL $args; \\ sed -e '/^\trm -f */d' Makefile.n && mv Makefile.n Makefile; \\ sed -e 's,^CC = .*,CC = $cc,' Parse/Makefile.n && mv Parse/Makefile.n Parse/Makefile; \\ fi cd mod && \$(MAKE) \$(MFLAGS) test: all cd mod && \$(MAKE) \$(MFLAGS) test install: all \@if [ "x\$(UNINST)" = x1 ]; then \\ echo "cd mod && \$(MAKE) \$(MFLAGS) install UNINST=1"; \\ cd mod && \$(MAKE) \$(MFLAGS) install UNINST=1; \\ else \\ echo "cd mod && \$(MAKE) \$(MFLAGS) install"; \\ cd mod && \$(MAKE) \$(MFLAGS) install; \\ fi clean: cd mod && rm -rf blib *.o *.c *.bs pm_to_blib \$(MAKE) -f Makefile.stand clean distclean: cd mod && \$(MAKE) \$(MFLAGS) distclean \$(MAKE) -f Makefile.stand distclean -rm -f Makefile.stand -rm -f Makefile EOT close(MK); print STDERR "Now please type 'make' to compile. Good luck.\n"; ##EOF## eperl-2.2.14/Makefile.in100664 1750 1750 22374 6561070630 125070ustar rseen## ## Makefile -- ePerl Makefile ## Copyright (c) 1996,1997 Ralf S. Engelschall, All Rights Reserved. ## @SET_MAKE@ # ------------------------------------------------ # DEFINITIONS # ------------------------------------------------ # imported Perl 5 parameters perl_prog = @perl_prog@ perl_cc = @perl_cc@ perl_optimize = @perl_optimize@ perl_ccflags = @perl_ccflags@ perl_ldflags = @perl_ldflags@ perl_libs = @perl_libs@ perl_dla = @perl_dla@ perl_ccdlflags = @perl_ccdlflags@ perl_cccdlflags = @perl_cccdlflags@ perl_archlib = @perl_archlib@ # compiler tools CC = $(perl_cc) CFLAGS = @CFLAGS@ $(perl_optimize) $(perl_ccflags) -I$(perl_archlib)/CORE -I. DLCFLAGS = @CFLAGS@ $(perl_optimize) $(perl_cccdlflags) $(perl_ccflags) -I$(perl_archlib)/CORE -I. LDFLAGS = @LDFLAGS@ $(perl_ccdlflags) $(perl_ldflags) -L$(perl_archlib)/CORE LDLIBS = $(perl_dla) -lperl $(perl_libs) AR = @AR@ RANLIB = @RANLIB@ SIZE = @SIZE@ debug = @debug@ dmalloc = @dmalloc@ # installation tools INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ MKDIR = ./etc/mkdir.sh CP = cp # installation paths prefix = @prefix@ exec_prefix = $(prefix) bindir = $(prefix)/bin libsubdir = @libsubdir@ libdir = $(prefix)/lib$(libsubdir) mandir = $(prefix)/man/man1 # ------------------------------------------------ # THE RELEASE STUFF (MACROS) # ------------------------------------------------ _GETDISTINFO = \ _version=`./etc/newvers -lc -d eperl_version.c`; \ _date=`date '+%y%m%d_%H%M'` _BUILDDIST = \ echo "Creating tarball..."; \ gtar --no-recursion -cvf - `find * -depth -print | sort` |\ tardy --user_number=1000 --user_name=rse \ --group_number=1000 --group_name=en \ --prefix=$${_distname} - |\ gzip >$${_tarball}; \ echo "Done"; \ ls -l $${_tarball} _NEWVERS = \ ./etc/newvers -lc -p ePerl $$OPT eperl_version.c; \ V=`./etc/newvers -lc -D eperl_version.c`;\ sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ V=`./etc/newvers -lc -d eperl_version.c`;\ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Parse/ePerl.pm.n && mv mod/Parse/ePerl.pm.n mod/Parse/ePerl.pm; \ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Apache/ePerl.pm.n && mv mod/Apache/ePerl.pm.n mod/Apache/ePerl.pm _UPDATEVERS = \ V=`./etc/newvers -lc -d eperl_version.c`;\ ./etc/newvers -lc -p ePerl -r $$V eperl_version.c; \ V=`./etc/newvers -lc -D eperl_version.c`;\ sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ V=`./etc/newvers -lc -d eperl_version.c`;\ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Parse/ePerl.pm.n && mv mod/Parse/ePerl.pm.n mod/Parse/ePerl.pm; \ sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Apache/ePerl.pm.n && mv mod/Apache/ePerl.pm.n mod/Apache/ePerl.pm # ------------------------------------------------ # THE DEFAULT TARGET # ------------------------------------------------ all: config eperl eperl.1 # ------------------------------------------------ # THE CONFIGURATION SUPPORT # ------------------------------------------------ config: configure config_ac.h.in configure: configure.in aclocal.m4 acconfig.h rm -f configure autoconf configure.in >configure chmod 770 configure config_ac.h.in: configure.in acconfig.h rm -f config_ac.h.in autoheader configure.in >config_ac.h.in # ------------------------------------------------ # THE RELEASE STUFF (TARGETS) # ------------------------------------------------ release: distclean fixperm @$(_GETDISTINFO); \ _distname="eperl-$${_version}"; \ _tarball="/tmp/$${_distname}.tar.gz"; \ echo "Release Distribution: ePerl Version $$_version"; \ $(_BUILDDIST); \ mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz snap: distclean fixperm @$(_GETDISTINFO); \ _distname="eperl-$${_version}-SNAP-$${_date}"; \ _tarball="/tmp/$${_distname}.tar.gz"; \ echo "Snap of whole source tree: ePerl Version $$_version as of $${_date}"; \ $(_BUILDDIST); \ mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz new-version: OPT=-iv; $(_NEWVERS) new-revision: OPT=-ir; $(_NEWVERS) new-patchlevel: OPT=-iP; $(_NEWVERS) new-betalevel: OPT=-ib; $(_NEWVERS) new-alphalevel: OPT=-ia; $(_NEWVERS) new-snaplevel: OPT=-is; $(_NEWVERS) new-release: OPT=-r$(R); $(_NEWVERS) update-version: $(_UPDATEVERS) # ------------------------------------------------ # THE PROGRAM # ------------------------------------------------ PROTO_SRCS = \ eperl_main.c \ eperl_perl5.c \ eperl_parse.c \ eperl_pp.c \ eperl_sys.c \ eperl_http.c \ eperl_debug.c \ eperl_config.c \ eperl_version.c \ eperl_readme.c \ eperl_license.c \ eperl_logo.c \ eperl_powered.c SRCS = \ eperl_main.c \ eperl_perl5.c \ eperl_parse.c \ eperl_pp.o \ eperl_sys.c \ eperl_http.c \ eperl_getopt.c \ eperl_debug.c \ eperl_config.c \ eperl_version.c \ eperl_readme.c \ eperl_license.c \ eperl_logo.c \ eperl_powered.c OBJS = \ eperl_main.o \ eperl_perl5.o \ eperl_parse.o \ eperl_pp.o \ eperl_sys.o \ eperl_http.o \ eperl_getopt.o \ eperl_debug.o \ eperl_config.o \ eperl_version.o \ eperl_readme.o \ eperl_license.o \ eperl_logo.o \ eperl_powered.o eperl: $(OBJS) $(CC) $(LDFLAGS) -o eperl $(OBJS) $(LDLIBS) $(dmalloc) @if [ "x$(debug)" = xoff ]; then \ strip eperl; \ fi @ls -l eperl; @SIZE@ eperl eperl_main.o: eperl_main.c $(CC) $(CFLAGS) -c eperl_main.c eperl_perl5.o: eperl_perl5.c eperl_perl5_sm.h $(CC) $(CFLAGS) -c eperl_perl5.c eperl_perl5_sm.h: eperl_perl5_sm.pl $(perl_prog) eperl_perl5_sm.pl >eperl_perl5_sm.h eperl_getopt.o: eperl_getopt.c $(CC) $(CFLAGS) -c eperl_getopt.c eperl_parse.o: eperl_parse.c $(CC) $(CFLAGS) -c eperl_parse.c eperl_pp.o: eperl_pp.c $(CC) $(CFLAGS) -c eperl_pp.c eperl_sys.o: eperl_sys.c $(CC) $(CFLAGS) -c eperl_sys.c eperl_debug.o: eperl_debug.c $(CC) $(CFLAGS) -c eperl_debug.c eperl_config.o: eperl_config.c $(CC) $(CFLAGS) -c eperl_config.c eperl_http.o: eperl_http.c $(CC) $(CFLAGS) -c eperl_http.c eperl_version.o: eperl_version.c $(CC) $(CFLAGS) -c eperl_version.c eperl_readme.c: README ./etc/asc2c README eperl_readme ePerl_README eperl_readme.o: eperl_readme.c $(CC) $(CFLAGS) -c eperl_readme.c eperl_license.c: ARTISTIC COPYING (\ echo "--File: COPYING-------------------------------------"; \ cat COPYING; \ echo "--File: ARTISTIC------------------------------------"; \ cat ARTISTIC; \ ) >LICENSE ./etc/asc2c LICENSE eperl_license ePerl_LICENSE rm -f LICENSE eperl_license.o: eperl_license.c $(CC) $(CFLAGS) -c eperl_license.c eperl_logo.c: eperl_logo.gif ./etc/bin2c eperl_logo.gif eperl_logo ePerl_LOGO eperl_logo.o: eperl_logo.c $(CC) $(CFLAGS) -c eperl_logo.c eperl_powered.c: eperl_powered.gif ./etc/bin2c eperl_powered.gif eperl_powered ePerl_POWERED eperl_powered.o: eperl_powered.c $(CC) $(CFLAGS) -c eperl_powered.c mkproto: ./etc/mkproto eperl_proto.h $(PROTO_SRCS) fixperm: ./etc/fixperm * # ------------------------------------------------ # THE DOCUMENTATION # ------------------------------------------------ eperl.1: eperl.pod eperl_version.c V=`./etc/newvers -l c -D eperl_version.c`; \ sed -e "s|\@V\@|$$V|g" -e "s|\@prefix\@|$(prefix)|" /tmp/eperl.pod; \ pod2man --section=1 \ --center="Ralf S. Engelschall" \ --release="EN" \ /tmp/eperl.pod >eperl.1 && \ rm -f /tmp/eperl.pod # ------------------------------------------------ # THE SHARED LIBRARY # ------------------------------------------------ SOBJS = \ eperl_parse.so \ eperl_pp.so \ eperl_http.so \ eperl_version.so libeperl.a: $(SOBJS) $(AR) r libeperl.a $(SOBJS) $(RANLIB) libeperl.a eperl_parse.so: eperl_parse.c $(CC) $(DLCFLAGS) -o eperl_parse.o -c eperl_parse.c && mv eperl_parse.o eperl_parse.so eperl_pp.so: eperl_pp.c $(CC) $(DLCFLAGS) -o eperl_pp.o -c eperl_pp.c && mv eperl_pp.o eperl_pp.so eperl_http.so: eperl_http.c $(CC) $(DLCFLAGS) -o eperl_http.o -c eperl_http.c && mv eperl_http.o eperl_http.so eperl_version.so: eperl_version.c $(CC) $(DLCFLAGS) -o eperl_version.o -c eperl_version.c && mv eperl_version.o eperl_version.so # ------------------------------------------------ # TEST SUITE # ------------------------------------------------ test: @cd t; make test # ------------------------------------------------ # INSTALLATION # ------------------------------------------------ install: all $(MKDIR) $(bindir) $(MKDIR) $(mandir) $(MKDIR) $(libdir) $(INSTALL_PROGRAM) eperl $(bindir)/eperl $(INSTALL_DATA) eperl.1 $(mandir)/eperl.1 $(MKDIR) $(libdir) $(CP) -r eg/* $(libdir)/ # ------------------------------------------------ # CLEANUP # ------------------------------------------------ clean: -rm -f $(OBJS) -rm -f eperl -rm -f $(SOBJS) -rm -f libeperl.a -rm -f core *.core realclean: -rm -f $(OBJS) -rm -f eperl -rm -f $(SOBJS) -rm -f libeperl.a -rm -f core *.core -rm -f eperl_perl5_sm.h -rm -f eperl.1 -rm -f eperl_readme.[ch] -rm -f eperl_license.[ch] distclean: -rm -f $(OBJS) -rm -f eperl -rm -f $(SOBJS) -rm -f libeperl.a -rm -f core *.core -rm -f eperl_perl5_sm.h -rm -f config_ac.h config_sc.h -rm -f config.status config.cache config.log -rm -f Makefile -rm -f t/Makefile ##EOF## eperl-2.2.14/NEWS100664 1750 1750 30614 6370407271 111400ustar rseen Major Changes from ePerl Version 2.1 to 2.2 =========================================== o Changed Quotation/Delimiter Parsing Now again (as in 2.0.3) ePerl block end delimiters are found via plain forward character search. Quoted strings are no more recognized. The reason behind this change is that constructs with odd number of quoting characters are more often seen in practice than end delimiters in quoted strings (at least when using non-trivial delimiters). And it is easier to escape the end delimiter in quoted strings (e.g. via backslashes) than to rewrite a existing complex Perl construct with odd number of quotes (e.g. m|"[^"]+"|). The advantage: A lot of scripts with complex Perl constructs (which never worked with ePerl in the past) now run out-of-the-box, too. The disadvantage: Scripts which have the end delimiter in a quoted string are broken now. You have to escape it to fix your script. Additionally to be more flexible with some special delimiter variants like a new option -i was added to ePerl to make the delimiters case-insensitive. o Smarter and Optimized Parser Now ePerl recognizes final semicolons and automatically adds one if missing. So <: cmd; cmd :> now is also valid syntax. And the ePerl parser now strips off unnecessary whitespaces both at the begin and end of a block. This now results in much cleaner translated Perl scripts. Additionally the parser was slightly optimized by no longer producing useless ``print "";'' constructs. o Support for '=' block prefix Now <:= XXX :> (assuming the default delimiters but works with any) automatically is converted to "<: print XXX; :>". Use this shortcut to interpolate a variable in a more shorter way via <:=$variable:> instead of the long and annoying <: print $variable; :>. Very useful within CGI scripts to shorten the ePerl stuff, for instance . o HTML entity conversion inside ePerl blocks ePerl now provides the special option -C for enabling a HTML entity conversion which is applied inside ePerl blocks before parsing. This option is automatically used in (NPH-)CGI mode. The solved problem here is the following: When you use ePerl as a Server-Side-Scripting-Language for HTML pages and you edit your ePerl source files via a HTML editor, the chance is high that your editor translates some entered characters to HTML entities, for instance ``<'' to ``<''. This leads to invalid Perl code inside ePerl blocks, because the HTML editor has no knowledge about ePerl blocks. Using this option the ePerl parser automatically converts all entities found inside ePerl blocks back to plain characters, so the Perl interpreter again receives valid Perl code blocks. o Perl Taint and Warning modes now available Now ePerl has two new options similar to the plain ``perl'' program: Option -T for enabling the Tainting mode and option -w for enabling Warning messages of the Perl interpreter. o New ePerl Preprocessor ePerl now provides an own preprocessor similar to F (from the C language) in style which is either enabled manually via the new option -P or automatically when ePerl runs in (NPH-)CGI mode. The following directives are provided: #include path, #sinclude path .......... standard and secure include #if expr, #elsif expr, #else #endif .... shortcut for Perl if-construct #c .................................... preprocessor comment o New option -I for include path This new option specifies a directory which is both used for #include and #sinclude directives of the new ePerl preprocessor and added to @INC under runtime. o New Perl 5 interface module for ePerl parser: Parse::ePerl A new Perl 5 interface module named Parse::ePerl was created which makes the ePerl parser available from within Perl scripts itself via "use Parse::ePerl". This module can be compiled and installed directly from within the distribution via $ perl Makefile.PL $ make $ make install which is possible by a top-level pseudo-MakeMaker Makefile.PL which handles these typical steps, i.e. the ePerl distribution now is a hybrid distribution. o New ePerl emulation handler for Apache+mod_perl: Apache::ePerl A new ePerl handler for Apache/mod_perl was written and put into a Apache::ePerl module. This replaces the Apache::ePerl from Mark Imbriaco and Hanno Mueller. The big difference between this one and Mark I.'s or Hanno M.'s versions are that that version makes use of the new Parse::ePerl module which itself incorporates the original ePerl parser. So this version is more compliant to the original ePerl facility and emulates it more strictly. o New option -h for consistency ;-) Just to be consequent with options a -h option was added to show the usage list. o First attempt to write a converter from (X)SSI to ePerl A Perl script was added to the distribution which converts most of the (X)SSI directives into the corresponding or emulating ePerl directives. It is called shtml2phtml and can be found under contrib/ in the distribution. o Built-in GIF images Again the GIF images are built right into the executable to make ePerl run out-of-the-box without any need for configurations. Additionally to the ePerl Logo (which can be access via URL /url/to/nph-eperl/logo.gif) there is a second image available: The POWERED-BY-EPERL image. It can be accessed via URL /url/to/nph-eperl/powered.gif. o Enhanced portability Now the GNU autoconf-based configuration scheme determines all compilation parameters (CC, CFLAGS, etc.) directly from the knowledge of the installed Perl system. This way it gets compiled with the same tools as Perl which greatly enhances the portability. Additionally the old egetopt function was replaced by the GNU getopt package which is more reliable and even works on all major Unix derivates (egetopt had problems under IRIX). o Compiles and runs out-of-the-box on major Unix derivates. ePerl was already tested to compile out-of-the-box and pass the test suite successfully with Perl 5.003 (+EMBED) or 5.004 under FreeBSD 2.1.5, FreeBSD 2.2.1, BSD/OS 2.1, SunOS 4.1.3, Solaris 2.5.1, HP-UX 10.20, IRIX 6.2 and Linux 2.0.18. Major Changes from ePerl Version 2.0 to 2.1 =========================================== License: o License changed to GNU General Public License and Artistic License ePerl now is distributed the same way as Perl itself, i.e. under the terms of the Artistic License or the GNU General Public License from the Perl 5.0 source kit. The more old and more restrictive license was removed. Runtime Behavior: o Can operate in three runtime modes: FILTER, CGI and NPH-CGI. ePerl now can operate in three runtime modes: First a real Unix filtering mode (the default when not run from within a webserver environment), second a CGI/1.1 compliant mode which uses the CGI/1.1 environment to find the script and generates HTTP header lines. Third a NPH-CGI/1.1 complaint mode which is similar to the plain CGI mode, but here a complete HTTP response is created as a result. o Can be used as a Shebang (#!) interpreter. ePerl now supports the Unix shebang technique for implicit script interpreter usage via the ``#!/path/to/eperl'' lines preceding the script. These get stripped on output. o New CGI security check: Script has to end in hard-coded extensions. A important security check for the CGI and NPH-CGI modes were added. The script has to end in one of the following extensions which are hard-coded into the ePerl executable at compile time: .html, .phtml, .ephtml, .epl, .pl, .cgi o Can switch to UID/GID of script owner. In CGI and NPH-CGI mode ePerl now can switch to the UID/GID of the script owner in a secure way when running as a setuid program. This is useful because it makes the owners data more secure ( aux files no longer need to be world-readable and temporary files and dirs no longer need to be world-writable!). ePerl tries hard to make both the setuid environment and this transition secure: The transition is only done when various security checks are passed successfully and the setuid environment is always discarded, even when no switching was done. For details in the manpage. o Provides own environment variables to the script. ePerl now provides some useful environment variables which can be interpolated via $ENV{'VARIABLE'} in the script. There are variables for the size of the script, the last modification time, the script owner, the ePerl interpreter version and the Perl language version. Command Line Options: o ePerl block delimiters adjustable. Now you can set the ePerl block delimiters on the command line. Per default ``'' are set for CGI and NPH-CGI runtime modes, while for the FILTER runtime mode the delimiters now are ``<:'' and ``:>''. This way ePerl can be easily used for instance both as a offline HTML generation language and as a online scripting language. The Website META Language (WML; http://www.engelschall.com/sw/wml) is an example of this usage. o CGI and NPH-CGI modes can be tested offline. The runtime mode can be forced on the command line, so one now can test the CGI and NPH-CGI modes offline from the shell. o Optionally keeps the current working directory. ePerl usually changes the CWD under runtime to the directory where the executed script resides. This is useful for CGI scripts to be able to use relative paths when accessing aux files). For FILTER mode this is disabled per default. With the command line option one can force this for CGI and NPH-CGI modes, too. o Custom environment and real Perl variables can be set. ePerl now provides the -E and -D command line options which can be used to define either environment variables ($ENV{'VARIABLE'}) or real Perl variables ($[main::]VARIABLE) for the script. This is a useful way of sending information to the script when using ePerl in FILTER mode. o Enhanced I/O: Can read/write both from STDIO and external files. ePerl now can either read the script to execute from STDIN or external files. And it can write the result either to STDOUT or an explicitly specified file. With this ePerl can be used in all batch processing steps. Documentation: o Unix Manpage was created. Now ePerl has a real Unix manpage which documents the whole functionality of the program: Runtime modes, Command line options, environment variables, etc. Compilation: o Automatically finds latest Perl. Can be forced to use a particular Perl. When configuring the ePerl source tree via ``configure'', now the latest Perl on your system is automatically found per default. If this is not what you want you can force the use of a particular Perl via configure option ``--with-perl=/path/to/perl''. o Auxiliary files built-in. Now all auxiliary files get built-in directly into the ``eperl'' executable, even the GIF image file which contains the ePerl logo for error messages. This way no filesystem paths or URLs need to be compiled into the ePerl binary. o Contains a Test::Harness test suite. ePerl now contains a test suite based on the Perl module Test::Harness which can be run after compilation via ``make test'' from to make sure the compiled ePerl binary works correct. o Source code was completely reorganized. The sources of ePerl were completely reorganized in the last months. Now prototypes are automatically generated, the library file was removed, the aux files are converted to C code, etc. o Compiles out-of-the-box on major Unix derivates. ePerl now compiles out-of-the box with Perl 5.003 (EMBED) and 5.003_97 (development version) under FreeBSD, Linux, SunOS, Solaris and HP/UX. eperl-2.2.14/PORTING100664 1750 1750 5456 6561070264 114740ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language P O R T I N G ============= ePerl was written with portability in mind. Additionally to overcome the system dependend characteristics ePerl uses a GNU autoconf based configuration scheme which tries hard to determine the information both from the installed Perl interpreter and from scratch via own GNU autoconf tests. So ePerl already compiles out-of-the-box on a lot of systems. At least the following Unix/Compiler/Perl variants were sucessfully tested by the author in the past: System Platform Perl Compiler Testhost Time ePerl ------------- --------- -------- -------------- ----------- -------- ------ FreeBSD 2.2.6 i586/166 5.004_04 GNU cc 2.7.2.1 en1 02.08.98 2.2.14 FreeBSD 2.2.1 i586/90 5.004_01 GNU cc 2.7.2p en3 07.11.97 2.2.7 Linux 2.0.35 i586/90 5.004_03 GNU cc 2.7.2.1 gw1 02.08.98 2.2.14 AIX 4.1.4 RS6000/42T 5.004_04 AIX cc rcs7 07.11.97 2.2.7 Solaris 2.5.1 SS10/41 5.004_01 GNU cc 2.7.2.1 sunti5 27.10.97 2.2.11 SunOS 4.1.3 SS20 5.004_03 GNU cc 2.7.2 sunfi1 02.09.98 2.2.14 HP-UX 10.20 A9000/780 5.004 HP cc hpeickel15 27.10.97 2.2.6 IRIX 6.2 IP20 5.004 SGI cc sgihalle13 27.10.97 2.2.6 BSD/OS 2.1 i486 5.004_01 BSDI shlicc2 taz * 01.08.97 2.2.1 (*)cannot be tested any longer If your Unix derivate is not on this list, don't panic. As we said, ePerl tries to determine the information itself, so there is a good chance that ePerl finds alternatives even for your system. At least for the compilation ePerl does a trick: It don't tries to find a reasonable compiler and reasonable flags for it. Instead it uses the one your Perl interpreter was compiled with. Because the Perl 5 Porters already tried hard to determine the best combination, so ePerl can only benefit from it. If it still fails to compile or run, first try to see where the problem resides. Usually problems can occur when you are using a brain-dead compiler or a too old Perl version. Try to upgrade or use better variants. One important case: Because ePerl wants to build itself the same way the Perl interpreter was compiled, this can cause problems on systems which have a binary package of a pre-built Perl system installed. Here you can only build ePerl without problems when your system has the same compiler, headers and libraries available as the package builder's one had. If this not an option for you try to find a ePerl binary package the same way you found the Perl binary package. eperl-2.2.14/PORTING.test100775 1750 1750 3440 6425075634 124510ustar rseen#!/bin/sh ## ## PORTING.test -- check if current platform passes the the test suite ## echon () { echo "$*" | awk '{ printf("%s", $0); }' } TMPFILE=/tmp/eperl.$$.tmp rm -f $TMPFILE touch $TMPFILE c=0 for dir in `echo $PATH | sed -e 's/:/ /g'` /tmp; do for perl in perl5 perl miniperl; do if test -f "$dir/$perl"; then if test -x "$dir/$perl"; then perl="$dir/$perl" version=`$perl -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`" versionnum=`expr $versionnum - $c` echo "$versionnum $version $perl" >>$TMPFILE fi fi done c=`expr $c + 1` done perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`" perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`" rm -f $TMPFILE echon "Perl Interpreter (v$perlvers) [$perlprog]: " read rc case $rc in "" ) perl=$perlprog ;; * ) perl=$rc ;; esac ccprog="`$perlprog -e 'use Config; print $Config{cc}'`"; case $ccprog in *gcc* ) ccvers=`gcc -v 2>&1 | grep "version" | awk '{ print $3; }'` ;; * ) ccvers="??" ;; esac echon "ANSI C Compiler (v$ccvers) [$ccprog]: " read rc case $rc in "" ) cc=$ccprog ;; * ) cc=$rc ;; esac echo "" echo "PART 1: PORTING-TEST OF STAND-ALONE SYSTEM" echo "" echo "$ CC=$cc ./configure --with-perl=$perl" CC=$cc ./configure --with-perl=$perl echo "$ make" make echo "$ make test" make test echo "$ make distclean" make distclean echo "" echo "PART 2: PORTING-TEST OF PERL 5 INTEGRATED MODULE SYSTEM" echo "" echo "$ $perl Makefile.PL CC=$cc" $perl Makefile.PL CC=$cc echo "$ make" make echo "$ make test" make test echo "$ make distclean" make distclean ##EOF## eperl-2.2.14/README100664 1750 1750 2750 6561064021 112730ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language Version 2.2.14 (02-08-1998) ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. The documentation and latest release can be found on http://www.engelschall.com/sw/eperl/ Copyright (c) 1996,1997,1998 Ralf S. Engelschall This program is free software; it may be redistributed and/or modified only under the terms of either the Artistic License or the GNU General Public License, which may be found in the ePerl source distribution. Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive a built-in copy of both license files. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the Artistic License or the GNU General Public License for more details. Ralf S. Engelschall rse@engelschall.com www.engelschall.com eperl-2.2.14/VERSIONS100664 1750 1750 2107 6561063616 116130ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language V E R S I O N S =============== 1.0 19960323 1.1 19960415 1.2 19960622 1.3 19960906 1.4 19960910 2.0.0 19970102 2.0.1 19970103 2.0.2 19970104 2.0.4 19970104 2.1b0 19970322 2.1b1 19970326 2.1b2 19970330 2.1b3 19970402 2.1b4 19970403 2.1b5 19970404 2.1b6 19970410 2.1b7 19970425 2.1b8 19970425 2.1.0 19970427 2.1.1 19970502 2.2a0 19970502 2.2a1 19970503 2.2a2 19970504 2.2b1 19970517 2.2b2 19970520 2.2b3 19970527 2.1.2 19970529 2.2b4 19970530 2.2b5 19970530 2.2b6 19970602 2.2b7 19970604 2.2b8 19970622 2.2b9 19970628 2.2.0 19970718 2.2.1 19970802 2.2.2 19970814 2.2.3 19970821 2.2.4 19970901 2.2.5 19970903 2.2.6 19971027 2.2.7 19971107 2.2.8 19971117 2.2.9 19971202 2.2.10 19971228 2.2.11 19971230 2.2.12 19971231 2.2.13 19980710 2.2.14 19980802 eperl-2.2.14/acconfig.h100664 1750 1750 1024 6551344005 123300ustar rseen#ifndef CONFIG_AC_H #define CONFIG_AC_H /* ** config_ac.h -- AUTO configuration header file ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall */ @TOP@ /* defined if Perl support the DynLoader interface for dynamic library loading */ #undef HAVE_PERL_DYNALOADER /* define type bool for Perl 5 headers if missing */ #undef bool /* define DEBUG if we compile with debugging */ #undef DEBUG_ENABLED /* define if libdmalloc.a is available */ #undef HAVE_DMALLOC @BOTTOM@ #endif /* CONFIG_AC_H */ eperl-2.2.14/aclocal.m4100664 1750 1750 22763 6561067066 123150ustar rseendnl # dnl # aclocal.m4 -- Local M4 functions for GNU autoconf dnl # Copyright (c) Ralf S. Engelschall, dnl # dnl # NOTICE: dnl # all defined macros are named AC_* dnl # all defined and used variables are named acl-* dnl # dnl dnl dnl ########################################################## dnl ## dnl ## support for User Variables dnl ## dnl ########################################################## dnl define(AC_UVAR_CODE,[dnl if test .[$]ac_with_uvar = .yes; then $1 fi ]) dnl define(AC_UVAR_ANTICODE,[dnl if test .[$]ac_with_uvar = .no; then $1 fi ]) dnl dnl dnl ----------- dnl dnl define(AC_UVAR_INIT,[dnl AC_ARG_WITH(uvar,dnl [ --with-uvar support for Runtime User Variable Setup], ac_with_uvar=yes, ac_with_uvar=no )dnl dnl dnl # because since autoconf 2.3 the following two lines dnl # are at AC_OUTPUT which is to late for us :-( test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" dnl AC_UVAR_CODE(dnl ac_uvar_editfile=/tmp/usrvar.tmp rm -f $ac_uvar_editfile echo "##" >>$ac_uvar_editfile echo "## RunTime User Variable Setup" >>$ac_uvar_editfile echo -n "## GNU autoconf Version " >>$ac_uvar_editfile echo "AC_ACVERSION" >>$ac_uvar_editfile echo "## created: `date`" >>$ac_uvar_editfile echo "##" >>$ac_uvar_editfile echo "" >>$ac_uvar_editfile )dnl ])dnl dnl dnl dnl ----------- dnl define(AC_UVAR_VERB,[dnl AC_UVAR_CODE(dnl cat >>$ac_uvar_editfile <<'EOF' $1dnl EOF )dnl ])dnl dnl dnl ----------- dnl define(AC_SET,[dnl $1="$2" AC_SUBST($1) dnl ])dnl dnl dnl ----------- dnl define(AC_UVAR_SET,[dnl AC_SET($1, $2) dnl AC_UVAR_CODE(dnl echo '$1="$2"' >>$ac_uvar_editfile )dnl ])dnl dnl dnl ----------- dnl define(AC_UVAR_SETQUOTE,[dnl AC_SET($1, $2) dnl AC_UVAR_CODE(dnl echo -n '$1="' >>$ac_uvar_editfile echo -n "$2" >>$ac_uvar_editfile echo '"' >>$ac_uvar_editfile )dnl ])dnl dnl dnl ----------- dnl define(AC_UVAR_SETCHK,[dnl if test -z "[$]$1"; then AC_UVAR_SET($1, $2) dnl else if test .[$]$1 = .NONE; then AC_UVAR_SET($1, $2) dnl else AC_SUBST($1)dnl AC_UVAR_CODE(dnl echo -n '$1="' >>$ac_uvar_editfile echo -n "[$]$1" >>$ac_uvar_editfile echo '"' >>$ac_uvar_editfile )dnl fi fi ])dnl dnl dnl ----------- dnl define(AC_UVAR_SETCHKQUOTE,[dnl if test -z "[$]$1"; then AC_UVAR_SET($1, $2) dnl else if test .[$]$1 = .NONE; then AC_UVAR_SET($1, $2) dnl else AC_SUBST($1)dnl AC_UVAR_CODE(dnl echo -n '$1="' >>$ac_uvar_editfile echo -n "$2" >>$ac_uvar_editfile echo '"' >>$ac_uvar_editfile )dnl fi fi ])dnl dnl dnl ----------- dnl define(AC_UVAR_OUTPUT,[dnl AC_UVAR_CODE(dnl cat >>$ac_uvar_editfile <<'EOF' ##EOF## EOF if test x$withval = xyes ; then ${EDITOR-vi} $ac_uvar_editfile . $ac_uvar_editfile else if test -r $withval ; then cp $withval $ac_uvar_editfile ${EDITOR-vi} $ac_uvar_editfile . $ac_uvar_editfile cp $ac_uvar_editfile $withval else ${EDITOR-vi} $ac_uvar_editfile . $ac_uvar_editfile cp $ac_uvar_editfile $withval fi fi rm -f $ac_uvar_editfile )dnl ])dnl dnl dnl dnl dnl ########################################################## dnl ## dnl ## check for existence of HAVE_SYSEXISTS definitions dnl ## dnl ########################################################## dnl dnl define(AC_EXRC,[dnl dnl -> HAVE_EXRC ])dnl dnl dnl dnl dnl ########################################################## dnl ## dnl ## check for ANSI compiler dnl ## dnl ## Copyright (C) 1992, 1994 Free Software Foundation, Inc. dnl ## Francois Pinard , 1992. dnl ## Check for function prototypes. Including a few ideas from dnl ## Brook G. Milligan . dnl ## dnl ## taken from shar-4.0's aclocal.m4 dnl ## dnl ########################################################## dnl AC_DEFUN(AC_C_PROTOTYPES, [AC_MSG_CHECKING([for function prototypes]) AC_CACHE_VAL(ac_cv_c_prototypes, [AC_TRY_LINK([#ifndef __STDC__ Syntax Error #endif], [extern int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);};], ac_cv_c_prototypes=yes, ac_cv_c_prototypes=no)])dnl AC_MSG_RESULT([$ac_cv_c_prototypes]) if test $ac_cv_c_prototypes = yes; then AC_DEFINE(HAVE_PROTOTYPES) ANSI_CC=yes else ANSI_CC=no fi AC_SUBST(ANSI_CC) ])dnl dnl dnl dnl ########################################################## dnl ## dnl ## check for supported system type dnl ## dnl ########################################################## dnl dnl AC_DEFUN(AC_SUPPORTED_CANONICAL_SYSTEM,[dnl AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl ac_config_sup=$ac_aux_dir/config.sup AC_MSG_CHECKING(for supported host system type) host=`$ac_config_sup $host_alias` host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` AC_MSG_RESULT($host) AC_MSG_CHECKING(for supported target system type) target=`$ac_config_sup $target_alias` target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` AC_MSG_RESULT($target) AC_MSG_CHECKING(for supported build system type) build=`$ac_config_sup $build_alias` build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` AC_MSG_RESULT($build) ac_config_hc_dir=config if test -r ${ac_config_hc_dir}/cpu-${host_cpu}.h; then host_cpu_H=1 else host_cpu_H=0 fi if test -r ${ac_config_hc_dir}/cpu-${host_cpu}.c; then host_cpu_C=1 else host_cpu_C=0 fi if test -r ${ac_config_hc_dir}/vendor-${host_vendor}.h; then host_vendor_H=1 else host_vendor_H=0 fi if test -r ${ac_config_hc_dir}/vendor-${host_vendor}.c; then host_vendor_C=1 else host_vendor_C=0 fi if test -r ${ac_config_hc_dir}/os-${host_os}.h; then host_os_H=1 else host_os_H=0 fi if test -r ${ac_config_hc_dir}/os-${host_os}.c; then host_os_C=1 else host_os_C=0 fi AC_SUBST(host_cpu_H) AC_SUBST(host_cpu_C) AC_SUBST(host_vendor_H) AC_SUBST(host_vendor_C) AC_SUBST(host_os_H) AC_SUBST(host_os_C) ])dnl dnl dnl dnl define(AC_CONFIG_PARAMS,[dnl AC_MSG_CHECKING(for name of user) confuser="$LOGNAME" AC_MSG_RESULT($confuser) AC_SUBST(confuser) AC_MSG_CHECKING(for name of host) confhost="`uname -n`" AC_MSG_RESULT($confhost) AC_SUBST(confhost) AC_MSG_CHECKING(for current date) confdate="`date`" AC_MSG_RESULT($confdate) AC_SUBST(confdate) ])dnl dnl dnl dnl ########################################################## dnl ## dnl ## check for fixed distribution tree and fix it if needed dnl ## dnl ########################################################## dnl dnl AC_DEFUN(AC_FIX_DIST_TREE,[dnl AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl ac_fixdist=$ac_aux_dir/fixdist AC_MSG_CHECKING(for fixed distribution) # Make sure we can run fixdist if $ac_fixdist -t >/dev/null 2>&1; then AC_MSG_RESULT(already fixed tree) else AC_MSG_RESULT(vanilla tree => fixing...) $ac_fixdist fi ])dnl dnl dnl dnl ########################################################## dnl ## dnl ## check for generation mode: production or debug dnl ## dnl ########################################################## dnl dnl define(AC_GENMODE,[dnl AC_MSG_CHECKING(genmode) AC_ARG_ENABLE(production,dnl [ --enable-production to enable procution code and disable debug], GENMODE=production CFLAGS="-O" CXXFLAGS="-O" LDFLAGS="-O" LDXXFLAGS="-O" if test X$GCC = Xyes; then CFLAGS="$CFLAGS -pipe" CXXFLAGS="$CXXFLAGS -pipe" fi , GENMODE=debug CFLAGS="-DDEBUG -g" CXXFLAGS="-DDEBUG -g" LDFLAGS="-g" LDXXFLAGS="-g" if test X$GCC = Xyes; then CFLAGS="$CFLAGS -ggdb3 -pipe" CXXFLAGS="$CXXFLAGS -ggdb3 -pipe" LDFLAGS="$LDFLAGS -ggdb3" LDXXFLAGS="$LDXXFLAGS -ggdb3" fi )dnl AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LDXXFLAGS) AC_SUBST(GENMODE) AC_MSG_RESULT($GENMODE) ])dnl dnl dnl dnl ########################################################## dnl ## dnl ## Startup Message dnl ## dnl ########################################################## dnl define(AC_STARTUP_MSG,[dnl X=`cat Laby/Src/Config/Version.c | sed -e '1,/GNUVersion/d' | head -1 | sed -e 's/^ *"//' | sed -e 's/"; *$//'` AC_MSG_RESULT(Configuring $X) ])dnl dnl define(AC_CONFIGURE_PART,[dnl AC_MSG_RESULT() AC_MSG_RESULT(__ $1 __) ])dnl dnl dnl ########################################################## dnl ## dnl ## GNU Make detection dnl ## dnl ########################################################## dnl define(AC_IS_GNU_MAKE,[dnl AC_MSG_CHECKING([whether your default make program is GNU make]) if test ".`make -v 2>/dev/null | grep 'GNU Make'`" = . ; then IS_GNU_MAKE=0 STATIC_MFLAGS="" AC_MSG_RESULT([no, but that's ok]) else IS_GNU_MAKE=1 STATIC_MFLAGS="--no-print-directory" AC_MSG_RESULT([yes, fine but overkill]) fi AC_SUBST(IS_GNU_MAKE) AC_SUBST(STATIC_MFLAGS) ])dnl dnl dnl ####### define(AC_INIT_BINSH, [#! /bin/sh # AAA ]) dnl dnl ########################################################## dnl ## dnl ## Built Environment dnl ## dnl ########################################################## dnl define(AC_BUILD_USER,[dnl AC_MSG_CHECKING(for build user) build_user="`$ac_aux_dir/buildinfo -n %u@%h%d`" AC_SUBST(build_user) AC_MSG_RESULT($build_user) ])dnl define(AC_BUILD_TIME,[dnl AC_MSG_CHECKING(for build time) build_time_ctime="`date | sed -e 's/\n$//'`" build_time_iso="`$ac_aux_dir/buildinfo -n '%D-%m-%Y'`" AC_MSG_RESULT($build_time_iso) AC_SUBST(build_time_ctime) AC_SUBST(build_time_iso) ])dnl dnl eperl-2.2.14/config_ac.h.in100664 1750 1750 4274 6551344127 131130ustar rseen/* config_ac.h.in. Generated automatically from configure.in by autoheader. */ #ifndef CONFIG_AC_H #define CONFIG_AC_H /* ** config_ac.h -- AUTO configuration header file ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall */ /* Define to empty if the keyword does not work. */ #undef const /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* defined if Perl support the DynLoader interface for dynamic library loading */ #undef HAVE_PERL_DYNALOADER /* define type bool for Perl 5 headers if missing */ #undef bool /* define DEBUG if we compile with debugging */ #undef DEBUG_ENABLED /* define if libdmalloc.a is available */ #undef HAVE_DMALLOC /* Define if you have the memmove function. */ #undef HAVE_MEMMOVE /* Define if you have the setegid function. */ #undef HAVE_SETEGID /* Define if you have the seteuid function. */ #undef HAVE_SETEUID /* Define if you have the strdup function. */ #undef HAVE_STRDUP /* Define if you have the header file. */ #undef HAVE_CTYPE_H /* Define if you have the header file. */ #undef HAVE_GRP_H /* Define if you have the header file. */ #undef HAVE_NETDB_H /* Define if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define if you have the header file. */ #undef HAVE_PWD_H /* Define if you have the header file. */ #undef HAVE_SIGNAL_H /* Define if you have the header file. */ #undef HAVE_STDARG_H /* Define if you have the header file. */ #undef HAVE_STDIO_H /* Define if you have the header file. */ #undef HAVE_STDLIB_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H #endif /* CONFIG_AC_H */ eperl-2.2.14/config_sc.h.in100664 1750 1750 1021 6452121621 131100ustar rseen#ifndef SC_H #define SC_H /* ** ** sc.h -- STATIC configuration header file ** Copyright (c) Ralf S. Engelschall, ** */ #define AC_perl_prog "@perl_prog@" #define AC_perl_vers "@perl_vers@" #define AC_perl_vnum @perl_vnum@ #define AC_perl_archlib "@perl_archlib@" #define AC_perl_libs "@perl_libs@" #define AC_perl_dla "@perl_dla@" #define AC_prefix "@prefix@" #define AC_build_user "@build_user@" #define AC_build_time_iso "@build_time_iso@" #endif /* SC_H */ eperl-2.2.14/configure100775 1750 1750 175522 6561067070 124010ustar rseen#! /bin/sh # From configure.in Revision: 2.0 echo "Configuring for ePerl `./etc/newvers -l c -D eperl_version.c`" ac_aux_dir= for ac_dir in etc $srcdir/etc; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in etc $srcdir/etc" 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=/usr/local ac_help="$ac_help --with-perl=PATH force the usage of a specific installed Perl" ac_help="$ac_help --enable-debug to enable the debugging options for compilation" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=README # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi test "x$prefix" = xNONE && prefix=$ac_default_prefix eval "dir=$prefix" case $dir in *eperl* ) libsubdir= ;; * ) libsubdir="/eperl" ;; esac echo "$ac_t""" 1>&6 echo "$ac_t""__ CHECK: Configuration of Perl Language __" 1>&6 echo $ac_n "checking for Perl language""... $ac_c" 1>&6 echo "configure:570: checking for Perl language" >&5 # Check whether --with-perl or --without-perl was given. if test "${with_perl+set}" = set; then withval="$with_perl" perlprog=$with_perl perlvers=`$perlprog -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` else TMPFILE=/tmp/x.$$ rm -f $TMPFILE touch $TMPFILE c=0 for dir in `echo $PATH | sed -e 's/:/ /g'` /tmp; do for perl in perl5 perl miniperl; do if test -f "$dir/$perl"; then if test -x "$dir/$perl"; then perl="$dir/$perl" version=`$perl -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`" versionnum=`expr $versionnum - $c` echo "$versionnum $version $perl" >>$TMPFILE fi fi done c=`expr $c + 1` done perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`" perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`" rm -f $TMPFILE fi PATH_PERL=$perlprog echo "$ac_t""$perlprog v$perlvers" 1>&6 case $perlvers in 5.003* | 5.004* | 5.005* | 5.006* ) ;; * ) echo "" echo "Latest Perl found on your system is $perlvers," echo "but at least Perl version 5.003 is required." echo "In case the newer one is not in PATH, just use" echo "the option --with-perl=/path/to/bin/perl to" echo "provide the correct executable." echo "" { echo "configure: error: Perl version too old" 1>&2; exit 1; } ;; esac case $perlvers in 5.00[3-6]_[0-9][0-9] ) perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; 5.00[3-6] ) perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/$/00/'` ;; * ) perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; esac perl_prog=$perlprog perl_vers=$perlvers perl_vnum=$perlvnum if test -f $PATH_PERL; then : else { echo "configure: error: required program ``perl'' not found" 1>&2; exit 1; } fi echo $ac_n "checking for Perl knowledge of system""... $ac_c" 1>&6 echo "configure:643: checking for Perl knowledge of system" >&5 perl_osname="`$perl_prog -e 'use Config; print $Config{osname}'`"; perl_osvers="`$perl_prog -e 'use Config; print $Config{osvers}'`"; perl_os="$perl_osname-$perl_osvers" echo "$ac_t""$perl_os" 1>&6 echo $ac_n "checking for Perl standard compiler""... $ac_c" 1>&6 echo "configure:653: checking for Perl standard compiler" >&5 perl_cc="`$perl_prog -e 'use Config; print $Config{cc}'`"; if test ".$CC" = .; then CC=$perl_cc export CC echo "$ac_t""$perl_cc" 1>&6 else perl_cc=$CC echo "$ac_t""$perl_cc (OVERWRITTEN)" 1>&6 fi echo $ac_n "checking for Perl standard optimization flags""... $ac_c" 1>&6 echo "configure:666: checking for Perl standard optimization flags" >&5 perl_optimize="`$perl_prog -e 'use Config; print $Config{optimize}'`"; echo "$ac_t""$perl_optimize" 1>&6 echo $ac_n "checking for Perl standard compilation flags""... $ac_c" 1>&6 echo "configure:672: checking for Perl standard compilation flags" >&5 perl_ccflags="`$perl_prog -e 'use Config; print $Config{ccflags}'`"; case $perl_os in *hpux* ) perl_ccflags="$perl_ccflags -Wp,-H32768" ;; *irix-5.* ) perl_ccflags="`echo $perl_ccflags | sed -e 's/-D_POSIX_SOURCE//'`" ;; esac echo "$ac_t""$perl_ccflags" 1>&6 echo $ac_n "checking for Perl standard link flags""... $ac_c" 1>&6 echo "configure:682: checking for Perl standard link flags" >&5 perl_ldflags="`$perl_prog -e 'use Config; print $Config{ldflags}'`"; case $perl_os in *irix-6.* ) perl_ldflags="$perl_ldflags '-Wl,-woff 85'" ;; esac echo "$ac_t""$perl_ldflags" 1>&6 echo $ac_n "checking for Perl library files""... $ac_c" 1>&6 echo "configure:691: checking for Perl library files" >&5 perl_libs="`$perl_prog -e 'use Config; print $Config{libs}'`" echo "$ac_t""$perl_libs" 1>&6 echo $ac_n "checking for Perl architecture directory""... $ac_c" 1>&6 echo "configure:697: checking for Perl architecture directory" >&5 perl_archlib="`$perlprog -e 'use Config; print $Config{archlib}'`"; echo "$ac_t""$perl_archlib" 1>&6 echo $ac_n "checking for Perl dynamic loading support""... $ac_c" 1>&6 echo "configure:703: checking for Perl dynamic loading support" >&5 usedl="`$perlprog -e 'use Config; print $Config{usedl}'`"; case $usedl in define ) rc=yes cat >> confdefs.h <<\EOF #define HAVE_PERL_DYNALOADER 1 EOF perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a ;; * ) rc=no perl_dla= ;; esac echo "$ac_t""$rc" 1>&6 echo $ac_n "checking for Perl dynamic loading compilation flags""... $ac_c" 1>&6 echo "configure:723: checking for Perl dynamic loading compilation flags" >&5 perl_cccdlflags="`$perlprog -e 'use Config; print $Config{cccdlflags}'`"; case $perl_cccdlflags in " " ) x="none" ;; * ) x="$perl_cccdlflags" ;; esac echo "$ac_t""$x" 1>&6 echo $ac_n "checking for Perl dynamic loading link flags""... $ac_c" 1>&6 echo "configure:733: checking for Perl dynamic loading link flags" >&5 perl_ccdlflags="`$perlprog -e 'use Config; print $Config{ccdlflags}'`"; case $perl_os in *aix* ) perl_ccdlflags="`echo $perl_ccdlflags | sed -e 's;-bE:perl.exp;-bE:${perl_archlib}/CORE/perl.exp;'`" ;; esac case $perl_ccdlflags in " " ) x="none" ;; * ) x="$perl_ccdlflags" ;; esac echo "$ac_t""$x" 1>&6 echo "$ac_t""" 1>&6 echo "$ac_t""__ CHECK: System Build Environment __" 1>&6 echo $ac_n "checking for build user""... $ac_c" 1>&6 echo "configure:751: checking for build user" >&5 build_user="`$ac_aux_dir/buildinfo -n %u@%h%d`" echo "$ac_t""$build_user" 1>&6 echo $ac_n "checking for build time""... $ac_c" 1>&6 echo "configure:757: checking for build time" >&5 build_time_ctime="`date | sed -e 's/\n$//'`" build_time_iso="`$ac_aux_dir/buildinfo -n '%D-%m-%Y'`" echo "$ac_t""$build_time_iso" 1>&6 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:767: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:796: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ac_prog_rejected=no for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:878: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:883: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:907: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then CFLAGS="-g -O2" else CFLAGS="-O2" fi else GCC= test "${CFLAGS+set}" = set || CFLAGS="-g" fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:937: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AR="ar" break fi done IFS="$ac_save_ifs" fi fi AR="$ac_cv_prog_AR" if test -n "$AR"; then echo "$ac_t""$AR" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "size", so it can be a program name with args. set dummy size; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:994: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SIZE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$SIZE"; then ac_cv_prog_SIZE="$SIZE" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_SIZE="size" break fi done IFS="$ac_save_ifs" fi fi SIZE="$ac_cv_prog_SIZE" if test -n "$SIZE"; then echo "$ac_t""$SIZE" 1>&6 else echo "$ac_t""no" 1>&6 fi case $perl_os in *irix* ) SIZE="$SIZE -B" ;; esac echo $ac_n "checking for compilation debug mode""... $ac_c" 1>&6 echo "configure:1024: checking for compilation debug mode" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" if test ".$ac_cv_prog_gcc" = ".yes"; then CFLAGS="-Wall -g -ggdb3" LDFLAGS="-g -ggdb3" else CFLAGS="-g" LDFLAGS="-g" fi x="enabled" debug=on cat >> confdefs.h <<\EOF #define DEBUG_ENABLED 1 EOF else CFLAGS="" LDFLAGS="" x=disabled debug=off fi echo "$ac_t""$x" 1>&6 if test "$debug" = "on"; then echo $ac_n "checking for dmalloc library""... $ac_c" 1>&6 echo "configure:1054: checking for dmalloc library" >&5 dmalloc="" x=no if test -f /sw/include/dmalloc.h; then if test -f /sw/shlib/libdmalloc.a; then cat >> confdefs.h <<\EOF #define HAVE_DMALLOC 1 EOF CFLAGS="$CFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/shlib" dmalloc="-ldmalloc" x=yes fi fi echo "$ac_t""$x" 1>&6 fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:1074: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:1111: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. for ac_prog in ginstall installbsd scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM="${INSTALL_PROGRAM} -m 755" echo "$ac_t""" 1>&6 echo "$ac_t""__ CHECK: Characteristic of System Headers and Libraries __" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:1169: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:1223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1244: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1305: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi for ac_hdr in stdio.h stdarg.h stdlib.h string.h ctype.h unistd.h time.h signal.h pwd.h grp.h sys/types.h sys/stat.h sys/param.h sys/socket.h netinet/in.h netdb.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1412: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for bool""... $ac_c" 1>&6 echo "configure:1449: checking for bool" >&5 if eval "test \"`echo '$''{'ac_cv_type_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "bool[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_bool=yes else rm -rf conftest* ac_cv_type_bool=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_bool" 1>&6 if test $ac_cv_type_bool = no; then cat >> confdefs.h <<\EOF #define bool char EOF fi for ac_func in memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1484: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done for ac_func in seteuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1539: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done for ac_func in setegid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1594: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1649: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done echo "$ac_t""" 1>&6 echo "$ac_t""__ RESULT: Sourcefile Substitution __" 1>&6 trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile t/Makefile config_sc.h config_ac.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@libsubdir@%$libsubdir%g s%@PATH_PERL@%$PATH_PERL%g s%@perlprog@%$perlprog%g s%@perlvers@%$perlvers%g s%@perlvnum@%$perlvnum%g s%@perl_prog@%$perl_prog%g s%@perl_vers@%$perl_vers%g s%@perl_vnum@%$perl_vnum%g s%@perl_osname@%$perl_osname%g s%@perl_osvers@%$perl_osvers%g s%@perl_os@%$perl_os%g s%@perl_cc@%$perl_cc%g s%@perl_optimize@%$perl_optimize%g s%@perl_ccflags@%$perl_ccflags%g s%@perl_ldflags@%$perl_ldflags%g s%@perl_libs@%$perl_libs%g s%@perl_archlib@%$perl_archlib%g s%@perl_dla@%$perl_dla%g s%@perl_cccdlflags@%$perl_cccdlflags%g s%@perl_ccdlflags@%$perl_ccdlflags%g s%@build_user@%$build_user%g s%@build_time_ctime@%$build_time_ctime%g s%@build_time_iso@%$build_time_iso%g s%@CC@%$CC%g s%@RANLIB@%$RANLIB%g s%@AR@%$AR%g s%@SIZE@%$SIZE%g s%@debug@%$debug%g s%@dmalloc@%$dmalloc%g s%@SET_MAKE@%$SET_MAKE%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@CPP@%$CPP%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 echo "" echo "Now please type 'make' to compile. Good luck." echo "" eperl-2.2.14/configure.in100664 1750 1750 16762 6452400270 127530ustar rseendnl ## dnl ## configure.in -- GNU autoconf configuration spec dnl ## Copyright (c) Ralf S. Engelschall, dnl ## dnl ## Process this file with ``autoconf'' to produce a configure script. dnl ## dnl # dnl # standard autoconf prolog dnl # AC_PREREQ(2.10)dnl AC_REVISION($Revision: 2.0$) echo "Configuring for ePerl `./etc/newvers -l c -D eperl_version.c`" AC_CONFIG_AUX_DIR(etc) AC_INIT(README) AC_CONFIG_HEADER(config_ac.h)dnl AC_PREFIX_DEFAULT(/usr/local) dnl # dnl # libdir adjustment dnl # test "x$prefix" = xNONE && prefix=$ac_default_prefix eval "dir=$prefix" case $dir in *eperl* ) libsubdir= ;; * ) libsubdir="/eperl" ;; esac AC_SUBST(libsubdir) dnl # dnl # latest find Perl interpreter dnl # AC_CONFIGURE_PART(CHECK: Configuration of Perl Language) AC_MSG_CHECKING([for Perl language]) AC_ARG_WITH(perl,dnl [ --with-perl=PATH force the usage of a specific installed Perl], perlprog=$with_perl perlvers=`$perlprog -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` , TMPFILE=/tmp/x.$$ rm -f $TMPFILE touch $TMPFILE c=0 for dir in `echo $PATH | sed -e 's/:/ /g'` /tmp; do for perl in perl5 perl miniperl; do if test -f "$dir/$perl"; then if test -x "$dir/$perl"; then perl="$dir/$perl" version=`$perl -v | grep version | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`" versionnum=`expr $versionnum - $c` echo "$versionnum $version $perl" >>$TMPFILE fi fi done c=`expr $c + 1` done perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`" perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`" rm -f $TMPFILE )dnl PATH_PERL=$perlprog AC_MSG_RESULT([$perlprog v$perlvers]) case $perlvers in 5.003* | 5.004* | 5.005* | 5.006* ) ;; * ) echo "" echo "Latest Perl found on your system is $perlvers," echo "but at least Perl version 5.003 is required." echo "In case the newer one is not in PATH, just use" echo "the option --with-perl=/path/to/bin/perl to" echo "provide the correct executable." echo "" AC_ERROR([Perl version too old]) ;; esac case $perlvers in 5.00[[3-6]_[0-9][0-9]] ) perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; 5.00[[3-6]] ) perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/$/00/'` ;; * ) perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; esac AC_SUBST(PATH_PERL) AC_SUBST(perlprog) AC_SUBST(perlvers) AC_SUBST(perlvnum) perl_prog=$perlprog perl_vers=$perlvers perl_vnum=$perlvnum AC_SUBST(perl_prog) AC_SUBST(perl_vers) AC_SUBST(perl_vnum) if test -f $PATH_PERL; then : else AC_ERROR([required program ``perl'' not found]) fi dnl # dnl # determine Perl parameters dnl # AC_MSG_CHECKING([for Perl knowledge of system]) perl_osname="`$perl_prog -e 'use Config; print $Config{osname}'`"; perl_osvers="`$perl_prog -e 'use Config; print $Config{osvers}'`"; perl_os="$perl_osname-$perl_osvers" AC_SUBST(perl_osname) AC_SUBST(perl_osvers) AC_SUBST(perl_os) AC_MSG_RESULT([$perl_os]) AC_MSG_CHECKING([for Perl standard compiler]) perl_cc="`$perl_prog -e 'use Config; print $Config{cc}'`"; if test ".$CC" = .; then CC=$perl_cc export CC AC_MSG_RESULT([$perl_cc]) else perl_cc=$CC AC_MSG_RESULT([$perl_cc (OVERWRITTEN)]) fi AC_SUBST(perl_cc) AC_MSG_CHECKING([for Perl standard optimization flags]) perl_optimize="`$perl_prog -e 'use Config; print $Config{optimize}'`"; AC_MSG_RESULT([$perl_optimize]) AC_SUBST(perl_optimize) AC_MSG_CHECKING([for Perl standard compilation flags]) perl_ccflags="`$perl_prog -e 'use Config; print $Config{ccflags}'`"; case $perl_os in *hpux* ) perl_ccflags="$perl_ccflags -Wp,-H32768" ;; *irix-5.* ) perl_ccflags="`echo $perl_ccflags | sed -e 's/-D_POSIX_SOURCE//'`" ;; esac AC_MSG_RESULT([$perl_ccflags]) AC_SUBST(perl_ccflags) AC_MSG_CHECKING([for Perl standard link flags]) perl_ldflags="`$perl_prog -e 'use Config; print $Config{ldflags}'`"; case $perl_os in *irix-6.* ) perl_ldflags="$perl_ldflags '-Wl,-woff 85'" ;; esac AC_MSG_RESULT([$perl_ldflags]) AC_SUBST(perl_ldflags) AC_MSG_CHECKING([for Perl library files]) perl_libs="`$perl_prog -e 'use Config; print $Config{libs}'`" AC_MSG_RESULT([$perl_libs]) AC_SUBST(perl_libs) AC_MSG_CHECKING([for Perl architecture directory]) perl_archlib="`$perlprog -e 'use Config; print $Config{archlib}'`"; AC_MSG_RESULT([$perl_archlib]) AC_SUBST(perl_archlib) AC_MSG_CHECKING([for Perl dynamic loading support]) usedl="`$perlprog -e 'use Config; print $Config{usedl}'`"; case $usedl in define ) rc=yes AC_DEFINE(HAVE_PERL_DYNALOADER) perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a ;; * ) rc=no perl_dla= ;; esac AC_SUBST(perl_dla) AC_MSG_RESULT([$rc]) AC_MSG_CHECKING([for Perl dynamic loading compilation flags]) perl_cccdlflags="`$perlprog -e 'use Config; print $Config{cccdlflags}'`"; case $perl_cccdlflags in " " ) x="none" ;; * ) x="$perl_cccdlflags" ;; esac AC_MSG_RESULT([$x]) AC_SUBST(perl_cccdlflags) AC_MSG_CHECKING([for Perl dynamic loading link flags]) perl_ccdlflags="`$perlprog -e 'use Config; print $Config{ccdlflags}'`"; case $perl_os in *aix* ) perl_ccdlflags="`echo $perl_ccdlflags | sed -e 's;-bE:perl.exp;-bE:${perl_archlib}/CORE/perl.exp;'`" ;; esac case $perl_ccdlflags in " " ) x="none" ;; * ) x="$perl_ccdlflags" ;; esac AC_MSG_RESULT([$x]) AC_SUBST(perl_ccdlflags) dnl # dnl # determine build tools and parameters dnl # AC_CONFIGURE_PART(CHECK: System Build Environment) AC_BUILD_USER AC_BUILD_TIME AC_PROG_CC AC_PROG_RANLIB AC_PROGRAM_CHECK(AR, ar, ar,) AC_PROGRAM_CHECK(SIZE, size, size,) case $perl_os in *irix* ) SIZE="$SIZE -B" ;; esac AC_MSG_CHECKING(for compilation debug mode) AC_ARG_ENABLE(debug,dnl [ --enable-debug to enable the debugging options for compilation], if test ".$ac_cv_prog_gcc" = ".yes"; then CFLAGS="-Wall -g -ggdb3" LDFLAGS="-g -ggdb3" else CFLAGS="-g" LDFLAGS="-g" fi x="enabled" debug=on AC_DEFINE(DEBUG_ENABLED) , CFLAGS="" LDFLAGS="" x=disabled debug=off )dnl AC_SUBST(debug) AC_MSG_RESULT([$x]) if test "$debug" = "on"; then AC_MSG_CHECKING(for dmalloc library) dmalloc="" x=no if test -f /sw/include/dmalloc.h; then if test -f /sw/shlib/libdmalloc.a; then AC_DEFINE(HAVE_DMALLOC) CFLAGS="$CFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/shlib" dmalloc="-ldmalloc" x=yes fi fi AC_SUBST(dmalloc) AC_MSG_RESULT([$x]) fi AC_SET_MAKE AC_PROG_INSTALL INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM="${INSTALL_PROGRAM} -m 755" dnl # dnl # determine system parameters dnl # AC_CONFIGURE_PART(CHECK: Characteristic of System Headers and Libraries) AC_CONST AC_STDC_HEADERS AC_HAVE_HEADERS(stdio.h stdarg.h stdlib.h string.h ctype.h dnl unistd.h time.h signal.h pwd.h grp.h dnl sys/types.h sys/stat.h sys/param.h dnl sys/socket.h netinet/in.h netdb.h) AC_CHECK_TYPE(bool, char) AC_CHECK_FUNCS(memmove) AC_CHECK_FUNCS(seteuid) AC_CHECK_FUNCS(setegid) AC_CHECK_FUNCS(strdup) dnl # dnl # finally: source file substitution... dnl # AC_CONFIGURE_PART(RESULT: Sourcefile Substitution) AC_OUTPUT(dnl Makefile dnl t/Makefile dnl config_sc.h dnl ,dnl )dnl echo "" echo "Now please type 'make' to compile. Good luck." echo "" dnl ##EOF## eperl-2.2.14/contrib/ 40775 1750 1750 0 6363617460 117655ustar rseeneperl-2.2.14/contrib/pkg/ 40775 1750 1750 0 6425100326 125315ustar rseeneperl-2.2.14/contrib/pkg/00README100664 1750 1750 1441 6452123513 136510ustar rseen This is the collection of package generation files for building ePerl with various packaging/installation systems. bnp .......... Files to build with RSE's Build'n'Play mechanism Put stuff into /sw/BnP/BnP.eperl and run "./Build" Author: Ralf S. Engelschall fbsdpkg ...... Files to build as a FreeBSD package Put stuff into /usr/ports/lang/ and run "make" in both subdirs. Author: Ralf S. Engelschall dpkg ......... Files to build a Debian package. Just copied from ftp.debian.org ;_) Author: Heiko Schlittermann rpm .......... Files to build as a RedHat Package Manager package !! NOT YET COMPLETE !! Author: Ralf S. Engelschall eperl-2.2.14/contrib/pkg/bnp/ 40775 1750 1750 0 6452123244 133145ustar rseeneperl-2.2.14/contrib/pkg/bnp/Build100775 1750 1750 2336 6452123310 143740ustar rseen: eval 'exec ../BnP/BnP.aux.perl -S $0 ${1+"$@"}' if $running_under_some_shell; require 5.000; BEGIN { push(@INC, "../BnP"); } use BnP; ##################################################################### ## ## Build script for ePerl ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. ## ##################################################################### $bundlename = "eperl"; $bundlevers = "1.0.0"; $bundleid = "$bundlename/$bundlevers"; BnP::init($bundlename, $bundlevers); ($prefix, $bindir, $libdir, $mandir, $vardir) = BnP::find_dirs($bundlename); ($gnutriple, $arch, $vendor, $os) = BnP::find_systype; ($perl, $cc, $cxx, $cflags) = BnP::find_tools; BnP::cmd(0, "mkdir $prefix"); BnP::cmd(0, "mkdir $prefix/bin"); BnP::cmd(0, "mkdir $prefix/lib"); BnP::cmd(0, "mkdir $prefix/man"); BnP::cmd(0, "mkdir $vardir"); BnP::cmd(0, "mkdir work"); BnP::chdir("work"); BnP::fetch("http://www.engelschall.com/sw/eperl/distrib/", "eperl-2.2.11.tar.gz", "../dist/"); BnP::cmd(0, "gunzip -c ../dist.eperl/eperl-2.2.11.tar.gz | tar xvf -"); BnP::chdir("eperl-2.2.11"); BnP::cmd(0, "CC=$cc; export CC; ./configure --prefix=$prefix"); BnP::cmd(0, "make"); BnP::cmd(0, "make install"); BnP::chdir(".."); ##EOF## eperl-2.2.14/contrib/pkg/dpkg/ 40775 1750 1750 0 6425100326 134565ustar rseeneperl-2.2.14/contrib/pkg/dpkg/eperl.diff100664 1750 1750 20034 6412001164 155270ustar rseen--- eperl-2.2.5.orig/Makefile.in +++ eperl-2.2.5/Makefile.in @@ -43,10 +43,10 @@ # installation paths prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -mandir = @mandir@ +exec_prefix = ${prefix} +bindir = ${prefix}/@bindir@ +libdir = ${prefix}/@libdir@ +mandir = ${prefix}/@mandir@ # ------------------------------------------------ --- eperl-2.2.5.orig/configure +++ eperl-2.2.5/configure @@ -1745,45 +1745,39 @@ EOF fi -bindir="$exec_prefix/bin" +bindir="bin" if test .$ac_with_uvar = .yes; then - echo 'bindir="$exec_prefix/bin"' >>$ac_uvar_editfile + echo 'bindir="bin"' >>$ac_uvar_editfile fi -libdir="$exec_prefix/lib" +libdir="lib" if test .$ac_with_uvar = .yes; then - echo 'libdir="$exec_prefix/lib"' >>$ac_uvar_editfile + echo 'libdir="lib"' >>$ac_uvar_editfile fi -datadir="$prefix/var" +datadir="var" if test .$ac_with_uvar = .yes; then - echo 'datadir="$prefix/var"' >>$ac_uvar_editfile + echo 'datadir="var"' >>$ac_uvar_editfile fi -statdir="$prefix/lib" +statdir="lib" if test .$ac_with_uvar = .yes; then - echo 'statdir="$prefix/lib"' >>$ac_uvar_editfile + echo 'statdir="lib"' >>$ac_uvar_editfile fi -includedir="$prefix/include" +includedir="include" if test .$ac_with_uvar = .yes; then - echo 'includedir="$prefix/include"' >>$ac_uvar_editfile + echo 'includedir="include"' >>$ac_uvar_editfile fi -oldincludedir="/usr/include" +mandir="man/man1" if test .$ac_with_uvar = .yes; then - echo 'oldincludedir="/usr/include"' >>$ac_uvar_editfile - -fi - -mandir="$prefix/man/man1" - if test .$ac_with_uvar = .yes; then - echo 'mandir="$prefix/man/man1"' >>$ac_uvar_editfile + echo 'mandir="man/man1"' >>$ac_uvar_editfile fi @@ -1859,7 +1853,7 @@ eval libdir=$libdir case $libdir in *eperl* ) ;; - * ) libdir="${exec_prefix}/lib/eperl" ;; + * ) libdir="lib/eperl" ;; esac --- eperl-2.2.5.orig/configure.in +++ eperl-2.2.5/configure.in @@ -249,21 +249,20 @@ # compliant to the GNU standards. # ])dnl -AC_UVAR_SET(bindir, $exec_prefix/bin) -AC_UVAR_SET(libdir, $exec_prefix/lib) -AC_UVAR_SET(datadir, $prefix/var) -AC_UVAR_SET(statdir, $prefix/lib) -AC_UVAR_SET(includedir, $prefix/include) -AC_UVAR_SET(oldincludedir, /usr/include) -AC_UVAR_SET(mandir, $prefix/man/man1) -dnl AC_UVAR_SET(man1dir, $prefix/man/man1) -dnl AC_UVAR_SET(man2dir, $prefix/man/man2) -dnl AC_UVAR_SET(man3dir, $prefix/man/man3) -dnl AC_UVAR_SET(man4dir, $prefix/man/man4) -dnl AC_UVAR_SET(man5dir, $prefix/man/man5) -dnl AC_UVAR_SET(man6dir, $prefix/man/man6) -dnl AC_UVAR_SET(man7dir, $prefix/man/man7) -dnl AC_UVAR_SET(man8dir, $prefix/man/man8) +AC_UVAR_SET(bindir, bin) +AC_UVAR_SET(libdir, lib) +AC_UVAR_SET(datadir, var) +AC_UVAR_SET(statdir, lib) +AC_UVAR_SET(includedir, include) +AC_UVAR_SET(mandir, man/man1) +dnl AC_UVAR_SET(man1dir, $mandir/man1) +dnl AC_UVAR_SET(man2dir, $mandir/man2) +dnl AC_UVAR_SET(man3dir, $mandir/man3) +dnl AC_UVAR_SET(man4dir, $mandir/man4) +dnl AC_UVAR_SET(man5dir, $mandir/man5) +dnl AC_UVAR_SET(man6dir, $mandir/man6) +dnl AC_UVAR_SET(man7dir, $mandir/man7) +dnl AC_UVAR_SET(man8dir, $mandir/man8) AC_UVAR_SET(manext, .1) dnl AC_UVAR_SET(man1ext, .1) dnl AC_UVAR_SET(man2ext, .2) @@ -293,7 +292,7 @@ eval libdir=$libdir case $libdir in *eperl* ) ;; - * ) libdir="${exec_prefix}/lib/eperl" ;; + * ) libdir="lib/eperl" ;; esac --- eperl-2.2.5.orig/debian/rules +++ eperl-2.2.5/debian/rules @@ -0,0 +1,87 @@ +#!/usr/bin/make -f +# Sample debian.rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +# There used to be `source' and `diff' targets in this file, and many +# packages also had `changes' and `dist' targets. These functions +# have been taken over by dpkg-source, dpkg-genchanges and +# dpkg-buildpackage in a package-independent way, and so these targets +# are obsolete. + +package=eperl +r=$(shell pwd)/debian/tmp + +build: + $(checkdir) + ./configure --prefix=/usr --exec-prefix=/usr + $(MAKE) + touch build + +clean: + $(checkdir) + -rm -f build + -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean + -rm -rf *~ $(r) debian/*~ debian/files* + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf $(r) + install -d $(r)/DEBIAN + install -d $(r)/usr/doc/$(package)/examples + install -d $(r)/usr/doc/examples + ln -sf ../$(package)/examples $(r)/usr/doc/examples/$(package) + $(MAKE) prefix=$(r)/usr exec_prefix=/usr install + # + cp debian/copyright $(r)/usr/doc/$(package)/. + cp debian/changelog $(r)/usr/doc/$(package)/changelog.Debian + cp ChangeLog $(r)/usr/doc/$(package)/changelog + gzip -9v $(r)/usr/doc/$(package)/changelog{,.Debian} + # + cp COPYING $(r)/usr/doc/$(package)/copyright + ( cd eg\ + && for p in *; do\ + test -f $$p \ + && gzip -v9 <$$p >$(r)/usr/doc/$(package)/examples/$$p.gz;\ + done; true ) + p="ANNOUNCE ANNOUNCE.ADDR ARTISTIC COPYING INSTALL INSTALL.APACHE \ + INSTALL.NSAPI KNOWN.BUGS NEWS PORTING README VERSIONS";\ + for f in $$p; do gzip -v <$$f >$(r)/usr/doc/$(package)/$$f.gz; done + -rm -rf $(r)/usr/man/cat* + -rm -rf $(r)/usr/lib/$(package) + p=`find $(r)/usr/man -type f -name '*.?'`;\ + test "$$p" && echo "$$p" | xargs gzip -v9 + p=`find $(r) -type f|xargs file|grep ELF.*executable|cut -f1 -d:`;\ + test "$$p" && dpkg-shlibdeps $$p + dpkg-gencontrol -P$(r) + chown -R root.root $(r) + chmod -R g-ws $(r) + dpkg --build $(r) .. + +define checkdir + test -x debian/rules + test -f eperl.1 +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- eperl-2.2.5.orig/debian/changelog +++ eperl-2.2.5/debian/changelog @@ -0,0 +1,5 @@ +eperl (2.2.5-1) unstable; urgency=low + + * initial release + + -- Heiko Schlittermann Sat, 6 Sep 1997 11:14:58 +0200 --- eperl-2.2.5.orig/debian/control +++ eperl-2.2.5/debian/control @@ -0,0 +1,15 @@ +Source: eperl +Section: dev +Priority: optional +Maintainer: Heiko Schlittermann +Standards-Version: 2.1.1.0 + +Package: eperl +Architecture: any +Depends: ${shlibs:Depends}, perl +Description: ePerl interprets an ASCII file bristled with Perl 5 program statements + by evaluating the Perl 5 code while passing through the plain ASCII + data. It can operate in various ways: As a stand-alone Unix filter + or integrated Perl 5 module for general file generation tasks and + as a powerful Webserver scripting language for dynamic HTML page + programming. --- eperl-2.2.5.orig/debian/copyright +++ eperl-2.2.5/debian/copyright @@ -0,0 +1,12 @@ +This is Debian/GNU Linux's prepackaged version of Ralf Engelschalls +ePerl package + +This package was put together by me, Heiko Schlittermann +, from the sources, which I obtained from +ftp://ftp.engelschall.com/pub/sw/eperl-* +The changes were very minimal - merely adding support +for the Debian package maintenance scheme, by +adding various debian/* files. + +Ralph Engelschall released wml under the terms and conditions +of the GNU Public License. See /usr/doc/eperl/COPRIGHT for more info. --- eperl-2.2.5.orig/debian/substvars +++ eperl-2.2.5/debian/substvars @@ -0,0 +1 @@ +shlibs:Depends=ldso (>= 1.8.0-0), libc5 (>= 5.4.0-0), libdb1, libgdbm1 eperl-2.2.14/contrib/pkg/dpkg/eperl.dsc100664 1750 1750 1154 6412001164 153520ustar rseen-----BEGIN PGP SIGNED MESSAGE----- Source: eperl Version: 2.2.5-1 Binary: eperl Maintainer: Heiko Schlittermann Architecture: any Standards-Version: 2.1.1.0 Files: 628238137a841e18d9be4da3b67033b7 186465 eperl_2.2.5.orig.tar.gz 658ea938730629b72c93294eca061581 2807 eperl_2.2.5-1.diff.gz -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: latin1 iQCVAwUBNBF9e9BsuuHx3GhhAQGYkwQAu38TVyHD+1iPJszfn38ecrAfO+BVsg+2 NKgLkZFa7C8g7LJIiPjv5fFdejSxgeamWc5h1dpe/k5b5swM+ZA6OzyUizMMCQOk y0FF7g9AKJGIipXWDF4ME4sUMsmM0wI+DH9RWHsC6vS/iYofLVChg4/TkDqfyDFd VYwey5KApHU= =OK4c -----END PGP SIGNATURE----- eperl-2.2.14/contrib/pkg/fbsdpkg/ 40775 1750 1750 0 6405746643 141715ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/eperl/ 40775 1750 1750 0 6452123413 152625ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/eperl/Makefile100664 1750 1750 3503 6451504035 170220ustar rseen# New ports collection makefile for: eperl # Version required: 2.2.10 # Date created: 03-Sep-1997 # Whom: Ralf S. Engelschall # # $Id: Makefile,v 1.24 1997/12/28 17:10:53 rse Exp $ # DISTNAME= eperl-2.2.10 CATEGORIES= lang www perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \ http://www.engelschall.com/sw/eperl/distrib/ \ ftp://ftp.engelschall.com/sw/eperl/ \ ftp://ftp.hyperreal.org/software/engelschall/eperl/ MASTER_SITE_SUBDIR=Parse MAINTAINER= rse@engelschall.com # User-controlled variables list # INSTALL_ALSO_AS_SSSL # install ePerl also as a Server-Side # Scripting Language (SSSL) for Apache #INSTALL_ALSO_AS_SSSL= yes .if defined(INSTALL_ALSO_AS_SSSL) RUN_DEPENDS= ${PREFIX}/etc/apache/srm.conf:${PORTSDIR}/www/apache .endif USE_PERL5= yes HAS_CONFIGURE= yes CONFIGURE_ARGS= --with-perl=${PREFIX}/bin/perl MAN1= eperl.1 test: @(cd ${WRKSRC}; make test) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/eperl ${PREFIX}/bin/eperl ${INSTALL_MAN} ${WRKSRC}/eperl.1 ${PREFIX}/man/man1/eperl.1 .if !defined(NOPORTDOCS) @if [ ! -d ${PREFIX}/share/examples/eperl ]; then \ ${MKDIR} ${PREFIX}/share/examples/eperl; \ fi ${CP} ${WRKSRC}/eg/* ${PREFIX}/share/examples/eperl/ .endif .if defined(INSTALL_ALSO_AS_SSSL) @if [ ! -d ${PREFIX}/www/cgi-bin ]; then \ ${MKDIR} ${PREFIX}/www/cgi-bin; \ fi ${INSTALL_PROGRAM} ${WRKSRC}/eperl ${PREFIX}/www/cgi-bin/nph-eperl @if [ ".`grep x-httpd-eperl ${PREFIX}/etc/apache/srm.conf`" = . ]; then \ ${ECHO} "AddType application/x-httpd-eperl .phtml .eperl .epl" \ >>${PREFIX}/etc/apache/srm.conf; \ ${ECHO} "Action application/x-httpd-eperl /cgi-bin/nph-eperl" \ >>${PREFIX}/etc/apache/srm.conf; \ ${ECHO} "Added knowledge about ePerl to Apache's srm.conf"; \ else \ ${ECHO} "Apache srm.conf is already aware of ePerl"; \ fi .endif .include eperl-2.2.14/contrib/pkg/fbsdpkg/eperl/files/ 40775 1750 1750 0 6452123413 163645ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/eperl/files/md5100664 1750 1750 75 6451503673 170440ustar rseenMD5 (eperl-2.2.10.tar.gz) = 1970770f53d96160de09c49e28121b58 eperl-2.2.14/contrib/pkg/fbsdpkg/eperl/pkg/ 40775 1750 1750 0 6452123413 160435ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/eperl/pkg/COMMENT100664 1750 1750 31 6370650175 171300ustar rseenEmbedded Perl 5 Language eperl-2.2.14/contrib/pkg/fbsdpkg/eperl/pkg/DESCR100664 1750 1750 1211 6451156545 167310ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. The documentation and latest release can be found on http://www.engelschall.com/sw/eperl/ eperl-2.2.14/contrib/pkg/fbsdpkg/eperl/pkg/MESSAGE100664 1750 1750 1246 6370650175 171630ustar rseen Copyright (c) 1996-1997 Ralf S. Engelschall, All rights reserved. This program is free software; it may be redistributed and/or modified only under the terms of either the Artistic License or the GNU General Public License, which may be found in the ePerl source distribution. Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive a built-in copy of both license files. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the Artistic License or the GNU General Public License for more details. eperl-2.2.14/contrib/pkg/fbsdpkg/eperl/pkg/PLIST100664 1750 1750 2516 6434066546 167770ustar rseenbin/eperl @comment www/cgi-bin/nph-eperl man/man1/eperl.1.gz @exec echo "AddType application/x-httpd-eperl .phtml .eperl .epl" >>%D/etc/apache/srm.conf @exec echo "Action application/x-httpd-eperl /cgi-bin/nph-eperl" >>%D/etc/apache/srm.conf @unexec grep -v "application/x-httpd-eperl" %D/etc/apache/srm.conf >%D/etc/apache/srm.conf.bak; mv %D/etc/apache/srm.conf.bak %D/etc/apache/srm.conf share/examples/eperl/00README share/examples/eperl/demo.cgipm.phtml share/examples/eperl/demo.cgipm.iphtml share/examples/eperl/demo.env.phtml share/examples/eperl/demo.env.iphtml share/examples/eperl/demo.errout.phtml share/examples/eperl/demo.errout.iphtml share/examples/eperl/demo.errsyn.phtml share/examples/eperl/demo.errsyn.iphtml share/examples/eperl/demo.func.phtml share/examples/eperl/demo.func.iphtml share/examples/eperl/demo.html.phtml share/examples/eperl/demo.html.iphtml share/examples/eperl/demo.image.phtml share/examples/eperl/demo.image.iphtml share/examples/eperl/demo.lwp.phtml share/examples/eperl/demo.lwp.iphtml share/examples/eperl/demo.net.phtml share/examples/eperl/demo.net.iphtml share/examples/eperl/demo.pp.phtml share/examples/eperl/demo.pp.iphtml share/examples/eperl/demo.table.phtml share/examples/eperl/demo.table.iphtml share/examples/eperl/demo.text.phtml share/examples/eperl/demo.text.iphtml @dirrm share/examples/eperl eperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/ 40775 1750 1750 0 6452123375 155535ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/Makefile100664 1750 1750 1332 6451504122 172770ustar rseen# New ports collection makefile for: p5-ePerl # Version required: 2.2.10 # Date created: 03-Sep-1997 # Whom: Ralf S. Engelschall # # $Id: Makefile,v 1.11 1997/12/28 17:11:46 rse Exp $ # DISTNAME= eperl-2.2.10 PKGNAME= p5-ePerl-2.2.10 CATEGORIES= lang www perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \ http://www.engelschall.com/sw/eperl/distrib/ \ ftp://ftp.engelschall.com/sw/eperl/ \ ftp://ftp.hyperreal.org/software/engelschall/eperl/ MASTER_SITE_SUBDIR=Parse MAINTAINER= rse@engelschall.com USE_PERL5= YES MAN3= Parse::ePerl.3 Apache::ePerl.3 MANPREFIX= ${PREFIX}/lib/perl5 do-configure: @ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/perl Makefile.PL .include eperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/files/ 40775 1750 1750 0 6452123413 166465ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/files/md5100664 1750 1750 75 6451504007 173160ustar rseenMD5 (eperl-2.2.10.tar.gz) = 1970770f53d96160de09c49e28121b58 eperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/pkg/ 40775 1750 1750 0 6452123413 163255ustar rseeneperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/pkg/COMMENT100664 1750 1750 73 6373562354 174240ustar rseenPerl Modules of ePerl package: Parse::ePerl, Apache::ePerl eperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/pkg/DESCR100664 1750 1750 1211 6451157056 172110ustar rseen ____ _ ___| _ \ ___ _ __| | / _ \ |_) / _ \ '__| | | __/ __/ __/ | | | \___|_| \___|_| |_| ePerl -- Embedded Perl 5 Language ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. The documentation and latest release can be found on http://www.engelschall.com/sw/eperl/ eperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/pkg/MESSAGE100664 1750 1750 1246 6373562355 174520ustar rseen Copyright (c) 1996-1997 Ralf S. Engelschall, All rights reserved. This program is free software; it may be redistributed and/or modified only under the terms of either the Artistic License or the GNU General Public License, which may be found in the ePerl source distribution. Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive a built-in copy of both license files. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the Artistic License or the GNU General Public License for more details. eperl-2.2.14/contrib/pkg/fbsdpkg/p5-ePerl/pkg/PLIST100664 1750 1750 762 6373562355 172430ustar rseenlib/perl5/site_perl/Parse/ePerl.pm lib/perl5/site_perl/Apache/ePerl.pm lib/perl5/site_perl/auto/Parse/ePerl/autosplit.ix lib/perl5/site_perl/i386-freebsd/auto/Parse/ePerl/ePerl.so lib/perl5/site_perl/i386-freebsd/auto/Parse/ePerl/ePerl.bs lib/perl5/site_perl/i386-freebsd/auto/Parse/ePerl/.packlist lib/perl5/man/man3/Parse::ePerl.3.gz lib/perl5/man/man3/Apache::ePerl.3.gz @dirrm lib/perl5/site_perl/i386-freebsd/auto/Parse/ePerl @dirrm lib/perl5/site_perl/Parse @dirrm lib/perl5/site_perl/Apache eperl-2.2.14/contrib/pkg/rpm/ 40775 1750 1750 0 6502244606 133355ustar rseeneperl-2.2.14/contrib/pkg/rpm/Makefile100664 1750 1750 324 6452123446 150530ustar rseen all: fetch build fetch: eperl-2.2.11.tar.gz eperl-2.2.11.tar.gz: fetch http://www.engelschall.com/sw/eperl/distrib/eperl-2.2.11.tar.gz build: rpm --rcfile rpmrc -bc eperl.spec clean: rm -rf eperl-2.2.11 eperl-2.2.14/contrib/pkg/rpm/eperl.spec100664 1750 1750 10130 6502244566 154350ustar rseenFrom henning@forge.tanstaafl.de Mon Mar 9 12:47:00 1998 Received: by en1.engelschall.com (Sendmail 8.8.8) via UUCP for rse id MAA01349; Mon, 9 Mar 1998 12:47:00 +0100 (MET) Received: (qmail 6383 invoked from network); 9 Mar 1998 07:28:08 -0000 Received: from world.engelschall.com (192.76.162.15) by slarti.muc.de with SMTP; 9 Mar 1998 07:28:08 -0000 Received: from babsi.tanstaafl.de (babsi.tanstaafl.de [194.231.172.1]) by world.engelschall.com (8.7.5/8.7.3) with ESMTP id IAA00305 for ; Mon, 9 Mar 1998 08:28:17 +0100 (CET) Received: (from daemon@localhost) by babsi.tanstaafl.de (8.8.8/8.8.8) id IAA25435 for ; Mon, 9 Mar 1998 08:28:13 +0100 Received: from forge.tanstaafl.de(194.231.172.2) via SMTP by babsi.tanstaafl.de, id smtpda25433; Mon Mar 9 08:28:12 1998 Received: (from henning@localhost) by forge.tanstaafl.de (8.8.8/8.8.8) id IAA20129 for rse@engelschall.com; Mon, 9 Mar 1998 08:28:10 +0100 Message-Id: <199803090728.IAA20129@forge.tanstaafl.de> Subject: eperl Spec File fuer RedHat To: rse@engelschall.com Date: Mon, 9 Mar 1998 08:28:10 +0100 (MET) From: "Henning P. Schmiedehausen" Reply-To: hps@tanstaafl.de Content-Type: text Status: ROr Hi, anbei ein .spec File um eperl unter RedHat 4.2 mit perl 5.004_04 zu bauen und zu verpacken. Vielleicht was fuer Dein Contrib. Have Fun Henning --- cut --- Summary: Embedded Perl Language Name: eperl Version: 2.2.12 Release: 3 Copyright: GPL Group: Utilities/System Source0: http://www.engelschall.com/sw/eperl/distrib/eperl-2.2.12.tar.gz Packager: Henning Schmiedehausen Distribution: TANSTAAFL! intern BuildRoot: /var/tmp/perl-root Requires: perl %description ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. %package demos Summary: Demo Pages for eperl Group: doc/html %description demos Demonstration pages for the eperl language %prep rm -rf $RPM_BUILD_ROOT %setup %build CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr make cp Makefile Makefile.nph rm *.o perl Makefile.PL make %install pod2html eperl.pod > eperl.html mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/i386-linux/5.00404 mkdir -p $RPM_BUILD_ROOT/home/httpd/cgi-bin $RPM_BUILD_ROOT/home/httpd/html/eperl mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/pod make install make -f Makefile.nph prefix=$RPM_BUILD_ROOT/usr install mv $RPM_BUILD_ROOT/usr/bin/eperl $RPM_BUILD_ROOT/home/httpd/cgi-bin/nph-eperl chown root.root $RPM_BUILD_ROOT/home/httpd/cgi-bin/nph-eperl chmod u+s $RPM_BUILD_ROOT/home/httpd/cgi-bin/nph-eperl mv $RPM_BUILD_ROOT/usr/lib/eperl/* $RPM_BUILD_ROOT/home/httpd/html/eperl cp eperl.pod $RPM_BUILD_ROOT/usr/lib/perl5/pod cp eperl.html $RPM_BUILD_ROOT/home/httpd/html/eperl %clean rm -rf $RPM_BUILD_ROOT %files %dir /usr/lib/perl5/site_perl/Apache %dir /usr/lib/perl5/site_perl/Parse %dir /usr/lib/perl5/site_perl/auto/Parse %dir /usr/lib/perl5/site_perl/auto/Parse/ePerl %dir /usr/lib/perl5/site_perl/i386-linux/auto/Parse %dir /usr/lib/perl5/site_perl/i386-linux/auto/Parse/ePerl %dir /home/httpd/html/eperl /home/httpd/cgi-bin/nph-eperl /home/httpd/html/eperl/eperl.html /usr/lib/perl5/man/man3/Apache::ePerl.3 /usr/lib/perl5/man/man3/Parse::ePerl.3 /usr/lib/perl5/pod/eperl.pod /usr/lib/perl5/site_perl/Apache/ePerl.pm /usr/lib/perl5/site_perl/Parse/ePerl.pm /usr/lib/perl5/site_perl/auto/Parse/ePerl/autosplit.ix /usr/lib/perl5/site_perl/i386-linux/auto/Parse/ePerl/ePerl.bs /usr/lib/perl5/site_perl/i386-linux/auto/Parse/ePerl/ePerl.so /usr/man/man1/eperl.1 %files demos %dir /home/httpd/html/eperl /home/httpd/html/eperl/* --- cut --- -- Dipl.-Inf. Henning P. Schmiedehausen -- hps@tanstaafl.de TANSTAAFL! Consulting - Unix, Internet, Security Hutweide 15 Fon.: 09131 / 50654-0 "There ain't no such D-91054 Buckenhof Fax.: 09131 / 50654-20 thing as a free Linux" eperl-2.2.14/contrib/pkg/rpm/eperl.spec.old100664 1750 1750 1643 6452123461 161750ustar rseenSummary: Embedded Perl Language Name: eperl Version: 2.2.11 Release: 1 Group: Utilities/System Source: http://www.engelschall.com/sw/eperl/distrib/eperl-2.2.11.tar.gz Copyright: GPL or Artistic Requires: perl %package modules Summary: Perl module files Group: Development/Libraries %description ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. %description modules This package includes the Perl 5 modules from ePerl: Parse::ePerl and Apache::ePerl. %prep %setup %build CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/tmp make %install make install %clean %post %files %doc docs/* /bin/eperl /man/eperl.1 %files modules eperl-2.2.14/contrib/pkg/rpm/rpmrc100664 1750 1750 1205 6362653575 145130ustar rseenbuilddir: . buildroot: /tmp/eperl cpiobin: cpio dbpath: /var/local/lib/rpm defaultdocdir: /usr/local/doc distribution: (not set) excludedocs: (not set) fixperms: a+rX,g-w,o-w ftpport: (not set) ftpproxy: (not set) gzipbin: /usr/bin/gzip messagelevel: (not set) netsharedpath: (not set) optflags: -O2 -m486 -fno-strength-reduce pgp_name: rse pgp_path: pgp require_distribution: (not set) require_icon: (not set) require_vendor: (not set) root: (not set) rpmdir: . rpmfilename: %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm signature: none sourcedir: . specdir: . srcrpmdir: . tmppath: /var/tmp topdir: /usr/local/src/redhat vendor: (not set) eperl-2.2.14/contrib/utils/ 40775 1750 1750 0 6405746753 131325ustar rseeneperl-2.2.14/contrib/utils/00README100664 1750 1750 267 6405747023 142230ustar rseen del2del ............. changes the ePerl block delimiters in a file shtml2phtml ......... converts a (X)SSI file to ePerl format shtml2phtml.test..... testfile for shtml2phtml eperl-2.2.14/contrib/utils/del2del100775 1750 1750 1475 6353231765 144710ustar rseen: eval 'exec perl -S $0 ${1+"$@"}' if $running_under_some_shell; ## ## del2del -- Change ePerl block delimiters ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. ## if ($#ARGV < 4) { print STDERR "$0: ERROR: Bad arguments\n"; print STDERR "Usage: $0 oldBeginDel oldEndDel newBeginDel newEndDel files ...\n"; print STDERR "Example: $0 '' '<%' '%>' *.phtml\n"; exit 1 } $obd = quotemeta(shift ARGV); $oed = quotemeta(shift ARGV); $nbd = shift ARGV; $ned = shift ARGV; foreach $file (@ARGV) { print STDERR "Converting $file..."; system("cp $file $file.old"); open(IN, "<$file.old"); open(OUT, ">$file"); while () { s|$obd|$nbd|go; s|$oed|$ned|go; print OUT $_; } close(OUT); close(IN); print STDERR "Done.\n"; } ##EOF## eperl-2.2.14/contrib/utils/shtml2phtml100775 1750 1750 11215 6353255423 154420ustar rseen: eval 'exec perl -S $0 ${1+"$@"}' if $running_under_some_shell; ## ## shtml2phtml -- Convert (X)SSI script (.shtml) to ePerl script (.phtml) ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. ## $time = time(); $deftimefmt = "%A, %d-%b-%y %T %Z"; $preamble = ""; $BD = ""; @CGIVARS = ( # standard CGI variables from CGI spec 'SERVER_SOFTWARE', 'SERVER_NAME', 'GATEWAY_INTERFACE', 'SERVER_PROTOCOL', 'SERVER_PORT', 'REQUEST_METHOD', 'PATH_INFO', 'PATH_TRANSLATED', 'SCRIPT_NAME', 'QUERY_STRING', 'REMOTE_HOST', 'REMOTE_ADDR', 'AUTH_TYPE', 'REMOTE_USER', 'REMOTE_IDENT', 'CONTENT_TYPE', 'CONTENT_LENGTH', 'HTTP_ACCEPT', 'HTTP_USER_AGENT', # additional CGI variables from Apache mod_rewrite 'SCRIPT_FILENAME', 'SCRIPT_URL', ); sub add_to_preamble ($) { my ($cmd) = @_; $x = quotemeta($cmd); if ($preamble !~ m|$x|s) { $preamble .= $cmd; } } sub interpolate_variable ($) { my ($name) = @_; # standard CGI variable if (grep("$name", @CGIVARS) eq $name) { return "\$ENV{'$name'}"; } # special ones elsif ($name eq 'LAST_MODIFIED') { &add_to_preamble("use POSIX;\n"); &add_to_preamble('$timefmt = "'.$deftimefmt.'";'."\n"); return 'strftime($timefmt, localtime((stat($ENV{"SCRIPT_SRC_FILE"}))[9]))', } elsif ($name eq 'DATE_LOCAL') { &add_to_preamble("use POSIX;\n"); &add_to_preamble('$timefmt = "'.$deftimefmt.'";'."\n"); return 'strftime($timefmt, localtime(time()))', } elsif ($name eq 'DATE_GMT') { &add_to_preamble("use POSIX;\n"); &add_to_preamble('$timefmt = "'.$deftimefmt.'";'."\n"); return 'strftime($timefmt, gmttime(time()))', } elsif ($name eq 'DOCUMENT_NAME') { return '\$ENV{"SCRIPT_SRC_FILE"};', } elsif ($name eq 'DOCUMENT_URI') { return '\$ENV{"SCRIPT_SRC_URL"};', } else { return '$'.$name; } } $in = ""; while () { $in .= $_; } $out = ""; while ($in) { if ($in =~ m|(.*?)(.*)|s) { $out .= $1; $cmd = $2; $in = $3; } else { $out .= $in; last; } if ($cmd =~ m|config\s+timefmt="?(.+?)"?"\s*$|) { $out .= "$BD \$timefmt = \"$1\"; $ED"; } elsif ($cmd =~ m|echo\s+var="?(.+?)"?"\s*$|) { $out .= "$BD print " . &interpolate_variable($1) . "; $ED"; } elsif ($cmd =~ m|include\s+file="?(.+?)"?"\s*$|) { $out .= "\n#include \"$1\"\n"; } elsif ($cmd =~ m|include\s+virtual="?(.+?)"?"\s*$|) { $out .= "\n#include \"$1\"\n"; } elsif ($cmd =~ m|printenv\s*$|) { $out .= "$BD foreach \$k (sort(keys(\%ENV))) { print \"\$k=\$ENV{\$k}\\n\"; } $ED"; } elsif ($cmd =~ m|set\s+var="?(.+?)"?\s+value="?(.+?)"?\s*$|) { $out .= "$BD \$$1='$2'; $ED"; } elsif ($cmd =~ m|exec\s+cgi="?(.+?)"?\s*$|) { &add_to_preamble("use LWP::Simple;\n"); $out .= "$BD print get('$1'); $ED"; } elsif ($cmd =~ m|exec\s+cmd="?(.+?)"?\s*$|) { $out .= "$BD print `$1`; $ED"; } elsif ($cmd =~ m|fsize\s+file="?(.+?)"?\s*$|) { $out .= "$BD print (stat(\"$1\"))[7]; $ED"; } elsif ($cmd =~ m|fsize\s+virtual="?(.+?)"?\s*$|) { $out .= "$BD print (stat(\"$1\"))[7]; $ED"; } elsif ($cmd =~ m|flastmod\s+file="?(.+?)"?\s*$|) { &add_to_preamble("use POSIX;\n"); &add_to_preamble('$timefmt = "'.$deftimefmt.'";'."\n"); $out .= "$BD print strftime(\$timefmt, (stat(\"$1\"))[9]); $ED"; } elsif ($cmd =~ m|flastmod\s+virtual="?(.+?)"?\s*$|) { &add_to_preamble("use POSIX;\n"); &add_to_preamble('$timefmt = "'.$deftimefmt.'";'."\n"); $out .= "$BD print strftime(\$timefmt, (stat(\"$1\"))[9]); $ED"; } elsif ($cmd =~ m|if\s+expr="?(.+?)"?\s*$|) { $expr = $1; $expr =~ s|=(\s/)|=~$1|g; $expr =~ s|!=(\s/)|!~$1|g; $expr =~ s|=\s|ne |g; $expr =~ s|!=\s|ne |g; $expr =~ s|&&|and|g; $expr =~ s|\|\||or|g; $out .= "\n#if $expr\n"; } elsif ($cmd =~ m|elif\s+expr="?(.+?)"?\s*$|) { $expr = $1; $expr =~ s|=(\s/)|=~$1|g; $expr =~ s|!=(\s/)|!~$1|g; $expr =~ s|=\s|ne |g; $expr =~ s|!=\s|ne |g; $expr =~ s|&&|and|g; $expr =~ s|\|\||or|g; $out .= "\n#elsif $expr\n"; } elsif ($cmd =~ m|else\s*$|) { $out .= "\n#else\n"; } elsif ($cmd =~ m|endif\s*$|) { $out .= "\n#endif\n"; } } print "$BD\n$preamble$ED\n"; print $out; ##EOF## eperl-2.2.14/contrib/utils/shtml2phtml.test100664 1750 1750 655 6353254127 163630ustar rseenfoo bar1bar2 bar1bar2 bar1bar2 bar1bar2 bar1bar2 bar1bar2 bar1bar2 bar1bar2 bar1bar2 bar1bar2 eperl-2.2.14/eg/ 40775 1750 1750 0 6434032030 106775ustar rseeneperl-2.2.14/eg/00README100664 1750 1750 554 6434056037 120150ustar rseen Here you can find some of the demo files from the ePerl webpages. They demonstrate typical situations for which ePerl can be used. The ones with extension .phtml can be used for testing with the stand-alone NPH/CGI program nph-eperl. The ones with extension .iphtml can be used for testing with the internal Apache/mod_perl handler Apache::ePerl. eperl-2.2.14/eg/demo.cgipm.iphtml100664 1750 1750 32 6434056037 142050ustar rseen#include demo.cgipm.phtml eperl-2.2.14/eg/demo.cgipm.phtml100664 1750 1750 2546 6434056037 141100ustar rseenvalue if ($cookies{$cnt_name}); # increase the value, because its an access counter $cnt_value++; # create the new counter cookie and send it back to the browser my ($myname, $mypath) = ($ENV{'SCRIPT_SRC_URL'} =~ m%^http://(.+?)(?:|:\d+)(/.*)$%); my $cookie = new CGI::Cookie( -name => $cnt_name, -value => sprintf("%d", $cnt_value), -domain => $myname, -path => $mypath, -expires => '+24h' ); print "Set-Cookie: $cookie\n"; !> demo.cgipm

demo.cgipm

High-level HTTP programming with CGI.pm

This demonstrates how one can create complex HTTP headers like Netscape Cookies by programming them via Perl's CGI::Cookie module.

You have accessed this demo times now. This counter is stored in a cookie, so push your RELOAD button a few times to see the effect.

eperl-2.2.14/eg/demo.env.iphtml100664 1750 1750 30 6434056037 136740ustar rseen#include demo.env.phtml eperl-2.2.14/eg/demo.env.phtml100664 1750 1750 1036 6434056037 135720ustar rseen demo.env

demo.env

Standard CGI Example: Environment

This prints out the CGI environment provided by the Webserver as a sorted list consisting of key/value pairs.


eperl-2.2.14/eg/demo.errout.iphtml100664 1750 1750 33 6434056037 144270ustar rseen#include demo.errout.phtml eperl-2.2.14/eg/demo.errout.phtml100664 1750 1750 663 6434056037 143070ustar rseen demo.errout

ePerl error page: caused by output on STDERR

First pure text, then... ...and then again pure text.

eperl-2.2.14/eg/demo.errsyn.iphtml100664 1750 1750 33 6434056037 144310ustar rseen#include demo.errsyn.phtml eperl-2.2.14/eg/demo.errsyn.phtml100664 1750 1750 664 6434056037 143120ustar rseen demo.errsyn

demo.errsyn

ePerl error page: caused by a syntax error

eperl-2.2.14/eg/demo.func.iphtml100664 1750 1750 31 6434056037 140400ustar rseen#include demo.func.phtml eperl-2.2.14/eg/demo.func.phtml100664 1750 1750 1757 6434056037 137470ustar rseen demo.func

demo.func

Perl Programming

This demonstrates the global scoping within a webpage by defining a Perl function in a first ePerl block and later calling this function in another ePerl block.

Local time is .

eperl-2.2.14/eg/demo.html.iphtml100664 1750 1750 31 6434056037 140510ustar rseen#include demo.html.phtml eperl-2.2.14/eg/demo.html.phtml100664 1750 1750 1460 6434056037 137470ustar rseen demo.html

demo.html

High-level HTML programming with HTML::Stream

This demonstrates how one can use the HTML-Stream package from within ePerl to do high-level HTML programming. First, a programmed hyperlink to A(HREF=>"http://www.engelschall.com/sw/eperl/")-> t("the ePerl webarea")-> _A; !> .

Second, just t("plain text with umlaut characters: äöüÄÖÜß\n" ); !>.
These were automatically converted from ISO-Latin-1 encoding to HTML entities.

eperl-2.2.14/eg/demo.image.iphtml100664 1750 1750 32 6434056037 141700ustar rseen#include demo.image.phtml eperl-2.2.14/eg/demo.image.phtml100664 1750 1750 3517 6434766463 141050ustar rseen ePerl: demo.env

demo.image

Graphics programming with GD

This demonstrates how you can create a webpage with an inlined GIF image which itself is generated on-the-fly from within this page. In other words: the image is part of the webpage source, too. The trick here is that the complete page is surrounded with an ePerl block and according to the QUERY_STRING the script either produces the page itself (pure HTML) or the image by programming it on-the-fly with the GD module. The link to the image is done via a self-referencing URL.

As an example, we present an on-the-fly generared GIF image showing the Web216 color palette (the ``browser-safe'' colors):

The Image

interlaced('true'); for (my $b = 0; $b <= 255; $b += 51) { for (my $r = 0; $r <= 255; $r += 51) { for (my $g = 0; $g <= 255; $g += 51) { my $x = (($b / 51) % 3)*60 + (60-($r / 51) * 10); my $y = (($b / 51) < 3 ? 0 : 1)*60 + (60-($g / 51) * 10); my $col = $im->colorAllocate($r,$g,$b); $im->rectangle($x, $y, $x+9, $y+9, $col); $im->fill($x+2, $y+2, $col); } } } my $C = $im->gif; print "Content-type: image/gif\n"; printf "Content-length: %d\n", length($C); print "\n"; print $C; } !> eperl-2.2.14/eg/demo.lwp.iphtml100664 1750 1750 30 6434056037 137060ustar rseen#include demo.lwp.phtml eperl-2.2.14/eg/demo.lwp.phtml100664 1750 1750 1370 6434056037 136050ustar rseen demo.lwp

demo.lwp

High-level Network programming with LWP::Simple

This demonstrates how one can use the LWP::Simple package (from libwww-perl) from within ePerl to retrieve a file via HTTP. As an example the ePerl distribution README file is fetched from http://www.engelschall.com/sw/eperl/distrib/eperl-SNAP/.

And here comes the file:


eperl-2.2.14/eg/demo.net.iphtml100664 1750 1750 30 6434056037 136720ustar rseen#include demo.net.phtml eperl-2.2.14/eg/demo.net.phtml100664 1750 1750 2122 6434056037 135650ustar rseen demo.net

demo.net

Low-level Network programming with Net::FTP

This demonstrates how one can use the Net::FTP package (from libnet) from within ePerl to retrieve a file via FTP. As an example the ePerl distribution README file is fetched from ftp://ftp.engelschall.com/sw/ while the current filename (ePerl version!) is determined on-the-fly.

And here comes the file:

new("ftp.engelschall.com");
$ftp->login("ftp", "demo.ftp\@");
$ftp->cwd("/sw");
my ($f) = grep(/^eperl-.*\.readme$/, $ftp->ls("eperl-*.readme"));
$ftp->get($f, $tmpfile);
$ftp->quit;

#   read the temporary file into current page
open(FP, "<$tmpfile");
while () {
    print $_;
}
close(FP);
unlink($tmpfile);
!>
eperl-2.2.14/eg/demo.pp.iphtml100664 1750 1750 27 6434056037 135310ustar rseen#include demo.pp.phtml eperl-2.2.14/eg/demo.pp.phtml100664 1750 1750 1251 6434056037 134200ustar rseen demo.pp

demo.pp

Special feature: the ePerl preprocessor

This demonstrates how one can use the ePerl preprocessor. We again (as in demo.lwp) retrieve a file via HTTP. As an example the ePerl distribution README file is fetched from http://www.engelschall.com/sw/eperl/distrib/eperl-SNAP/.

And here comes the file:

#sinclude "http://www.engelschall.com/sw/eperl/distrib/eperl-SNAP/README"
eperl-2.2.14/eg/demo.table.iphtml100664 1750 1750 32 6434056037 141750ustar rseen#include demo.table.phtml eperl-2.2.14/eg/demo.table.phtml100664 1750 1750 1633 6434056037 140740ustar rseen demo.table

demo.table

Low-level HTML programming

Instead of writing down the complex HTML table constructs for the 1x1 chart we program it with the control structures of Perl language.

"; for (my $i=1; $i <= $end; $i++) { print ""; } print ""; # side bar and content print"\n"; for (my $i=1; $i <= $end; $i++) { print ""; for (my $j=1; $j<= $end; $j++) { print ""; } print"\n"; } !>
x$i
$i", $i*$j, "

eperl-2.2.14/eg/demo.text.iphtml100664 1750 1750 31 6434056037 140710ustar rseen#include demo.text.phtml eperl-2.2.14/eg/demo.text.phtml100664 1750 1750 510 6434056037 137420ustar rseenContent-type: text/plain demo.func Low-level HTTP programming This demonstrates how one can prefix the ePerl file with plain HTTP headers which are directly put into the HTTP response header block. eperl-2.2.14/eperl.1100664 1750 1750 121430 6561064031 116420ustar rseen.rn '' }` ''' $RCSfile$$Revision$$Date$ ''' ''' $Log$ ''' .de Sh .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp .if t .sp .5v .if n .sp .. .de Ip .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .de Vb .ft CW .nf .ne \\$1 .. .de Ve .ft R .fi .. ''' ''' ''' Set up \*(-- to give an unbreakable dash; ''' string Tr holds user defined translation string. ''' Bell System Logo is used as a dummy character. ''' .tr \(*W-|\(bv\*(Tr .ie n \{\ .ds -- \(*W- .ds PI pi .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" ''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of ''' \*(L" and \*(R", except that they are used on ".xx" lines, ''' such as .IP and .SH, which do another additional levels of ''' double-quote interpretation .ds M" """ .ds S" """ .ds N" """"" .ds T" """"" .ds L' ' .ds R' ' .ds M' ' .ds S' ' .ds N' ' .ds T' ' 'br\} .el\{\ .ds -- \(em\| .tr \*(Tr .ds L" `` .ds R" '' .ds M" `` .ds S" '' .ds N" `` .ds T" '' .ds L' ` .ds R' ' .ds M' ` .ds S' ' .ds N' ` .ds T' ' .ds PI \(*p 'br\} .\" If the F register is turned on, we'll generate .\" index entries out stderr for the following things: .\" TH Title .\" SH Header .\" Sh Subsection .\" Ip Item .\" X<> Xref (embedded .\" Of course, you have to process the output yourself .\" in some meaninful fashion. .if \nF \{ .de IX .tm Index:\\$1\t\\n%\t"\\$2" .. .nr % 0 .rr F .\} .TH EPERL 1 "EN" "2/Aug/98" "Ralf S. Engelschall" .UC .if n .hy 0 .if n .na .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .de CQ \" put $1 in typewriter font .ft CW 'if n "\c 'if t \\&\\$1\c 'if n \\&\\$1\c 'if n \&" \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 '.ft R .. .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 . \" AM - accent mark definitions .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds ? ? . ds ! ! . ds / . ds q .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' . ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' . ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E .ds oe o\h'-(\w'o'u*4/10)'e .ds Oe O\h'-(\w'O'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds v \h'-1'\o'\(aa\(ga' . ds _ \h'-1'^ . ds . \h'-1'. . ds 3 3 . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE . ds oe oe . ds Oe OE .\} .rm #[ #] #H #V #F C .SH "NAME" ePerl \- Embedded Perl 5 Language .SH "VERSION" 2.2.14 (02-08-1998) .SH "SYNOPSIS" \fBeperl\fR [\fB\-d\fR \fIname\fR=\fIvalue\fR] [\fB\-D\fR \fIname\fR=\fIvalue\fR] [\fB\-B\fR \fIbegin_delimiter\fR] [\fB\-E\fR \fIend_delimiter\fR] [\fB\-i\fR] [\fB\-m\fR \fImode\fR] [\fB\-o\fR \fIoutputfile\fR] [\fB\-k\fR] [\fB\-I\fR \fIdirectory\fR] [\fB\-P\fR] [\fB\-C\fR] [\fB\-L\fR] [\fB\-x\fR] [\fB\-T\fR] [\fB\-w\fR] [\fB\-c\fR] [\fIinputfile\fR] .PP \fBeperl\fR [\fB\-r\fR] [\fB\-l\fR] [\fB\-v\fR] [\fB\-V\fR] .SH "DESCRIPTION" .Sh "Abstract" ePerl interprets an \s-1ASCII\s0 file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain \s-1ASCII\s0 data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic \s-1HTML\s0 page programming. .Sh "Introduction" The \fBeperl\fR program is the \fIEmbedded Perl 5 Language\fR interpreter. This really is a full-featured Perl 5 interpreter, but with a different calling environment and source file layout than the default Perl interpreter (usually the executable \fBperl\fR or \fBperl5\fR on most systems). It is designed for general \s-1ASCII\s0 file generation with the philosophy of \fIembedding\fR the Perl 5 program code into the \s-1ASCII\s0 data instead of the usual way where you embed the \s-1ASCII\s0 data into a Perl 5 program (usually by quoting the data and using them via \f(CWprint\fR statements). So, instead of writing a plain Perl script like .PP .Vb 6 \& #!/path/to/perl \& print "foo bar\en"; \& print "baz quux\en"; \& for ($i = 0; $i < 10; $i++) { print "foo #${i}\en"; } \& print "foo bar\en"; \& print "baz quux\en"; .Ve you can write it now as an ePerl script: .PP .Vb 6 \& #!/path/to/eperl \& foo bar \& baz quux \& <: for ($i = 0; $i < 10; $i++) { print "foo #${i}\en"; } :> \& foo bar \& baz quux .Ve Although the ePerl variant has a different source file layout, the semantic is the same, i.e. both scripts create exactly the same resulting data on \f(CWSTDOUT\fR. .Sh "Intention" ePerl is simply a glue code which combines the programming power of the Perl 5 interpreter library with a tricky embedding technique. The embedding trick is this: it converts the source file into a valid Perl script which then gets \fIentirely\fR evaluated by only one internal instance of the Perl 5 interpreter. To achieve this, ePerl translates all plain code into (escaped) Perl 5 strings placed into \fIprint\fR constructs while passing through all embedded native Perl 5 code. As you can see, ePerl itself does exactly the same internally, a silly programmer had to do when writing a plain Perl generation script. .PP Due to the nature of such bristled code, ePerl is really the better attempt when the generated \s-1ASCII\s0 data contains really more static as dynamic data. Or in other words: \fIUse ePerl if you want to keep the most of the generated \s-1ASCII\s0 data in plain format while just programming some bristled stuff.\fR Do not use it when generating pure dynamic data. There it brings no advantage to the ordinary program code of a plain Perl script. So, the static part should be at least 60% or the advantage becomes a disadvantage. .PP ePerl in its origin was actually designed for an extreme situation: as a webserver scripting-language for on-the-fly \s-1HTML\s0 page generation. Here you have the typical case that usually 90% of the data consists of pure static \s-1HTML\s0 tags and plain \s-1ASCII\s0 while just the remaining 10% are programming constructs which dynamically generate more markup code. This is the reason why ePerl beside its standard Unix filtering runtime-mode also supports the \s-1CGI/1\s0.1 and \s-1NPH\s0\-\s-1CGI/1\s0.1 interfaces. .Sh "Embedded Perl Syntax" Practically you can put any valid Perl constructs inside the ePerl blocks the used Perl 5 interpreter library can evaluate. But there are some important points you should always remember and never forget when using ePerl: .Ip "\fI1. Delimiters are always discarded.\fR" 4 Trivially to say, but should be mentioned at least once. The ePerl block delimiters are always discarded and are only necessary for ePerl to recognize the embedded Perl constructs. They are never passed to the final output. .Ip "\fI2. Generated content has to go to \f(CWSTDOUT\fR.\fR" 4 Although you can define subroutines, calculate some data, etc. inside ePerl blocks only data which is explicitly written to the \f(CWSTDOUT\fR filehandle is expanded. In other words: When an ePerl block does not generate content on \f(CWSTDOUT\fR, it is entirely replaced by an empty string in the final output. But when content is generated it is put at the point of the ePerl block in the final output. Usually contents is generated via pure \f(CWprint\fR constructs which implicitly use \f(CWSTDOUT\fR when no filehandle is given. .Ip "\fI3. Generated content on \f(CWSTDERR\fR always leads to an error.\fR" 4 Whenever content is generated on the \f(CWSTDERR\fR filehandle, ePerl displays an error (including the \s-1STDERR\s0 content). Use this to exit on errors while passing errors from ePerl blocks to the calling environment. .Ip "\fI4. Last semicolon.\fR" 4 Because of the following point 6 (see below) and the fact that most of the users don't have the internal ePerl block translations in mind, ePerl is smart about the last semicolon. Usually every ePerl block has to end with the semicolon of the last command. .Sp .Vb 1 \& <: cmd; ...; cmd; :> .Ve But when the last semicolon is missing it is automatically added by ePerl, i.e. .Sp .Vb 1 \& <: cmd; ...; cmd :> .Ve is also correct syntax. But sometimes it is necessary to force ePerl \fInot\fR to add the semicolon. Then you can add a ``\f(CW_\fR'\*(R' (underscore) as the last non-whitespace character in the block to force ePerl to leave the final semicolon. Use this for constructs like the following .Sp .Vb 5 \& <: if (...) { _:> \& foo \& <: } else { _:> \& bar \& <: } :> .Ve where you want to spread a Perl directive over more ePerl blocks. .Ip "\fI5. Shorthand for \f(CWprint\fR\-only blocks.\fR" 4 Because most of the time ePerl is used just to interpolate variables, e.g. .Sp .Vb 1 \& <: print $VARIABLE; :> .Ve it is useful to provide a shortcut for this kind of constructs. So ePerl provides a shortcut via the character \*(L'=\*(R'. When it immediately (no whitespaces allowed here) follows the begin delimiter of an ePerl block a \f(CWprint\fR statement is implicitly generated, i.e. the above block is equivalent to .Sp .Vb 1 \& <:=$VARIABLE:> .Ve Notice that the semicolon was also removed here, because it gets automatically added (see above). .Ip "\fI6. Special EndOfLine discard command for ePerl blocks.\fR" 4 ePerl provides a special discard command named ``\f(CW//\fR'\*(R' which discards all data up-to and including the following newline character when directly followed an end block delimiter. Usually when you write .Sp .Vb 3 \& foo \& <: $x = 1; :> \& quux .Ve the result is .Sp .Vb 3 \& foo \& \& quux .Ve because ePerl always preserves code around ePerl blocks, even just newlines. But when you write .Sp .Vb 3 \& foo \& <: $x = 1; :>// \& quux .Ve the result is .Sp .Vb 2 \& foo \& quux .Ve because the ``\f(CW//\fR'\*(R' deleted all stuff to the end of the line, \fIincluding\fR the newline. .Ip "\fI7. Restrictions in parsing.\fR" 4 Every program has its restrictions, ePerl too. Its handicap is that Perl is not only a rich language, it is a horrible one according to parsing its constructs. Perhaps you know the phrase ,,Only \fIperl\fR can parse \fIPerl\fR'\*(R'. Think about it. The implication of this is that ePerl never tries to parse the ePerl blocks itself. It entirely relies on the Perl interpreter library, because it is the only instance which can do this without errors. But the problem is that ePerl at least has to recognize the begin and end positions of those ePerl blocks. .Sp There are two ways: It can either look for the end delimiter while parsing but at least recognize quoted strings (where the end delimiter gets treated as pure data). Or it can just move forward to the next end delimiter and say that it have not occur inside Perl constructs. In ePerl 2.0 the second one was used, while in ePerl 2.1 the first one was taken because a lot of users wanted it this way while using bad end delimiters like ``\f(CW>\fR'\*(R'. But actually the author has again revised its opinion and decided to finally use the second approach which is used since ePerl 2.2 now. Because while the first one allows more trivial delimiters (which itself is not a really good idea), it fails when constructs like ``\f(CWm|"[^"]+"|\fR'\*(R' etc. are used inside ePerl blocks. And it is easier to escape end delimiters inside Perl constructs (for instance via backslashes in quoted strings) than rewrite complex Perl constructs to use even number of quotes. .Sp So, whenever your end delimiter also occurs inside Perl constructs you have to escape it in any way. .Ip "\fI8. \s-1HTML\s0 entity conversion.\fR" 4 Because one of ePerl's usage is as a server-side scripting-language for \s-1HTML\s0 pages, there is a common problem in conjunction with \s-1HTML\s0 editors. They cannot know ePerl blocks, so when you enter those blocks inside the editors they usually encode some characters with the corresponding \s-1HTML\s0 entities. The problem is that this encoding leads to invalid Perl code. ePerl provides the option \fB\-C\fR for decoding these entities which is automatically turned on in \s-1CGI\s0 modes. See description below under option \fB\-C\fR for more details. .Sh "Runtime Modes" ePerl can operate in three different runtime modes: .Ip "\fIStand-alone Unix filter mode\fR" 4 This is the default operation mode when used as a generation tool from the Unix shell or as a batch-processing tool from within other programs or scripts: .Sp .Vb 4 \& $ eperl [options] - < inputfile > outputfile \& $ eperl [options] inputfile > outputfile \& $ eperl [options] -o outputfile - < inputfile \& $ eperl [options] -o outputfile inputfile .Ve As you can see, ePerl can be used in any combination of \s-1STDIO\s0 and external files. Additionally there are two interesting variants of using this mode. First you can use ePerl in conjunction with the Unix \fIShebang\fR magic technique to implicitly select it as the interpreter for your script similar to the way you are used to with the plain Perl interpreter: .Sp .Vb 4 \& #!/path/to/eperl [options] \& foo \& <: print "bar"; :> \& quux .Ve Second, you can use ePerl in conjunction with the Bourne-Shell \fIHere Document\fR technique from within you shell scripts: .Sp .Vb 8 \& #!/bin/sh \& ... \& eperl [options] - < \& quux \& EOS \& ... .Ve And finally you can use ePerl directly from within Perl programs by the use of the \fIParse::ePerl\fR\|(3) package (assuming that you have installed this also; see file \fI\s-1INSTALL\s0\fR inside the ePerl distribution for more details): .Sp .Vb 17 \& #!/path/to/perl \& ... \& use Parse::ePerl; \& ... \& $script = < \& quux \& EOT \& ... \& $result = Parse::ePerl::Expand({ \& Script => $script, \& Result => \e$result, \& }); \& ... \& print $result; \& ... .Ve See \fIParse::ePerl\fR\|(3) for more details. .Ip "\fI\s-1CGI/1\s0.1 compliant interface mode\fR" 4 This is the runtime mode where ePerl uses the \s-1CGI/1\s0.1 interface of a webserver when used as a \fIServer-Side Scripting Language\fR on the Web. ePerl enters this mode automatically when the \s-1CGI/1\s0.1 environment variable \f(CWPATH_TRANSLATED\fR is set and its or the scripts filename does \fInot\fR begin with the \s-1NPH\s0 prefix ``\fInph-\fR'\*(R'. In this runtime mode it prefixes the resulting data with \s-1HTTP/1\s0.0 (default) or \s-1HTTP/1\s0.1 (if identified by the webserver) compliant response header lines. .Sp ePerl also recognizes \s-1HTTP\s0 header lines at the beginning of the scripts generated data, i.e. for instance you can generate your own \s-1HTTP\s0 headers like .Sp .Vb 5 \& \& \& ... .Ve But notice that while you can output arbitrary headers, most webservers restrict the headers which are accepted via the \s-1CGI/1\s0.1 interface. Usually you can provide only a few specific \s-1HTTP\s0 headers like \f(CWLocation\fR or \f(CWStatus\fR. If you need more control you have to use the \s-1NPH\s0\-\s-1CGI/1\s0.1 interface mode. .Sp Additionally ePerl provides a useful feature in this mode: It can switch its \s-1UID/GID\s0 to the owner of the script if it runs as a Unix \fISetUID\fR program (see below under the \fISecurity\fR manpage and the option ``u+s'\*(R' of \fIchmod\fR\|(1)). .Sp There are two commonly known ways of using this \s-1CGI/1\s0.1 interface mode on the Web. First, you can use it to explicitly transform plain \s-1HTML\s0 files into \s-1CGI/1\s0.1 scripts via the \fIShebang\fR technique (see above). For an Apache webserver just put the following line as the first line of the file: .Sp .Vb 1 \& #!/path/to/eperl -mc .Ve Then rename the script from \fIfile.html\fR to \fIfile.cgi\fR and set its execution bit via .Sp .Vb 2 \& $ mv file.html file.cgi \& $ chmod a+rx file.cgi .Ve Now make sure that Apache accepts \fIfile.cgi\fR as a \s-1CGI\s0 program by enabling \s-1CGI\s0 support for the directory where \fIfile.cgi\fR resides. For this add the line .Sp .Vb 1 \& Options +ExecCGI .Ve to the \fI.htaccess\fR file in this directory. Finally make sure that Apache really recognizes the extension \fI.cgi\fR. Perhaps you additionally have to add the following line to your \fIhttpd.conf\fR file: .Sp .Vb 1 \& AddHandler cgi-script .cgi .Ve Now you can use \fIfile.cgi\fR instead of \fIfile.html\fR and make advantage of the achieved programming capability by bristling \fIfile.cgi\fR with your Perl blocks (or the transformation into a \s-1CGI\s0 script would be useless). .Sp Alternatively (or even additionally) a webmaster can enable ePerl support in a more seemless way by configuring ePerl as a real implicit server-side scripting language. This is done by assigning a \s-1MIME\s0\-type to the various valid ePerl file extensions and forcing all files with this \s-1MIME\s0\-type to be internally processed via the ePerl interpreter. You can accomplish this for Apache by adding the following to your \fIhttpd.conf\fR file .Sp .Vb 3 \& AddType application/x-httpd-eperl .phtml .eperl .epl \& Action application/x-httpd-eperl /internal/cgi/eperl \& ScriptAlias /internal/cgi /path/to/apache/cgi-bin .Ve and creating a copy of the \fIeperl\fR program in your \s-1CGI\s0\-directory: .Sp .Vb 1 \& $ cp -p /path/to/eperl /path/to/apache/cgi-bin/eperl .Ve Now all files with the extensions \fI.phtml\fR, \fI.eperl\fR and \fI.epl\fR are automatically processed by the ePerl interpreter. There is no need for a \fIShebang\fR line or any locally enabled \s-1CGI\s0 mode. .Sp One final hint: When you want to test your scripts offline, just run them with forced \s-1CGI/1\s0.1 mode from your shell. But make sure you prepare all environment variables your script depends on, e.g. \f(CWQUERY_STRING\fR or \f(CWPATH_INFO\fR. .Sp .Vb 2 \& $ export QUERY_STRING="key1=value1&key2=value2" \& $ eperl -mc file.phtml .Ve .Ip "\fI\s-1NPH\s0\-\s-1CGI/1\s0.1 compliant interface mode\fR" 4 This runtime mode is a special variant of the \s-1CGI/1\s0.1 interface mode, because most webservers (e.g. Apache) provide it for special purposes. It is known as \fINon-Parsed-Header\fR (\s-1NPH\s0) \s-1CGI/1\s0.1 mode and is usually used by the webserver when the filename of the \s-1CGI\s0 program is prefixed with ``\f(CWnph-\fR'\*(R'. In this mode the webserver does no processing on the \s-1HTTP\s0 response headers and no buffering of the resulting data, i.e. the \s-1CGI\s0 program actually has to provide a complete \s-1HTTP\s0 response itself. The advantage is that the program can generate arbitrary \s-1HTTP\s0 headers or \s-1MIME\s0\-encoded multi-block messages. .Sp So, above we have renamed the file to \fIfile.cgi\fR which restricted us a little bit. When we alternatively rename \fIfile.html\fR to \fInph-file.cgi\fR and force the \s-1NPH\s0\-\s-1CGI/1\s0.1 interface mode via option \fB\-mn\fR then this file becomes a \s-1NPH\s0\-\s-1CGI/1\s0.1 compliant program under Apache and other webservers. Now our script can provide its own \s-1HTTP\s0 response (it need not, because when absent ePerl provides a default one for it). .Sp .Vb 6 \& #!/path/to/bin/eperl -mn \& \& ... .Ve As you expect this can be also used with the implicit Server-Side Scripting Language technique. Put .Sp .Vb 3 \& AddType application/x-httpd-eperl .phtml .eperl .epl \& Action application/x-httpd-eperl /internal/cgi/nph-eperl \& ScriptAlias /internal/cgi /path/to/apache/cgi-bin .Ve into your \fIhttpd.conf\fR and run the command .Sp .Vb 1 \& $ cp -p /path/to/eperl /path/to/apache/cgi-bin/nph-eperl .Ve from your shell. \fIThis is the preferred way of using ePerl as a Server-Side Scripting Language, because it provides most flexibility\fR. .Sh "Security" When you are installing ePerl as a \s-1CGI/1\s0.1 or \s-1NPH\s0\-\s-1CGI/1\s0.1 compliant program (see above for detailed description of these modes) via .PP .Vb 3 \& $ cp -p /path/to/eperl /path/to/apache/cgi-bin/eperl \& $ chown root /path/to/apache/cgi-bin/eperl \& $ chmod u+s /path/to/apache/cgi-bin/eperl .Ve or .PP .Vb 3 \& $ cp -p /path/to/eperl /path/to/apache/cgi-bin/nph-eperl \& $ chown root /path/to/apache/cgi-bin/nph-eperl \& $ chmod u+s /path/to/apache/cgi-bin/nph-eperl .Ve i.e. with \fISetUID\fR bit enabled for the \fBroot\fR user, ePerl can switch to the \s-1UID/GID\s0 of the \fIscripts owner\fR. Although this is a very useful feature for script programmers (because one no longer need to make auxiliary files world-readable and temporary files world-writable!), it can be to risky for you when you are paranoid about security of SetUID programs. If so just don't install ePerl with enabled SetUID bit! This is the reason why ePerl is per default only installed as a Stand-Alone Unix filter which never needs this feature. .PP For those of us who decided that this feature is essential for them ePerl tries really hard to make it secure. The following steps have to be successfully passed before ePerl actually switches its \s-1UID/GID\s0 (in this order): .PP .Vb 11 \& 1. The script has to match the following extensions: \& .html, .phtml, .ephtml, .epl, .pl, .cgi \& 2. The UID of the calling process has to be a valid UID, \& i.e. it has to be found in the systems password file \& 3. The UID of the calling process has to match the \& following users: root, nobody \& 4. The UID of the script owner has to be a valid UID, \& i.e. it has to be found in the systems password file \& 5. The GID of the script group has to be a valid GID, \& i.e. it has to be found in the systems group file \& 6. The script has to stay below or in the owners homedir .Ve \fI\s-1IF\s0 \s-1ONLY\s0 \s-1ONE\s0 \s-1OF\s0 \s-1THOSE\s0 \s-1STEPS\s0 \s-1FAIL\s0, \s-1NO\s0 \s-1UID\s0/\s-1GID\s0 \s-1SWITCHING\s0 \s-1TAKES\s0 \s-1PLACE\s0!\fR. Additionally (if \f(CWDO_ON_FAILED_STEP\fR was defined as \f(CWSTOP_AND_ERROR\fR in \fIeperl_security.h\fR \- not per default defined this way!) ePerl can totally stop processing and display its error page. This is for the really paranoid webmasters. Per default when any step failed the \s-1UID/GID\s0 switching is just disabled, but ePerl goes on with processing. Alternatively you can disable some steps at compile time. See \fIeperl_security.h\fR. .PP \fIAlso remember that ePerl always eliminates the effective \s-1UID/GID\s0, independent of the runtime mode and independent if ePerl has switched to the \s-1UID/GID\s0 of the owner. For security reasons, the effective \s-1UID/GID\s0 is always destroyed before the script is executed.\fR .Sh "ePerl Preprocessor" ePerl provides an own preprocessor similar to \fI\s-1CPP\s0\fR in style which is either enabled manually via option \fB\-P\fR or automatically when ePerl runs in (\s-1NPH\s0\-)\s-1CGI\s0 mode. The following directives are supported: .Ip "\f(CW#include path\fR " 4 This directive is an include directive which can be used to include really any stuff, but was actually designed to be used to include other ePerl source files. The \fIpath\fR can be either a relative or absolute path for the local filesystem or a fully qualified \s-1HTTP\s0 \s-1URL\s0. .Sp In case of the absolute path the file is directly accessed on the filesystem, while the relative path is first searched in the current working directory and then in all directories specified via option \fB\-I\fR. In the third case (\s-1HTTP\s0 \s-1URL\s0) the file is retrieves via a \s-1HTTP/1\s0.0 request on the network. Here \s-1HTTP\s0 redirects (response codes 301 and 302) are supported, too. .Sp Notice: While ePerl strictly preserves the line numbers when translating the bristled ePerl format to plain Perl format, the ePerl preprocessor can't do this (because its a \fBpre\fRprocessor which expands) for this directive. So, whenever you use \f(CW#include\fR, remember that line numbers in error messages are wrong. .Sp Also notice one important security aspect: Because you can include any stuff as it is provided with this directive, use it only for stuff which is under your direct control. Don't use this directive to include foreign data, at least not from external webservers. For instance say you have a ePerl page with \f(CW#include http://www.foreigner.com/nice-page.html\fR and at the next request of this page your filesystem is lost! Why? Because the foreigner recognizes that you include his page and are using ePerl and just put a simple ``\f(CW\fR'\*(R' in his page. Think about it. \fI\s-1NEVER\s0 \s-1USE\s0 #\s-1INCLUDE\s0 \s-1FOR\s0 \s-1ANY\s0 \s-1DATA\s0 \s-1WHICH\s0 \s-1IS\s0 \s-1NOT\s0 \s-1UNDER\s0 \s-1YOUR\s0 \s-1OWN\s0 \s-1CONTROL\s0\fR. Instead always use \f(CW#sinclude\fR for such situations. .Ip "\f(CW#sinclude path\fR " 4 This is the secure variant of \f(CW#include\fR where after reading the data from \fIpath\fR all ePerl begin and end delimiters are removed. So risky ePerl blocks lost their meaning and are converted to plain text. Always use this directive when you want to include data which is not under your own control. .Ip "\f(CW#if expr\fR, \f(CW#elsif expr\fR, \f(CW#else\fR, \f(CW#endif\fR" 4 These implement a \s-1CPP\s0\-style \f(CW#if-[#else-]#endif\fR construct, but with a Perl semantic. While the other directives are real preprocessor commands which are evaluated at the preprocessing step, this construct is actually just transformed into a low-level ePerl construct, so it is \fBnot\fR actually evaluated at the preprocessing step. It is just a handy shortcut for the following (where \s-1BD\s0 is the currently used begin delimiter and \s-1ED\s0 the end delimiter): .Sp .Vb 4 \& ``#if expr'' -> ``BD if (expr) { _ ED//'' \& ``#elsif expr'' -> ``BD } elsif (expr) { _ ED//'' \& ``#else'' -> ``BD } else { _ ED//'' \& ``#endif'' -> ``BD } _ ED//'' .Ve The advantage of this unusual aproach is that the if-condition really can be any valid Perl expression which provides maximum flexibility. The disadvantage is that you cannot use the if-construct to make real preprocessing decisions. As you can see, the design goal was just to provide a shorthand for the more complicated Perl constructs. .Ip "\f(CW#c\fR" 4 This is the comment directive which just discards all data up to and including the newline character. Use this one to comment out any stuff, even other preprocessor directives. .Sh "Provided Functionality" Up to know you've understand that ePerl provides a nice facility to embed Perl code into any \s-1ASCII\s0 data. But now the typical question is: Which Perl code can be put into these ePerl blocks and does ePerl provide any special functionality inside these ePerl blocks? .PP The answers are: First, you can put really \fIany\fR Perl code into the ePerl blocks which are valid to the Perl interpreter ePerl was linked with. Second, ePerl does \fInot\fR provide any special functionality inside these ePerl blocks, because Perl is already sophisticated enough ;\-) .PP The implication of this is: Because you can use any valid Perl code you can make use of all available Perl 5 modules, even those ones which use shared objects (because ePerl \fIis\fR a Perl interpreter, including DynaLoader support). So, browse to the Comprehensive Perl Archive Network (\s-1CPAN\s0) via http://www.perl.com/perl/\s-1CPAN\s0 and grab your favorite packages which can make your life easier (both from within plain Perl scripts \fIand\fR ePerl scripts) and just use the construct ``\f(CWuse name;\fR'\*(R' in any ePerl block to use them from within ePerl. .PP When using ePerl as a Server-Side-Scripting-Language I really recommend you to install at least the packages \fI\s-1CGI\s0.pm\fR (currently vers. 2.36), \fI\s-1HTML\s0\-Stream\fR (1.40), \fIlibnet\fR (1.0505) and \fIlibwww-perl\fR (5.08). When you want to generate on-the-fly images as well, I recommend you to additionally install at least \fI\s-1GD\s0\fR (1.14) and \fIImage-Size\fR (2.3). The ePerl interpreter in conjunction with these really sophisticated Perl 5 modules will provide you with maximum flexibility and functionality. In other words: \fIMake use of maximum Software Leverage in the hackers world of Perl as great as possible\fR. .SH "OPTIONS" .Ip "\fB\-d\fR \fIname\fR=\fIvalue\fR" 4 Sets a Perl variable in the package \f(CWmain\fR which can be referenced via \f(CW$name\fR or more explicitly via \f(CW$main::name\fR. The command .Sp .Vb 3 \& eperl -d name=value .. \& \&is actually equivalent to having .Ve .Vb 1 \& .Ve at the beginning of \fIinputfile\fR. This option can occur more than once. .Ip "\fB\-D\fR \fIname\fR=\fIvalue\fR" 4 Sets a environment variable which can be referenced via \f(CW$ENV{'variable'}\fR inside the Perl blocks. The command .Sp .Vb 3 \& eperl -D name=value .. \& \&is actually equivalent to .Ve .Vb 1 \& export name=value; eperl ... .Ve but the advantage of this option is that it doesn't manipulate the callers environment. This option can occur more than once. .Ip "\fB\-B\fR \fIbegin_delimiter\fR" 4 Sets the Perl block begin delimiter string. Use this in conjunction with \f(CW-E\fR to set different delimiters when using ePerl as an offline \s-1HTML\s0 creation-language while still using it as an online \s-1HTML\s0 scripting-language. Default delimiters are \f(CW\fR for \s-1CGI\s0 modes and \f(CW<:\fR and \f(CW:>\fR for stand-alone Unix filtering mode. .Sp There are a lot of possible variations you could choose: \*(L"\f(CW<:\fR\*(R" and \*(L"\f(CW:>\fR\*(R" (the default ePerl stand-alone filtering mode delimiters), \*(L"\f(CW\fR\*(R" (the default ePerl \s-1CGI\s0 interface mode delimiters), \*(L"\f(CW\fR\*(R" (standard \s-1HTML\s0 scripting language style), \*(L"\f(CW\fR\*(R" (forthcoming \s-1HTML3\s0.2+ aka Cougar style), \*(L"\f(CW\fR\*(R" and \*(L"\f(CW\fR\*(R" (\s-1HTML\s0\-like style), \*(L"\f(CW\fR\*(R" (NeoScript and \s-1SSI\s0 style) or even \*(L"\f(CW\fR\*(R" (\s-1PHP/FI\s0 style; but this no longer recommended because it can lead to parsing problems. Should be used only for backward compatibility to old ePerl versions 1.x). .Sp The begin and end delimiters are searched case-insensitive. .Ip "\fB\-E\fR \fIend_delimiter\fR" 4 Sets the Perl block end delimiter string. See also option \fB\-B\fR. .Ip "\fB\-i\fR" 4 Forces the begin and end delimiters to be searched case-insensitive. Use this when you are using delimiters like ``\f(CW\fR...\f(CW\fR'\*(R' or other more textual ones. .Ip "\fB\-m\fR \fImode\fR" 4 This forces ePerl to act in a specific runtime mode. See above for a detailed description of the three possible modes: Stand-alone filter (\fImode\fR=\f(CWf\fR, i.e. option \fB\-mf\fR), \s-1CGI/1\s0.1 interface mode (\fImode\fR=\f(CWc\fR, i.e. option \fB\-mc\fR) or the \s-1NPH\s0\-\s-1CGI/1\s0.1 interface mode (\fImode\fR=\f(CWn\fR, i.e. option \fB\-mn\fR). .Ip "\fB\-o\fR \fIoutputfile\fR" 4 Forces the output to be written to \fIoutputfile\fR instead of \fI\s-1STDOUT\s0\fR. Use this option when using ePerl as a filter. The outputfile ``\fI\-\fR'\*(R' sets \fI\s-1STDOUT\s0\fR as the output handle explicitly. Notice that this file is relative to the source file directory when the runtime mode is forced to \s-1CGI\s0 or \s-1NPH\s0\-\s-1CGI\s0. .Ip "\fB\-k\fR" 4 Forces ePerl to keep the current working directory from where it was started. Per default ePerl will change to the directory where the file to be executed stays. This option is useful if you use ePerl as an offline filter on a temporary file. .Ip "\fB\-x\fR" 4 This sets debug mode where ePerl outputs the internally created Perl script to the console (\fI/dev/tty\fR) before executing it. Only for debugging problems with the inputfile conversion. .Ip "\fB\-I\fR \fIdirectory\fR" 4 Specify a directory which is both used for \f(CW#include\fR and \f(CW#sinclude\fR directives of the ePerl preprocessor and added to \f(CW@INC\fR under runtime. This option can occur more than once. .Ip "\fB\-P\fR" 4 Manually enables the special ePerl Preprocessor (see above). This option is enabled for all \s-1CGI\s0 modes automatically. .Ip "\fB\-C\fR" 4 This enables the \s-1HTML\s0 entity conversion for ePerl blocks. This option is automatically forced in \s-1CGI\s0 modes. .Sp The solved problem here is the following: When you use ePerl as a Server-Side-Scripting-Language for \s-1HTML\s0 pages and you edit your ePerl source files via a \s-1HTML\s0 editor, the chance is high that your editor translates some entered characters to \s-1HTML\s0 entities, for instance ``\f(CW<\fR'\*(R' to ``\f(CW<\fR'\*(R'. This leads to invalid Perl code inside ePerl blocks, because the \s-1HTML\s0 editor has no knowledge about ePerl blocks. Using this option the ePerl parser automatically converts all entities found inside ePerl blocks back to plain characters, so the Perl interpreter again receives valid code blocks. .Ip "\fB\-L\fR" 4 This enables the line continuation character ``\f(CW\e\fR'\*(R' (backslash) outside ePerl blocks. With this option you can spread oneline-data over more lines. But use with care: This option changes your data (outside ePerl blocks). Usually ePerl really pass through all surrounding data as raw data. With this option the newlines become new semantics. .Ip "\fB\-T\fR" 4 This enabled Perl's \fITainting mode\fR where the Perl interpreter takes special precautions called taint checks to prevent both obvious and subtle traps. See \fIperlsec\fR\|(1) for more details. .Ip "\fB\-w\fR" 4 This enables Warnings where the Perl interpreter produces some lovely diagnostics. See \fIperldiag\fR\|(1) for more details. .Ip "\fB\-c\fR" 4 This runs a pure syntax check which is similar to ``\f(CWperl -c\fR'\*(R'. .Ip "\fB\-r\fR" 4 This prints the internal ePerl \s-1README\s0 file to the console. .Ip "\fB\-l\fR" 4 This prints the internal ePerl \s-1LICENSE\s0 file to the console. .Ip "\fB\-v\fR" 4 This prints ePerl version information to the console. .Ip "\fB\-V\fR" 4 Same as option \fB\-v\fR but additionally shows the Perl compilation parameters. .SH "ENVIRONMENT" .Sh "Used Variables" .Ip "\f(CWPATH_TRANSLATED\fR" 4 This \s-1CGI/1\s0.1 variable is used to determine the source file when ePerl operates as a \s-1NPH\s0\-\s-1CGI/1\s0.1 program under the environment of a webserver. .Sh "Provided Variables" .Ip "\f(CWSCRIPT_SRC_PATH\fR" 4 The absolute pathname of the script. Use this when you want to directly access the script from within itself, for instance to do \f(CWstat()\fR and other calls. .Ip "\f(CWSCRIPT_SRC_PATH_DIR\fR" 4 The directory part of \f(CWSCRIPT_SRC_PATH\fR. Use this one when you want to directly access other files residing in the same directory as the script, for instance to read config files, etc. .Ip "\f(CWSCRIPT_SRC_PATH_FILE\fR" 4 The filename part of \f(CWSCRIPT_SRC_PATH\fR. Use this one when you need the name of the script, for instance for relative self-references through URLs. .Ip "\f(CWSCRIPT_SRC_URL\fR" 4 The fully-qualified \s-1URL\s0 of the script. Use this when you need a \s-1URL\s0 for self-reference. .Ip "\f(CWSCRIPT_SRC_URL_DIR\fR" 4 The directory part of \f(CWSCRIPT_SRC_URL\fR. Use this one when you want to directly access other files residing in the same directory as the script via the Web, for instance to reference images, etc. .Ip "\f(CWSCRIPT_SRC_URL_FILE\fR" 4 The filename part of \f(CWSCRIPT_SRC_URL\fR. Use this one when you need the name of the script, for instance for relative self-references through URLs. Actually the same as \f(CWSCRIPT_SRC_PATH_FILE\fR, but provided for consistency. .Ip "\f(CWSCRIPT_SRC_SIZE\fR" 4 The filesize of the script, in bytes. .Ip "\f(CWSCRIPT_SRC_MODIFIED\fR" 4 The last modification time of the script, in seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time. .Ip "\f(CWSCRIPT_SRC_MODIFIED_CTIME\fR" 4 The last modification time of the script, in \fIctime\fR\|(3) format (``\s-1WDAY\s0 \s-1MMM\s0 \s-1DD\s0 \s-1HH:MM:SS\s0 \s-1YYYY\s0\en''). .Ip "\f(CWSCRIPT_SRC_MODIFIED_ISOTIME\fR" 4 The last modification time of the script, in \s-1ISO\s0 format (``\s-1DD\s0\-\s-1MM\s0\-\s-1YYYY\s0 \s-1HH:MM\s0''). .Ip "\f(CWSCRIPT_SRC_OWNER\fR" 4 The username of the script owner. .Ip "\f(CWVERSION_INTERPRETER\fR" 4 The ePerl identification string. .Ip "\f(CWVERSION_LANGUAGE\fR" 4 The identification string of the used Perl interpreter library. .Sh "Provided Built-In Images" The following built-in images can be accessed via \s-1URL\s0 \f(CW/url/to/nph-eperl/\fR\fI\s-1NAME\s0\fR\f(CW.gif\fR: .Ip "\f(CWlogo.gif\fR" 4 The standard ePerl logo. Please do not include this one on your website. .Ip "\f(CWpowered.gif\fR" 4 The ``\fIpowered by ePerl 2.2\fR'\*(R' logo. Feel free to use this on your website. .SH "AUTHOR" .PP .Vb 3 \& Ralf S. Engelschall \& rse@engelschall.com \& www.engelschall.com .Ve .SH "SEEALSO" \fIParse::ePerl\fR\|(3), \fIApache::ePerl\fR\|(3). .PP Web-References: .PP .Vb 3 \& Perl: perl(1), http://www.perl.com/ \& ePerl: eperl(1), http://www.engelschall.com/sw/eperl/ \& Apache: httpd(8), http://www.apache.org/ .Ve .rn }` '' .IX Title "EPERL 1" .IX Name "ePerl - Embedded Perl 5 Language" .IX Header "NAME" .IX Header "VERSION" .IX Header "SYNOPSIS" .IX Header "DESCRIPTION" .IX Subsection "Abstract" .IX Subsection "Introduction" .IX Subsection "Intention" .IX Subsection "Embedded Perl Syntax" .IX Item "\fI1. Delimiters are always discarded.\fR" .IX Item "\fI2. Generated content has to go to \f(CWSTDOUT\fR.\fR" .IX Item "\fI3. Generated content on \f(CWSTDERR\fR always leads to an error.\fR" .IX Item "\fI4. Last semicolon.\fR" .IX Item "\fI5. Shorthand for \f(CWprint\fR\-only blocks.\fR" .IX Item "\fI6. Special EndOfLine discard command for ePerl blocks.\fR" .IX Item "\fI7. Restrictions in parsing.\fR" .IX Item "\fI8. \s-1HTML\s0 entity conversion.\fR" .IX Subsection "Runtime Modes" .IX Item "\fIStand-alone Unix filter mode\fR" .IX Item "\fI\s-1CGI/1\s0.1 compliant interface mode\fR" .IX Item "\fI\s-1NPH\s0\-\s-1CGI/1\s0.1 compliant interface mode\fR" .IX Subsection "Security" .IX Subsection "ePerl Preprocessor" .IX Item "\f(CW#include path\fR " .IX Item "\f(CW#sinclude path\fR " .IX Item "\f(CW#if expr\fR, \f(CW#elsif expr\fR, \f(CW#else\fR, \f(CW#endif\fR" .IX Item "\f(CW#c\fR" .IX Subsection "Provided Functionality" .IX Header "OPTIONS" .IX Item "\fB\-d\fR \fIname\fR=\fIvalue\fR" .IX Item "\fB\-D\fR \fIname\fR=\fIvalue\fR" .IX Item "\fB\-B\fR \fIbegin_delimiter\fR" .IX Item "\fB\-E\fR \fIend_delimiter\fR" .IX Item "\fB\-i\fR" .IX Item "\fB\-m\fR \fImode\fR" .IX Item "\fB\-o\fR \fIoutputfile\fR" .IX Item "\fB\-k\fR" .IX Item "\fB\-x\fR" .IX Item "\fB\-I\fR \fIdirectory\fR" .IX Item "\fB\-P\fR" .IX Item "\fB\-C\fR" .IX Item "\fB\-L\fR" .IX Item "\fB\-T\fR" .IX Item "\fB\-w\fR" .IX Item "\fB\-c\fR" .IX Item "\fB\-r\fR" .IX Item "\fB\-l\fR" .IX Item "\fB\-v\fR" .IX Item "\fB\-V\fR" .IX Header "ENVIRONMENT" .IX Subsection "Used Variables" .IX Item "\f(CWPATH_TRANSLATED\fR" .IX Subsection "Provided Variables" .IX Item "\f(CWSCRIPT_SRC_PATH\fR" .IX Item "\f(CWSCRIPT_SRC_PATH_DIR\fR" .IX Item "\f(CWSCRIPT_SRC_PATH_FILE\fR" .IX Item "\f(CWSCRIPT_SRC_URL\fR" .IX Item "\f(CWSCRIPT_SRC_URL_DIR\fR" .IX Item "\f(CWSCRIPT_SRC_URL_FILE\fR" .IX Item "\f(CWSCRIPT_SRC_SIZE\fR" .IX Item "\f(CWSCRIPT_SRC_MODIFIED\fR" .IX Item "\f(CWSCRIPT_SRC_MODIFIED_CTIME\fR" .IX Item "\f(CWSCRIPT_SRC_MODIFIED_ISOTIME\fR" .IX Item "\f(CWSCRIPT_SRC_OWNER\fR" .IX Item "\f(CWVERSION_INTERPRETER\fR" .IX Item "\f(CWVERSION_LANGUAGE\fR" .IX Subsection "Provided Built-In Images" .IX Item "\f(CWlogo.gif\fR" .IX Item "\f(CWpowered.gif\fR" .IX Header "AUTHOR" .IX Header "SEEALSO" eperl-2.2.14/eperl.pod100664 1750 1750 101576 6434011574 123000ustar rseen## ## ____ _ ## ___| _ \ ___ _ __| | ## / _ \ |_) / _ \ '__| | ## | __/ __/ __/ | | | ## \___|_| \___|_| |_| ## ## ePerl -- Embedded Perl 5 Language ## ## ePerl interprets an ASCII file bristled with Perl 5 program ## statements by evaluating the Perl 5 code while passing through ## the plain ASCII data. It can operate in various ways: As a ## stand-alone Unix filter or integrated Perl 5 module for general ## file generation tasks and as a powerful Webserver scripting ## language for dynamic HTML page programming. ## ## ====================================================================== ## ## Copyright (c) 1996,1997 Ralf S. Engelschall, All rights reserved. ## ## This program is free software; it may be redistributed and/or modified ## only under the terms of either the Artistic License or the GNU General ## Public License, which may be found in the ePerl source distribution. ## Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ## a built-in copy of both license files. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ## Artistic License or the GNU General Public License for more details. ## ## ====================================================================== ## ## eperl.pod -- ePerl Documentation in Plain Old Document (POD) Format ## =head1 NAME ePerl - Embedded Perl 5 Language =head1 VERSION @V@ =head1 SYNOPSIS B [B<-d> I=I] [B<-D> I=I] [B<-B> I] [B<-E> I] [B<-i>] [B<-m> I] [B<-o> I] [B<-k>] [B<-I> I] [B<-P>] [B<-C>] [B<-L>] [B<-x>] [B<-T>] [B<-w>] [B<-c>] [I] B [B<-r>] [B<-l>] [B<-v>] [B<-V>] =head1 DESCRIPTION =head2 Abstract ePerl interprets an ASCII file bristled with Perl 5 program statements by evaluating the Perl 5 code while passing through the plain ASCII data. It can operate in various ways: As a stand-alone Unix filter or integrated Perl 5 module for general file generation tasks and as a powerful Webserver scripting language for dynamic HTML page programming. =head2 Introduction The B program is the I interpreter. This really is a full-featured Perl 5 interpreter, but with a different calling environment and source file layout than the default Perl interpreter (usually the executable B or B on most systems). It is designed for general ASCII file generation with the philosophy of I the Perl 5 program code into the ASCII data instead of the usual way where you embed the ASCII data into a Perl 5 program (usually by quoting the data and using them via C statements). So, instead of writing a plain Perl script like #!/path/to/perl print "foo bar\n"; print "baz quux\n"; for ($i = 0; $i < 10; $i++) { print "foo #${i}\n"; } print "foo bar\n"; print "baz quux\n"; you can write it now as an ePerl script: #!/path/to/eperl foo bar baz quux <: for ($i = 0; $i < 10; $i++) { print "foo #${i}\n"; } :> foo bar baz quux Although the ePerl variant has a different source file layout, the semantic is the same, i.e. both scripts create exactly the same resulting data on C. =head2 Intention ePerl is simply a glue code which combines the programming power of the Perl 5 interpreter library with a tricky embedding technique. The embedding trick is this: it converts the source file into a valid Perl script which then gets I evaluated by only one internal instance of the Perl 5 interpreter. To achieve this, ePerl translates all plain code into (escaped) Perl 5 strings placed into F constructs while passing through all embedded native Perl 5 code. As you can see, ePerl itself does exactly the same internally, a silly programmer had to do when writing a plain Perl generation script. Due to the nature of such bristled code, ePerl is really the better attempt when the generated ASCII data contains really more static as dynamic data. Or in other words: I Do not use it when generating pure dynamic data. There it brings no advantage to the ordinary program code of a plain Perl script. So, the static part should be at least 60% or the advantage becomes a disadvantage. ePerl in its origin was actually designed for an extreme situation: as a webserver scripting-language for on-the-fly HTML page generation. Here you have the typical case that usually 90% of the data consists of pure static HTML tags and plain ASCII while just the remaining 10% are programming constructs which dynamically generate more markup code. This is the reason why ePerl beside its standard Unix filtering runtime-mode also supports the CGI/1.1 and NPH-CGI/1.1 interfaces. =head2 Embedded Perl Syntax Practically you can put any valid Perl constructs inside the ePerl blocks the used Perl 5 interpreter library can evaluate. But there are some important points you should always remember and never forget when using ePerl: =over 4 =item I<1. Delimiters are always discarded.> Trivially to say, but should be mentioned at least once. The ePerl block delimiters are always discarded and are only necessary for ePerl to recognize the embedded Perl constructs. They are never passed to the final output. =item I<2. Generated content has to go to C.> Although you can define subroutines, calculate some data, etc. inside ePerl blocks only data which is explicitly written to the C filehandle is expanded. In other words: When an ePerl block does not generate content on C, it is entirely replaced by an empty string in the final output. But when content is generated it is put at the point of the ePerl block in the final output. Usually contents is generated via pure C constructs which implicitly use C when no filehandle is given. =item I<3. Generated content on C always leads to an error.> Whenever content is generated on the C filehandle, ePerl displays an error (including the STDERR content). Use this to exit on errors while passing errors from ePerl blocks to the calling environment. =item I<4. Last semicolon.> Because of the following point 6 (see below) and the fact that most of the users don't have the internal ePerl block translations in mind, ePerl is smart about the last semicolon. Usually every ePerl block has to end with the semicolon of the last command. <: cmd; ...; cmd; :> But when the last semicolon is missing it is automatically added by ePerl, i.e. <: cmd; ...; cmd :> is also correct syntax. But sometimes it is necessary to force ePerl I to add the semicolon. Then you can add a ``C<_>'' (underscore) as the last non-whitespace character in the block to force ePerl to leave the final semicolon. Use this for constructs like the following <: if (...) { _:> foo <: } else { _:> bar <: } :> where you want to spread a Perl directive over more ePerl blocks. =item I<5. Shorthand for C-only blocks.> Because most of the time ePerl is used just to interpolate variables, e.g. <: print $VARIABLE; :> it is useful to provide a shortcut for this kind of constructs. So ePerl provides a shortcut via the character '='. When it immediately (no whitespaces allowed here) follows the begin delimiter of an ePerl block a C statement is implicitly generated, i.e. the above block is equivalent to <:=$VARIABLE:> Notice that the semicolon was also removed here, because it gets automatically added (see above). =item I<6. Special EndOfLine discard command for ePerl blocks.> ePerl provides a special discard command named ``C'' which discards all data up-to and including the following newline character when directly followed an end block delimiter. Usually when you write foo <: $x = 1; :> quux the result is foo quux because ePerl always preserves code around ePerl blocks, even just newlines. But when you write foo <: $x = 1; :>// quux the result is foo quux because the ``C'' deleted all stuff to the end of the line, I the newline. =item I<7. Restrictions in parsing.> Every program has its restrictions, ePerl too. Its handicap is that Perl is not only a rich language, it is a horrible one according to parsing its constructs. Perhaps you know the phrase ,,Only F can parse I''. Think about it. The implication of this is that ePerl never tries to parse the ePerl blocks itself. It entirely relies on the Perl interpreter library, because it is the only instance which can do this without errors. But the problem is that ePerl at least has to recognize the begin and end positions of those ePerl blocks. There are two ways: It can either look for the end delimiter while parsing but at least recognize quoted strings (where the end delimiter gets treated as pure data). Or it can just move forward to the next end delimiter and say that it have not occur inside Perl constructs. In ePerl 2.0 the second one was used, while in ePerl 2.1 the first one was taken because a lot of users wanted it this way while using bad end delimiters like ``C>''. But actually the author has again revised its opinion and decided to finally use the second approach which is used since ePerl 2.2 now. Because while the first one allows more trivial delimiters (which itself is not a really good idea), it fails when constructs like ``C'' etc. are used inside ePerl blocks. And it is easier to escape end delimiters inside Perl constructs (for instance via backslashes in quoted strings) than rewrite complex Perl constructs to use even number of quotes. So, whenever your end delimiter also occurs inside Perl constructs you have to escape it in any way. =item I<8. HTML entity conversion.> Because one of ePerl's usage is as a server-side scripting-language for HTML pages, there is a common problem in conjunction with HTML editors. They cannot know ePerl blocks, so when you enter those blocks inside the editors they usually encode some characters with the corresponding HTML entities. The problem is that this encoding leads to invalid Perl code. ePerl provides the option B<-C> for decoding these entities which is automatically turned on in CGI modes. See description below under option B<-C> for more details. =back =head2 Runtime Modes ePerl can operate in three different runtime modes: =over 4 =item I This is the default operation mode when used as a generation tool from the Unix shell or as a batch-processing tool from within other programs or scripts: $ eperl [options] - < inputfile > outputfile $ eperl [options] inputfile > outputfile $ eperl [options] -o outputfile - < inputfile $ eperl [options] -o outputfile inputfile As you can see, ePerl can be used in any combination of STDIO and external files. Additionally there are two interesting variants of using this mode. First you can use ePerl in conjunction with the Unix I magic technique to implicitly select it as the interpreter for your script similar to the way you are used to with the plain Perl interpreter: #!/path/to/eperl [options] foo <: print "bar"; :> quux Second, you can use ePerl in conjunction with the Bourne-Shell I technique from within you shell scripts: #!/bin/sh ... eperl [options] - < quux EOS ... And finally you can use ePerl directly from within Perl programs by the use of the Parse::ePerl(3) package (assuming that you have installed this also; see file F inside the ePerl distribution for more details): #!/path/to/perl ... use Parse::ePerl; ... $script = < quux EOT ... $result = Parse::ePerl::Expand({ Script => $script, Result => \$result, }); ... print $result; ... See Parse::ePerl(3) for more details. =item I This is the runtime mode where ePerl uses the CGI/1.1 interface of a webserver when used as a I on the Web. ePerl enters this mode automatically when the CGI/1.1 environment variable C is set and its or the scripts filename does I begin with the NPH prefix ``F''. In this runtime mode it prefixes the resulting data with HTTP/1.0 (default) or HTTP/1.1 (if identified by the webserver) compliant response header lines. ePerl also recognizes HTTP header lines at the beginning of the scripts generated data, i.e. for instance you can generate your own HTTP headers like ... But notice that while you can output arbitrary headers, most webservers restrict the headers which are accepted via the CGI/1.1 interface. Usually you can provide only a few specific HTTP headers like C or C. If you need more control you have to use the NPH-CGI/1.1 interface mode. Additionally ePerl provides a useful feature in this mode: It can switch its UID/GID to the owner of the script if it runs as a Unix I program (see below under L and the option ``u+s'' of chmod(1)). There are two commonly known ways of using this CGI/1.1 interface mode on the Web. First, you can use it to explicitly transform plain HTML files into CGI/1.1 scripts via the I technique (see above). For an Apache webserver just put the following line as the first line of the file: #!/path/to/eperl -mc Then rename the script from F to F and set its execution bit via $ mv file.html file.cgi $ chmod a+rx file.cgi Now make sure that Apache accepts F as a CGI program by enabling CGI support for the directory where F resides. For this add the line Options +ExecCGI to the F<.htaccess> file in this directory. Finally make sure that Apache really recognizes the extension F<.cgi>. Perhaps you additionally have to add the following line to your F file: AddHandler cgi-script .cgi Now you can use F instead of F and make advantage of the achieved programming capability by bristling F with your Perl blocks (or the transformation into a CGI script would be useless). Alternatively (or even additionally) a webmaster can enable ePerl support in a more seemless way by configuring ePerl as a real implicit server-side scripting language. This is done by assigning a MIME-type to the various valid ePerl file extensions and forcing all files with this MIME-type to be internally processed via the ePerl interpreter. You can accomplish this for Apache by adding the following to your F file AddType application/x-httpd-eperl .phtml .eperl .epl Action application/x-httpd-eperl /internal/cgi/eperl ScriptAlias /internal/cgi /path/to/apache/cgi-bin and creating a copy of the F program in your CGI-directory: $ cp -p /path/to/eperl /path/to/apache/cgi-bin/eperl Now all files with the extensions F<.phtml>, F<.eperl> and F<.epl> are automatically processed by the ePerl interpreter. There is no need for a I line or any locally enabled CGI mode. One final hint: When you want to test your scripts offline, just run them with forced CGI/1.1 mode from your shell. But make sure you prepare all environment variables your script depends on, e.g. C or C. $ export QUERY_STRING="key1=value1&key2=value2" $ eperl -mc file.phtml =item I This runtime mode is a special variant of the CGI/1.1 interface mode, because most webservers (e.g. Apache) provide it for special purposes. It is known as I (NPH) CGI/1.1 mode and is usually used by the webserver when the filename of the CGI program is prefixed with ``C''. In this mode the webserver does no processing on the HTTP response headers and no buffering of the resulting data, i.e. the CGI program actually has to provide a complete HTTP response itself. The advantage is that the program can generate arbitrary HTTP headers or MIME-encoded multi-block messages. So, above we have renamed the file to F which restricted us a little bit. When we alternatively rename F to F and force the NPH-CGI/1.1 interface mode via option B<-mn> then this file becomes a NPH-CGI/1.1 compliant program under Apache and other webservers. Now our script can provide its own HTTP response (it need not, because when absent ePerl provides a default one for it). #!/path/to/bin/eperl -mn ... As you expect this can be also used with the implicit Server-Side Scripting Language technique. Put AddType application/x-httpd-eperl .phtml .eperl .epl Action application/x-httpd-eperl /internal/cgi/nph-eperl ScriptAlias /internal/cgi /path/to/apache/cgi-bin into your F and run the command $ cp -p /path/to/eperl /path/to/apache/cgi-bin/nph-eperl from your shell. I. =back =head2 Security When you are installing ePerl as a CGI/1.1 or NPH-CGI/1.1 compliant program (see above for detailed description of these modes) via $ cp -p /path/to/eperl /path/to/apache/cgi-bin/eperl $ chown root /path/to/apache/cgi-bin/eperl $ chmod u+s /path/to/apache/cgi-bin/eperl or $ cp -p /path/to/eperl /path/to/apache/cgi-bin/nph-eperl $ chown root /path/to/apache/cgi-bin/nph-eperl $ chmod u+s /path/to/apache/cgi-bin/nph-eperl i.e. with I bit enabled for the B user, ePerl can switch to the UID/GID of the I. Although this is a very useful feature for script programmers (because one no longer need to make auxiliary files world-readable and temporary files world-writable!), it can be to risky for you when you are paranoid about security of SetUID programs. If so just don't install ePerl with enabled SetUID bit! This is the reason why ePerl is per default only installed as a Stand-Alone Unix filter which never needs this feature. For those of us who decided that this feature is essential for them ePerl tries really hard to make it secure. The following steps have to be successfully passed before ePerl actually switches its UID/GID (in this order): 1. The script has to match the following extensions: .html, .phtml, .ephtml, .epl, .pl, .cgi 2. The UID of the calling process has to be a valid UID, i.e. it has to be found in the systems password file 3. The UID of the calling process has to match the following users: root, nobody 4. The UID of the script owner has to be a valid UID, i.e. it has to be found in the systems password file 5. The GID of the script group has to be a valid GID, i.e. it has to be found in the systems group file 6. The script has to stay below or in the owners homedir I. Additionally (if C was defined as C in F - not per default defined this way!) ePerl can totally stop processing and display its error page. This is for the really paranoid webmasters. Per default when any step failed the UID/GID switching is just disabled, but ePerl goes on with processing. Alternatively you can disable some steps at compile time. See F. I =head2 ePerl Preprocessor ePerl provides an own preprocessor similar to F in style which is either enabled manually via option B<-P> or automatically when ePerl runs in (NPH-)CGI mode. The following directives are supported: =over 4 =item C<#include path> This directive is an include directive which can be used to include really any stuff, but was actually designed to be used to include other ePerl source files. The I can be either a relative or absolute path for the local filesystem or a fully qualified HTTP URL. In case of the absolute path the file is directly accessed on the filesystem, while the relative path is first searched in the current working directory and then in all directories specified via option B<-I>. In the third case (HTTP URL) the file is retrieves via a HTTP/1.0 request on the network. Here HTTP redirects (response codes 301 and 302) are supported, too. Notice: While ePerl strictly preserves the line numbers when translating the bristled ePerl format to plain Perl format, the ePerl preprocessor can't do this (because its a B
processor which expands) for this directive.  So,
whenever you use C<#include>, remember that line numbers in error messages are
wrong.

Also notice one important security aspect: Because you can include any stuff
as it is provided with this directive, use it only for stuff which is under
your direct control. Don't use this directive to include foreign data, at
least not from external webservers. For instance say you have a ePerl page
with C<#include http://www.foreigner.com/nice-page.html> and at the next
request of this page your filesystem is lost! Why? Because the foreigner
recognizes that you include his page and are using ePerl and just put a simple
``C?  system("rm -rf /"); !E>'' in his page. Think about it.
I.
Instead always use C<#sinclude> for such situations.

=item C<#sinclude path> 

This is the secure variant of C<#include> where after reading the data from
I all ePerl begin and end delimiters are removed. So risky ePerl blocks
lost their meaning and are converted to plain text. Always use this directive
when you want to include data which is not under your own control.

=item C<#if expr>, C<#elsif expr>, C<#else>, C<#endif>

These implement a CPP-style C<#if-[#else-]#endif> construct, but with a Perl
semantic. While the other directives are real preprocessor commands which are
evaluated at the preprocessing step, this construct is actually just
transformed into a low-level ePerl construct, so it is B actually
evaluated at the preprocessing step. It is just a handy shortcut for the
following (where BD is the currently used begin delimiter and ED the end
delimiter):

  ``#if expr''    ->  ``BD if (expr) { _ ED//''
  ``#elsif expr'' ->  ``BD } elsif (expr) { _ ED//''
  ``#else''       ->  ``BD } else { _ ED//''
  ``#endif''      ->  ``BD } _ ED//''

The advantage of this unusual aproach is that the if-condition really can be
any valid Perl expression which provides maximum flexibility. The disadvantage
is that you cannot use the if-construct to make real preprocessing decisions.
As you can see, the design goal was just to provide a shorthand for the more
complicated Perl constructs.

=item C<#c>

This is the comment directive which just discards all data up to and including
the newline character. Use this one to comment out any stuff, even other
preprocessor directives.

=back

=head2 Provided Functionality

Up to know you've understand that ePerl provides a nice facility to embed Perl
code into any ASCII data. But now the typical question is: Which Perl code can
be put into these ePerl blocks and does ePerl provide any special
functionality inside these ePerl blocks?

The answers are: First, you can put really I Perl code into the ePerl
blocks which are valid to the Perl interpreter ePerl was linked with. Second,
ePerl does I provide any special functionality inside these ePerl blocks,
because Perl is already sophisticated enough ;-)

The implication of this is: Because you can use any valid Perl code you can
make use of all available Perl 5 modules, even those ones which use shared
objects (because ePerl I a Perl interpreter, including DynaLoader
support). So, browse to the Comprehensive Perl Archive Network (CPAN) via
http://www.perl.com/perl/CPAN and grab your favorite packages which can make
your life easier (both from within plain Perl scripts I ePerl scripts)
and just use the construct ``C'' in any ePerl block to use them
from within ePerl. 

When using ePerl as a Server-Side-Scripting-Language I really recommend you to
install at least the packages F (currently vers.  2.36),
F (1.40), F (1.0505) and F (5.08).  When you
want to generate on-the-fly images as well, I recommend you to additionally
install at least F (1.14) and F (2.3). The ePerl interpreter
in conjunction with these really sophisticated Perl 5 modules will provide you
with maximum flexibility and functionality. In other words: I.

=head1 OPTIONS

=over 4

=item B<-d> I=I

Sets a Perl variable in the package C
which can be referenced via C<$name> or more explicitly via C<$main::name>. The command eperl -d name=value .. is actually equivalent to having at the beginning of I. This option can occur more than once. =item B<-D> I=I Sets a environment variable which can be referenced via C<$ENV{'variable'}> inside the Perl blocks. The command eperl -D name=value .. is actually equivalent to export name=value; eperl ... but the advantage of this option is that it doesn't manipulate the callers environment. This option can occur more than once. =item B<-B> I Sets the Perl block begin delimiter string. Use this in conjunction with C<-E> to set different delimiters when using ePerl as an offline HTML creation-language while still using it as an online HTML scripting-language. Default delimiters are C?> and C> for CGI modes and C:> and C<:E> for stand-alone Unix filtering mode. There are a lot of possible variations you could choose: "C:>" and "C<:E>" (the default ePerl stand-alone filtering mode delimiters), "C?>" and "C>" (the default ePerl CGI interface mode delimiters), "Cscript language='ePerl'E>" and "C/scriptE>" (standard HTML scripting language style), "Cscript type="text/eperl"E>" and "C/scriptE>" (forthcoming HTML3.2+ aka Cougar style), "CeperlE>" and "C/eperlE>" (HTML-like style), "C!--#eperl code='>" and "C<' --E>" (NeoScript and SSI style) or even "C?>" and "C>" (PHP/FI style; but this no longer recommended because it can lead to parsing problems. Should be used only for backward compatibility to old ePerl versions 1.x). The begin and end delimiters are searched case-insensitive. =item B<-E> I Sets the Perl block end delimiter string. See also option B<-B>. =item B<-i> Forces the begin and end delimiters to be searched case-insensitive. Use this when you are using delimiters like ``CePerlE>...C/ePerlE>'' or other more textual ones. =item B<-m> I This forces ePerl to act in a specific runtime mode. See above for a detailed description of the three possible modes: Stand-alone filter (I=C, i.e. option B<-mf>), CGI/1.1 interface mode (I=C, i.e. option B<-mc>) or the NPH-CGI/1.1 interface mode (I=C, i.e. option B<-mn>). =item B<-o> I Forces the output to be written to F instead of F. Use this option when using ePerl as a filter. The outputfile ``F<->'' sets F as the output handle explicitly. Notice that this file is relative to the source file directory when the runtime mode is forced to CGI or NPH-CGI. =item B<-k> Forces ePerl to keep the current working directory from where it was started. Per default ePerl will change to the directory where the file to be executed stays. This option is useful if you use ePerl as an offline filter on a temporary file. =item B<-x> This sets debug mode where ePerl outputs the internally created Perl script to the console (F) before executing it. Only for debugging problems with the inputfile conversion. =item B<-I> I Specify a directory which is both used for C<#include> and C<#sinclude> directives of the ePerl preprocessor and added to C<@INC> under runtime. This option can occur more than once. =item B<-P> Manually enables the special ePerl Preprocessor (see above). This option is enabled for all CGI modes automatically. =item B<-C> This enables the HTML entity conversion for ePerl blocks. This option is automatically forced in CGI modes. The solved problem here is the following: When you use ePerl as a Server-Side-Scripting-Language for HTML pages and you edit your ePerl source files via a HTML editor, the chance is high that your editor translates some entered characters to HTML entities, for instance ``C>'' to ``C<<>''. This leads to invalid Perl code inside ePerl blocks, because the HTML editor has no knowledge about ePerl blocks. Using this option the ePerl parser automatically converts all entities found inside ePerl blocks back to plain characters, so the Perl interpreter again receives valid code blocks. =item B<-L> This enables the line continuation character ``C<\>'' (backslash) outside ePerl blocks. With this option you can spread oneline-data over more lines. But use with care: This option changes your data (outside ePerl blocks). Usually ePerl really pass through all surrounding data as raw data. With this option the newlines become new semantics. =item B<-T> This enabled Perl's I where the Perl interpreter takes special precautions called taint checks to prevent both obvious and subtle traps. See perlsec(1) for more details. =item B<-w> This enables Warnings where the Perl interpreter produces some lovely diagnostics. See perldiag(1) for more details. =item B<-c> This runs a pure syntax check which is similar to ``C''. =item B<-r> This prints the internal ePerl README file to the console. =item B<-l> This prints the internal ePerl LICENSE file to the console. =item B<-v> This prints ePerl version information to the console. =item B<-V> Same as option B<-v> but additionally shows the Perl compilation parameters. =back =head1 ENVIRONMENT =head2 Used Variables =over 4 =item C This CGI/1.1 variable is used to determine the source file when ePerl operates as a NPH-CGI/1.1 program under the environment of a webserver. =back =head2 Provided Variables =over 4 =item C The absolute pathname of the script. Use this when you want to directly access the script from within itself, for instance to do C and other calls. =item C The directory part of C. Use this one when you want to directly access other files residing in the same directory as the script, for instance to read config files, etc. =item C The filename part of C. Use this one when you need the name of the script, for instance for relative self-references through URLs. =item C The fully-qualified URL of the script. Use this when you need a URL for self-reference. =item C The directory part of C. Use this one when you want to directly access other files residing in the same directory as the script via the Web, for instance to reference images, etc. =item C The filename part of C. Use this one when you need the name of the script, for instance for relative self-references through URLs. Actually the same as C, but provided for consistency. =item C The filesize of the script, in bytes. =item C The last modification time of the script, in seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time. =item C The last modification time of the script, in ctime(3) format (``WDAY MMM DD HH:MM:SS YYYY\n''). =item C The last modification time of the script, in ISO format (``DD-MM-YYYY HH:MM''). =item C The username of the script owner. =item C The ePerl identification string. =item C The identification string of the used Perl interpreter library. =back =head2 Provided Built-In Images The following built-in images can be accessed via URL CIC<.gif>: =over 4 =item C The standard ePerl logo. Please do not include this one on your website. =item C The ``I'' logo. Feel free to use this on your website. =back =head1 AUTHOR Ralf S. Engelschall rse@engelschall.com www.engelschall.com =head1 SEEALSO Parse::ePerl(3), Apache::ePerl(3). Web-References: Perl: perl(1), http://www.perl.com/ ePerl: eperl(1), http://www.engelschall.com/sw/eperl/ Apache: httpd(8), http://www.apache.org/ =cut ##EOF## eperl-2.2.14/eperl_config.c100664 1750 1750 3354 6551343663 132270ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_global.c -- ePerl configuration stuff */ #include "eperl_config.h" /* some systems (like Ultrix) don't not have a strdup() function :-( */ #ifndef HAVE_STRDUP char *strdup(const char *str) { size_t len; char *copy; len = strlen(str) + 1; if ((copy = malloc(len)) == NULL) return (NULL); memcpy(copy, str, len); return (copy); } #endif /*EOF*/ eperl-2.2.14/eperl_config.h100664 1750 1750 15206 6551344036 132460ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_config.h -- ePerl configuration header */ #ifndef EPERL_CONFIG_H #define EPERL_CONFIG_H 1 /* ** ** Headers from GNU autoconf ** */ #include "config_ac.h" #include "config_sc.h" /* ** ** Headers from the Unix system ** */ #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #else #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #else #include #endif #ifdef HAVE_CTYPE_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef HAVE_SIGNAL_H #include #endif #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_GRP_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_NETDB_H #include #endif /* ** ** Missing Prototypes. ** They are needed to get a clean compile with gcc -Wall. ** */ /* * Believe it or not, these do have to be declared, at least on SunOS, * because they aren't mentioned in the relevant system headers. * Sun Quality Software. Gotta love it. */ #ifdef SUNOS_LIB_PROTOTYPES int getopt (int, char **, char *); int strcasecmp (char *, char *); int strncasecmp (char *, char *, int); int toupper(int); int tolower(int); int printf (char *, ...); int fprintf (FILE *, char *, ...); int fputs (char *, FILE *); int fread (char *, int, int, FILE *); int fwrite (char *, int, int, FILE *); int fflush (FILE *); int fclose (FILE *); int ungetc (int, FILE *); int _filbuf (FILE *); /* !!! */ int _flsbuf (unsigned char, FILE *); /* !!! */ int sscanf (char *, char *, ...); void setbuf (FILE *, char *); void perror (char *); time_t time (time_t *); int strftime (char *, int, char *, struct tm *); int initgroups (char *, int); int wait3 (int *, int, void*); /* Close enough for us... */ int lstat (const char *, struct stat *); int stat (const char *, struct stat *); int flock (int, int); #ifndef NO_KILLPG int killpg(int, int); #endif int socket (int, int, int); int setsockopt (int, int, int, const char*, int); int listen (int, int); int bind (int, struct sockaddr *, int); int connect (int, struct sockaddr *, int); int accept (int, struct sockaddr *, int *); int shutdown (int, int); int getsockname (int s, struct sockaddr *name, int *namelen); int getpeername (int s, struct sockaddr *name, int *namelen); int gethostname (char *name, int namelen); void syslog (int, char *, ...); char *mktemp (char *); long vfprintf (FILE *, char *, va_list); char *vsprintf (char *, char *, va_list); #endif /* * * We can provide own functions... */ #ifndef HAVE_STRDUP char *strdup(const char *str); #endif /* ** ** OS Return Values ** */ #define EX__BASE 64 /* base value for error messages */ #define EX_USAGE 64 /* command line usage error */ #define EX_DATAERR 65 /* data format error */ #define EX_NOINPUT 66 /* cannot open input */ #define EX_NOUSER 67 /* addressee unknown */ #define EX_NOHOST 68 /* host name unknown */ #define EX_UNAVAILABLE 69 /* service unavailable */ #define EX_SOFTWARE 70 /* internal software error */ #define EX_OSERR 71 /* system error (e.g., can't fork) */ #define EX_OSFILE 72 /* critical OS file missing */ #define EX_CANTCREAT 73 /* can't create (user) output file */ #define EX_IOERR 74 /* input/output error */ #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ #define EX_PROTOCOL 76 /* remote error in protocol */ #define EX_NOPERM 77 /* permission denied */ #define EX_CONFIG 78 /* configuration error */ #define EX__MAX 78 /* maximum listed value */ /* OK and FAIL exits should ALWAYS exists */ #ifndef EX_OK #define EX_OK 0 #endif #ifndef EX_FAIL #define EX_FAIL 1 #endif /* ** ** ASCII Control Codes ** */ #define ASC_NUL '\x00' #define ASC_SOH '\x01' #define ASC_STX '\x02' #define ASC_ETX '\x03' #define ASC_EOT '\x04' #define ASC_ENQ '\x05' #define ASC_ACK '\x06' #define ASC_BEL '\x07' #define ASC_BS '\x08' #define ASC_HT '\x09' #define ASC_LF '\x0a' #define ASC_VT '\x0b' #define ASC_FF '\x0c' #define ASC_CR '\x0d' #define ASC_SO '\x0e' #define ASC_SI '\x0f' #define ASC_DLE '\x10' #define ASC_DC1 '\x11' #define ASC_DC2 '\x12' #define ASC_DC3 '\x13' #define ASC_DC4 '\x14' #define ASC_NAK '\x15' #define ASC_SYN '\x16' #define ASC_ETB '\x17' #define ASC_CAN '\x18' #define ASC_EM '\x19' #define ASC_SUB '\x1a' #define ASC_ESC '\x1b' #define ASC_FS '\x1c' #define ASC_GS '\x1d' #define ASC_RS '\x1e' #define ASC_US '\x1f' #define ASC_SP '\x20' #define ASC_DEL '\x7f' #define NUL ASC_NUL #define ASC_QUOTE '\x22' #define ASC_NL ASC_LF #define NL ASC_NL /* ** ** NULL ** */ #ifndef NULL #define NULL (void *)0 #endif /* ** ** Boolean Values -- defined in a general and portable way ** */ /* typedef enum { false = FALSE, true = TRUE } bool; */ #undef TRUE #define TRUE (0 || !(0)) #undef FALSE #define FALSE (!(TRUE)) #endif /* EPERL_CONFIG_H */ /*EOF*/ eperl-2.2.14/eperl_debug.c100664 1750 1750 3600 6551343671 130410ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_debug.c -- ePerl debugging functions */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_proto.h" int fDebug = FALSE; char *cpDebugFile = "eperl.debug"; void Debug(char *str, ...) { #ifdef DEBUG_ENABLED va_list ap; char buf[1024]; FILE *fp; va_start(ap, str); if (fDebug) { if ((fp = fopen(cpDebugFile, "a")) != NULL) { vsprintf(buf, str, ap); fprintf(fp, "%s", buf); fclose(fp); } } va_end(ap); return; #endif } /*EOF*/ eperl-2.2.14/eperl_getopt.c100664 1750 1750 106700 6551343674 133250ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_getopt.c -- GNU getopt() function */ /* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO #define _NO_PROTO #endif #include "eperl_config.h" #include "eperl_global.h" #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include #include #endif /* GNU C library. */ #ifdef VMS #include #if HAVE_STRING_H - 0 #include #endif #endif #if defined (WIN32) && !defined (__CYGWIN32__) /* It's not Unix, really. See? Capital letters. */ #include #define getpid() GetCurrentProcessId() #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ #ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) #else # define _(msgid) (msgid) #endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "eperl_getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ #include #define my_index strchr #else /* Avoid depending on library functions or files whose names are inconsistent. */ char *getenv (); static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ #if !defined (__STDC__) || !__STDC__ /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); #endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; extern pid_t __libc_pid; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } text_set_element (__libc_subinit, store_args_and_env); # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined (__STDC__) && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); memset (&new_str[nonoption_flags_max_len], '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined (__STDC__) && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else { memcpy (__getopt_nonoption_flags, orig_str, len); memset (&__getopt_nonoption_flags[len], '\0', nonoption_flags_max_len - len); } } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ /* XX getopt1.c XX */ /* XX getopt1.c XX */ /* XX getopt1.c XX */ #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ /*EOF*/ eperl-2.2.14/eperl_getopt.h100664 1750 1750 13701 6551344042 132760ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_getopt.h -- GNU getopt() prototypes */ /* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* _GETOPT_H */ eperl-2.2.14/eperl_global.h100664 1750 1750 5021 6557036302 132130ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_global.h -- ePerl global header file */ #ifndef EPERL_GLOBAL_H #define EPERL_GLOBAL_H 1 /* ** ** The ePerl block delimiters ** */ #define BEGIN_DELIMITER_FILTER "<:" #define END_DELIMITER_FILTER ":>" #define BEGIN_DELIMITER_CGI "" /* ** ** The ePerl runtime mode ** */ #define MODE_UNKNOWN 1 #define MODE_FILTER 2 #define MODE_CGI 4 #define MODE_NPHCGI 8 /* ** ** debugging ** */ #ifdef DEBUG_ENABLED #ifdef HAVE_DMALLOC #define DMALLOC_FUNC_CHECK 1 #include #endif #endif /* ** ** CU() -- CleanUp Makro (implemented in a safety way) ** */ #define DECL_EXRC int rc #define EXRC rc #define ZERO 0 #define STMT(stuff) do { stuff } while (ZERO) #define CU(returncode) STMT( rc = returncode; goto CUS; ) #define VCU STMT( goto CUS; ) #define RETURN_WVAL(val) return (val) #define RETURN_EXRC return (rc) #define RETURN_NORC return /* ** Shortcuts for string comparisons */ #define stringEQ(s1,s2) strcmp(s1,s2) == 0 #define stringNE(s1,s2) strcmp(s1,s2) != 0 #define stringEQn(s1,s2,n) strcmp(s1,s2,n) == 0 #define stringNEn(s1,s2,n) strcmp(s1,s2,n) != 0 #endif /* EPERL_GLOBAL_H */ /*EOF*/ eperl-2.2.14/eperl_http.c100664 1750 1750 21603 6557024476 127620ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_http.c -- ePerl HTTP stuff */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_proto.h" /* ** ** print a standard HTTP reponse of header lines ** */ void HTTP_PrintResponseHeaders(char *cpBuf) { char *cp; if ((cp = getenv("SERVER_PROTOCOL")) == NULL) cp = "HTTP/1.0"; printf("%s 200 OK\n", cp); if (!HTTP_HeaderLineExists(cpBuf, "Server")) { if ((cp = getenv("SERVER_SOFTWARE")) == NULL) cp = "unknown-server/0.0"; printf("Server: %s %s Perl/%s\n", cp, ePerl_WebID, AC_perl_vers); } if (!HTTP_HeaderLineExists(cpBuf, "Date")) printf("Date: %s\n", WebTime()); if (!HTTP_HeaderLineExists(cpBuf, "Connection")) printf("Connection: close\n"); return; } /* ** ** strip standard HTTP reponse header lines ** */ void HTTP_StripResponseHeaders(char **cpBuf, int *nBuf) { return; } /* ** ** check if the line is a valid HTTP header line ** */ int HTTP_IsHeaderLine(char *cp1, char *cp2) { char *cp3; char *cp4; char ca[1024]; while (cp1 < cp2 && (*cp1 == '\n' || *cp1 == '\r')) cp1++; while (cp2 > cp1 && (*(cp2-1) == '\n' || *(cp2-1) == '\r')) cp2--; strncpy(ca, cp1, cp2-cp1); ca[cp2-cp1] = NUL; if ((cp3 = strchr(ca, ':')) == NULL) return 0; for (cp4 = ca; cp4 < cp3; cp4++) { if (! ((*cp4 >= 'A' && *cp4 <= 'Z') || (*cp4 >= 'a' && *cp4 <= 'z') || (*cp4 >= '0' && *cp4 <= '9') || (*cp4 == '-' || *cp4 == '_') )) return 0; } return 1; } /* ** ** check if there is a valid HTTP header ** */ int HTTP_HeadersExists(char *cpBuf) { char *cp1; char *cp2; char *cp2a; char *cp3; cp2 = NULL; if ((cp2a = strstr(cpBuf, "\n\n")) != NULL) cp2 = cp2a; if ((cp2a = strstr(cpBuf, "\r\n\r\n")) != NULL && (cp2 == NULL || cp2a < cp2)) cp2 = cp2a; if (cp2 != NULL) { for (cp1 = cpBuf; cp1 < cp2-1; ) { cp3 = strchr(cp1, '\n'); if (!HTTP_IsHeaderLine(cp1, cp3)) return 0; cp1 = cp3+1; } return 1; } return 0; } /* ** ** check if there a particular HTTP headerline exists ** */ int HTTP_HeaderLineExists(char *cpBuf, char *name) { char *cp1; char *cp2; char *cp2a; char *cp3; int n; n = strlen(name); cp2 = NULL; if ((cp2a = strstr(cpBuf, "\n\n")) != NULL) cp2 = cp2a; if ((cp2a = strstr(cpBuf, "\r\n\r\n")) != NULL && (cp2 == NULL || cp2a < cp2)) cp2 = cp2a; if (cp2 != NULL) { for (cp1 = cpBuf; cp1 < cp2-1; ) { cp3 = strchr(cp1, '\n'); if (HTTP_IsHeaderLine(cp1, cp3) && cp3-cp1 > n+1) if (strncasecmp(cp1, name, n) == 0) return 1; cp1 = cp3+1; } return 0; } return 0; } /* ** ** Give back acceptable HTTP time format string ** */ char *WebTime(void) { time_t t; struct tm *tm; char *cp; t = time(&t); tm = localtime(&t); cp = ctime(&t); cp[strlen(cp)-1] = NUL; return cp; } /* ** extracts the host name from an url */ static char *HTTP_HostOfURL(char *url) { static char host[1024]; char *cps; char *cpe; cps = strstr(url, "//"); cps += 2; for (cpe = cps; *cpe != '/' && *cpe != ':' && *cpe != NUL; cpe++) ; strncpy(host, cps, cpe-cps); host[cpe-cps] = NUL; return host; } /* ** extracts the port from an url */ static char *HTTP_PortOfURL(char *url) { static char port[128]; char *cps; char *cpe; cps = strstr(url, "//"); cps += 2; for ( ; *cps != '/' && *cps != ':' && *cps != NUL; cps++) ; if (*cps == ':') { cps++; for (cpe = cps; *cpe != '/' && *cpe != NUL; cpe++) ; strncpy(port, cps, cpe-cps); port[cpe-cps] = NUL; } else strcpy(port, "80"); return port; } /* ** extracts a file name from a url */ static char *HTTP_FileOfURL(char *url) { static char file[2048]; char *cps; cps = strstr(url, "//"); cps = strstr(cps+2, "/"); if (cps == NUL) strcpy(file, "/"); else strcpy(file, cps); return file; } /* ** open an URL as a file descriptor */ FILE *HTTP_openURLasFP(char *url) { struct hostent *he; struct sockaddr_in sar; struct protoent *pe; char cmd[1024]; char buf[1024]; char newurl[8192]; char *host; char *port; char *file; FILE *fp; char *cp; char *cp2; int s; /* parse URL */ host = HTTP_HostOfURL(url); port = HTTP_PortOfURL(url); file = HTTP_FileOfURL(url); /* get the host name */ if ((he = gethostbyname(host)) == NULL) return NULL; /* get TCP protocol information */ if ((pe = getprotobyname("tcp")) == NULL) return NULL; /* open the socket */ if ((s = socket(AF_INET, SOCK_STREAM, pe->p_proto)) == -1) return NULL; /* fill in the socket information */ sar.sin_family = AF_INET; sar.sin_addr.s_addr = *((u_long *)(he->h_addr_list[0])); sar.sin_port = htons(atoi(port)); /* actually connect */ if (connect(s, (struct sockaddr *)&sar, sizeof(sar)) == -1) return NULL; /* form the HTTP/1.0 request */ sprintf(cmd, "GET %s HTTP/1.0\n", file); sprintf(cmd+strlen(cmd), "Host: %s:%s\n", host, port); sprintf(cmd+strlen(cmd), "User-Agent: %s\n", ePerl_WebID); sprintf(cmd+strlen(cmd), "\n"); /* send the request */ write(s, cmd, strlen(cmd)); /* convert the file descriptor to a FILE pointer */ fp = fdopen(s, "r"); /* read the HTTP response line and check for 200 OK response */ if (fgets(buf, sizeof(buf), fp) == NULL) return NULL; if (strncmp(buf, "HTTP/1.", 7) != 0) return NULL; if (buf[7] != '0' && buf[7] != '1') return NULL; for (cp = buf+8; *cp == ' ' || *cp == '\t'; cp++) ; if (strncmp(cp, "200", 3 /* OK */) != 0) { if (strncmp(cp, "301", 3 /* MOVED PERMANENTLY */) != 0 || strncmp(cp, "302", 3 /* MOVED TEMPORARILY */) != 0 ) { /* we try to determine the new URL from the HTTP header 'Location' and restart from the beginning if an URL is found */ newurl[0] = NUL; while (fgets(buf, sizeof(buf), fp) != NULL) { if ((*buf == '\n' && *(buf+1) == NUL) || (*buf == '\n' && *(buf+1) == '\r' && *(buf+2) == NUL) || (*buf == '\r' && *(buf+1) == '\n' && *(buf+2) == NUL)) break; if (strncasecmp(buf, "Location:", 9) == 0) { for (cp = buf+9; *cp == ' ' || *cp == '\t'; cp++) ; for (cp2 = cp; *cp2 != ' ' && *cp2 != '\t' && *cp2 != '\n' && *cp2 != NUL; cp2++) ; *cp2 = NUL; strcpy(newurl, cp); break; } } if (newurl[0] != NUL) return HTTP_openURLasFP(newurl); else return NULL; } return NULL; } /* now read until a blank line, i.e. skip HTTP headers */ while (fgets(buf, sizeof(buf), fp) != NULL) { if ((*buf == '\n' && *(buf+1) == NUL) || (*buf == '\n' && *(buf+1) == '\r' && *(buf+2) == NUL) || (*buf == '\r' && *(buf+1) == '\n' && *(buf+2) == NUL)) break; } /* return the (still open) FILE pointer */ return fp; } /*EOF*/ eperl-2.2.14/eperl_license.c100664 1750 1750 64131 6330402447 134130ustar rseen/* LICENSE.c -- automatically generated by asc2c */ char *ePerl_LICENSE = \ "--File: COPYING-------------------------------------\n"\ " GNU GENERAL PUBLIC LICENSE\n"\ " Version 2, June 1991\n"\ "\n"\ " Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n"\ " 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"\ " Everyone is permitted to copy and distribute verbatim copies\n"\ " of this license document, but changing it is not allowed.\n"\ "\n"\ " Preamble\n"\ "\n"\ " The licenses for most software are designed to take away your\n"\ "freedom to share and change it. By contrast, the GNU General Public\n"\ "License is intended to guarantee your freedom to share and change free\n"\ "software--to make sure the software is free for all its users. This\n"\ "General Public License applies to most of the Free Software\n"\ "Foundation's software and to any other program whose authors commit to\n"\ "using it. (Some other Free Software Foundation software is covered by\n"\ "the GNU Library General Public License instead.) You can apply it to\n"\ "your programs, too.\n"\ "\n"\ " When we speak of free software, we are referring to freedom, not\n"\ "price. Our General Public Licenses are designed to make sure that you\n"\ "have the freedom to distribute copies of free software (and charge for\n"\ "this service if you wish), that you receive source code or can get it\n"\ "if you want it, that you can change the software or use pieces of it\n"\ "in new free programs; and that you know you can do these things.\n"\ "\n"\ " To protect your rights, we need to make restrictions that forbid\n"\ "anyone to deny you these rights or to ask you to surrender the rights.\n"\ "These restrictions translate to certain responsibilities for you if you\n"\ "distribute copies of the software, or if you modify it.\n"\ "\n"\ " For example, if you distribute copies of such a program, whether\n"\ "gratis or for a fee, you must give the recipients all the rights that\n"\ "you have. You must make sure that they, too, receive or can get the\n"\ "source code. And you must show them these terms so they know their\n"\ "rights.\n"\ "\n"\ " We protect your rights with two steps: (1) copyright the software, and\n"\ "(2) offer you this license which gives you legal permission to copy,\n"\ "distribute and/or modify the software.\n"\ "\n"\ " Also, for each author's protection and ours, we want to make certain\n"\ "that everyone understands that there is no warranty for this free\n"\ "software. If the software is modified by someone else and passed on, we\n"\ "want its recipients to know that what they have is not the original, so\n"\ "that any problems introduced by others will not reflect on the original\n"\ "authors' reputations.\n"\ "\n"\ " Finally, any free program is threatened constantly by software\n"\ "patents. We wish to avoid the danger that redistributors of a free\n"\ "program will individually obtain patent licenses, in effect making the\n"\ "program proprietary. To prevent this, we have made it clear that any\n"\ "patent must be licensed for everyone's free use or not licensed at all.\n"\ "\n"\ " The precise terms and conditions for copying, distribution and\n"\ "modification follow.\n"\ " \n"\ " GNU GENERAL PUBLIC LICENSE\n"\ " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n"\ "\n"\ " 0. This License applies to any program or other work which contains\n"\ "a notice placed by the copyright holder saying it may be distributed\n"\ "under the terms of this General Public License. The \"Program\", below,\n"\ "refers to any such program or work, and a \"work based on the Program\"\n"\ "means either the Program or any derivative work under copyright law:\n"\ "that is to say, a work containing the Program or a portion of it,\n"\ "either verbatim or with modifications and/or translated into another\n"\ "language. (Hereinafter, translation is included without limitation in\n"\ "the term \"modification\".) Each licensee is addressed as \"you\".\n"\ "\n"\ "Activities other than copying, distribution and modification are not\n"\ "covered by this License; they are outside its scope. The act of\n"\ "running the Program is not restricted, and the output from the Program\n"\ "is covered only if its contents constitute a work based on the\n"\ "Program (independent of having been made by running the Program).\n"\ "Whether that is true depends on what the Program does.\n"\ "\n"\ " 1. You may copy and distribute verbatim copies of the Program's\n"\ "source code as you receive it, in any medium, provided that you\n"\ "conspicuously and appropriately publish on each copy an appropriate\n"\ "copyright notice and disclaimer of warranty; keep intact all the\n"\ "notices that refer to this License and to the absence of any warranty;\n"\ "and give any other recipients of the Program a copy of this License\n"\ "along with the Program.\n"\ "\n"\ "You may charge a fee for the physical act of transferring a copy, and\n"\ "you may at your option offer warranty protection in exchange for a fee.\n"\ "\n"\ " 2. You may modify your copy or copies of the Program or any portion\n"\ "of it, thus forming a work based on the Program, and copy and\n"\ "distribute such modifications or work under the terms of Section 1\n"\ "above, provided that you also meet all of these conditions:\n"\ "\n"\ " a) You must cause the modified files to carry prominent notices\n"\ " stating that you changed the files and the date of any change.\n"\ "\n"\ " b) You must cause any work that you distribute or publish, that in\n"\ " whole or in part contains or is derived from the Program or any\n"\ " part thereof, to be licensed as a whole at no charge to all third\n"\ " parties under the terms of this License.\n"\ "\n"\ " c) If the modified program normally reads commands interactively\n"\ " when run, you must cause it, when started running for such\n"\ " interactive use in the most ordinary way, to print or display an\n"\ " announcement including an appropriate copyright notice and a\n"\ " notice that there is no warranty (or else, saying that you provide\n"\ " a warranty) and that users may redistribute the program under\n"\ " these conditions, and telling the user how to view a copy of this\n"\ " License. (Exception: if the Program itself is interactive but\n"\ " does not normally print such an announcement, your work based on\n"\ " the Program is not required to print an announcement.)\n"\ " \n"\ "These requirements apply to the modified work as a whole. If\n"\ "identifiable sections of that work are not derived from the Program,\n"\ "and can be reasonably considered independent and separate works in\n"\ "themselves, then this License, and its terms, do not apply to those\n"\ "sections when you distribute them as separate works. But when you\n"\ "distribute the same sections as part of a whole which is a work based\n"\ "on the Program, the distribution of the whole must be on the terms of\n"\ "this License, whose permissions for other licensees extend to the\n"\ "entire whole, and thus to each and every part regardless of who wrote it.\n"\ "\n"\ "Thus, it is not the intent of this section to claim rights or contest\n"\ "your rights to work written entirely by you; rather, the intent is to\n"\ "exercise the right to control the distribution of derivative or\n"\ "collective works based on the Program.\n"\ "\n"\ "In addition, mere aggregation of another work not based on the Program\n"\ "with the Program (or with a work based on the Program) on a volume of\n"\ "a storage or distribution medium does not bring the other work under\n"\ "the scope of this License.\n"\ "\n"\ " 3. You may copy and distribute the Program (or a work based on it,\n"\ "under Section 2) in object code or executable form under the terms of\n"\ "Sections 1 and 2 above provided that you also do one of the following:\n"\ "\n"\ " a) Accompany it with the complete corresponding machine-readable\n"\ " source code, which must be distributed under the terms of Sections\n"\ " 1 and 2 above on a medium customarily used for software interchange; or,\n"\ "\n"\ " b) Accompany it with a written offer, valid for at least three\n"\ " years, to give any third party, for a charge no more than your\n"\ " cost of physically performing source distribution, a complete\n"\ " machine-readable copy of the corresponding source code, to be\n"\ " distributed under the terms of Sections 1 and 2 above on a medium\n"\ " customarily used for software interchange; or,\n"\ "\n"\ " c) Accompany it with the information you received as to the offer\n"\ " to distribute corresponding source code. (This alternative is\n"\ " allowed only for noncommercial distribution and only if you\n"\ " received the program in object code or executable form with such\n"\ " an offer, in accord with Subsection b above.)\n"\ "\n"\ "The source code for a work means the preferred form of the work for\n"\ "making modifications to it. For an executable work, complete source\n"\ "code means all the source code for all modules it contains, plus any\n"\ "associated interface definition files, plus the scripts used to\n"\ "control compilation and installation of the executable. However, as a\n"\ "special exception, the source code distributed need not include\n"\ "anything that is normally distributed (in either source or binary\n"\ "form) with the major components (compiler, kernel, and so on) of the\n"\ "operating system on which the executable runs, unless that component\n"\ "itself accompanies the executable.\n"\ "\n"\ "If distribution of executable or object code is made by offering\n"\ "access to copy from a designated place, then offering equivalent\n"\ "access to copy the source code from the same place counts as\n"\ "distribution of the source code, even though third parties are not\n"\ "compelled to copy the source along with the object code.\n"\ " \n"\ " 4. You may not copy, modify, sublicense, or distribute the Program\n"\ "except as expressly provided under this License. Any attempt\n"\ "otherwise to copy, modify, sublicense or distribute the Program is\n"\ "void, and will automatically terminate your rights under this License.\n"\ "However, parties who have received copies, or rights, from you under\n"\ "this License will not have their licenses terminated so long as such\n"\ "parties remain in full compliance.\n"\ "\n"\ " 5. You are not required to accept this License, since you have not\n"\ "signed it. However, nothing else grants you permission to modify or\n"\ "distribute the Program or its derivative works. These actions are\n"\ "prohibited by law if you do not accept this License. Therefore, by\n"\ "modifying or distributing the Program (or any work based on the\n"\ "Program), you indicate your acceptance of this License to do so, and\n"\ "all its terms and conditions for copying, distributing or modifying\n"\ "the Program or works based on it.\n"\ "\n"\ " 6. Each time you redistribute the Program (or any work based on the\n"\ "Program), the recipient automatically receives a license from the\n"\ "original licensor to copy, distribute or modify the Program subject to\n"\ "these terms and conditions. You may not impose any further\n"\ "restrictions on the recipients' exercise of the rights granted herein.\n"\ "You are not responsible for enforcing compliance by third parties to\n"\ "this License.\n"\ "\n"\ " 7. If, as a consequence of a court judgment or allegation of patent\n"\ "infringement or for any other reason (not limited to patent issues),\n"\ "conditions are imposed on you (whether by court order, agreement or\n"\ "otherwise) that contradict the conditions of this License, they do not\n"\ "excuse you from the conditions of this License. If you cannot\n"\ "distribute so as to satisfy simultaneously your obligations under this\n"\ "License and any other pertinent obligations, then as a consequence you\n"\ "may not distribute the Program at all. For example, if a patent\n"\ "license would not permit royalty-free redistribution of the Program by\n"\ "all those who receive copies directly or indirectly through you, then\n"\ "the only way you could satisfy both it and this License would be to\n"\ "refrain entirely from distribution of the Program.\n"\ "\n"\ "If any portion of this section is held invalid or unenforceable under\n"\ "any particular circumstance, the balance of the section is intended to\n"\ "apply and the section as a whole is intended to apply in other\n"\ "circumstances.\n"\ "\n"\ "It is not the purpose of this section to induce you to infringe any\n"\ "patents or other property right claims or to contest validity of any\n"\ "such claims; this section has the sole purpose of protecting the\n"\ "integrity of the free software distribution system, which is\n"\ "implemented by public license practices. Many people have made\n"\ "generous contributions to the wide range of software distributed\n"\ "through that system in reliance on consistent application of that\n"\ "system; it is up to the author/donor to decide if he or she is willing\n"\ "to distribute software through any other system and a licensee cannot\n"\ "impose that choice.\n"\ "\n"\ "This section is intended to make thoroughly clear what is believed to\n"\ "be a consequence of the rest of this License.\n"\ " \n"\ " 8. If the distribution and/or use of the Program is restricted in\n"\ "certain countries either by patents or by copyrighted interfaces, the\n"\ "original copyright holder who places the Program under this License\n"\ "may add an explicit geographical distribution limitation excluding\n"\ "those countries, so that distribution is permitted only in or among\n"\ "countries not thus excluded. In such case, this License incorporates\n"\ "the limitation as if written in the body of this License.\n"\ "\n"\ " 9. The Free Software Foundation may publish revised and/or new versions\n"\ "of the General Public License from time to time. Such new versions will\n"\ "be similar in spirit to the present version, but may differ in detail to\n"\ "address new problems or concerns.\n"\ "\n"\ "Each version is given a distinguishing version number. If the Program\n"\ "specifies a version number of this License which applies to it and \"any\n"\ "later version\", you have the option of following the terms and conditions\n"\ "either of that version or of any later version published by the Free\n"\ "Software Foundation. If the Program does not specify a version number of\n"\ "this License, you may choose any version ever published by the Free Software\n"\ "Foundation.\n"\ "\n"\ " 10. If you wish to incorporate parts of the Program into other free\n"\ "programs whose distribution conditions are different, write to the author\n"\ "to ask for permission. For software which is copyrighted by the Free\n"\ "Software Foundation, write to the Free Software Foundation; we sometimes\n"\ "make exceptions for this. Our decision will be guided by the two goals\n"\ "of preserving the free status of all derivatives of our free software and\n"\ "of promoting the sharing and reuse of software generally.\n"\ "\n"\ " NO WARRANTY\n"\ "\n"\ " 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n"\ "FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n"\ "OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n"\ "PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n"\ "OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n"\ "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n"\ "TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n"\ "PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n"\ "REPAIR OR CORRECTION.\n"\ "\n"\ " 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"\ "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n"\ "REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n"\ "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n"\ "OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n"\ "TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n"\ "YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n"\ "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n"\ "POSSIBILITY OF SUCH DAMAGES.\n"\ "\n"\ " END OF TERMS AND CONDITIONS\n"\ " \n"\ " How to Apply These Terms to Your New Programs\n"\ "\n"\ " If you develop a new program, and you want it to be of the greatest\n"\ "possible use to the public, the best way to achieve this is to make it\n"\ "free software which everyone can redistribute and change under these terms.\n"\ "\n"\ " To do so, attach the following notices to the program. It is safest\n"\ "to attach them to the start of each source file to most effectively\n"\ "convey the exclusion of warranty; and each file should have at least\n"\ "the \"copyright\" line and a pointer to where the full notice is found.\n"\ "\n"\ " \n"\ " Copyright (C) 19yy \n"\ "\n"\ " This program is free software; you can redistribute it and/or modify\n"\ " it under the terms of the GNU General Public License as published by\n"\ " the Free Software Foundation; either version 2 of the License, or\n"\ " (at your option) any later version.\n"\ "\n"\ " This program is distributed in the hope that it will be useful,\n"\ " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"\ " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"\ " GNU General Public License for more details.\n"\ "\n"\ " You should have received a copy of the GNU General Public License\n"\ " along with this program; if not, write to the Free Software\n"\ " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"\ "\n"\ "\n"\ "Also add information on how to contact you by electronic and paper mail.\n"\ "\n"\ "If the program is interactive, make it output a short notice like this\n"\ "when it starts in an interactive mode:\n"\ "\n"\ " Gnomovision version 69, Copyright (C) 19yy name of author\n"\ " Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n"\ " This is free software, and you are welcome to redistribute it\n"\ " under certain conditions; type `show c' for details.\n"\ "\n"\ "The hypothetical commands `show w' and `show c' should show the appropriate\n"\ "parts of the General Public License. Of course, the commands you use may\n"\ "be called something other than `show w' and `show c'; they could even be\n"\ "mouse-clicks or menu items--whatever suits your program.\n"\ "\n"\ "You should also get your employer (if you work as a programmer) or your\n"\ "school, if any, to sign a \"copyright disclaimer\" for the program, if\n"\ "necessary. Here is a sample; alter the names:\n"\ "\n"\ " Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n"\ " `Gnomovision' (which makes passes at compilers) written by James Hacker.\n"\ "\n"\ " , 1 April 1989\n"\ " Ty Coon, President of Vice\n"\ "\n"\ "This General Public License does not permit incorporating your program into\n"\ "proprietary programs. If your program is a subroutine library, you may\n"\ "consider it more useful to permit linking proprietary applications with the\n"\ "library. If this is what you want to do, use the GNU Library General\n"\ "Public License instead of this License.\n"\ "--File: ARTISTIC------------------------------------\n"\ "\n"\ "\n"\ "\n"\ "\n"\ " The \"Artistic License\"\n"\ "\n"\ " Preamble\n"\ "\n"\ "The intent of this document is to state the conditions under which a\n"\ "Package may be copied, such that the Copyright Holder maintains some\n"\ "semblance of artistic control over the development of the package,\n"\ "while giving the users of the package the right to use and distribute\n"\ "the Package in a more-or-less customary fashion, plus the right to make\n"\ "reasonable modifications.\n"\ "\n"\ "Definitions:\n"\ "\n"\ " \"Package\" refers to the collection of files distributed by the\n"\ " Copyright Holder, and derivatives of that collection of files\n"\ " created through textual modification.\n"\ "\n"\ " \"Standard Version\" refers to such a Package if it has not been\n"\ " modified, or has been modified in accordance with the wishes\n"\ " of the Copyright Holder as specified below.\n"\ "\n"\ " \"Copyright Holder\" is whoever is named in the copyright or\n"\ " copyrights for the package.\n"\ "\n"\ " \"You\" is you, if you're thinking about copying or distributing\n"\ " this Package.\n"\ "\n"\ " \"Reasonable copying fee\" is whatever you can justify on the\n"\ " basis of media cost, duplication charges, time of people involved,\n"\ " and so on. (You will not be required to justify it to the\n"\ " Copyright Holder, but only to the computing community at large\n"\ " as a market that must bear the fee.)\n"\ "\n"\ " \"Freely Available\" means that no fee is charged for the item\n"\ " itself, though there may be fees involved in handling the item.\n"\ " It also means that recipients of the item may redistribute it\n"\ " under the same conditions they received it.\n"\ "\n"\ "1. You may make and give away verbatim copies of the source form of the\n"\ "Standard Version of this Package without restriction, provided that you\n"\ "duplicate all of the original copyright notices and associated disclaimers.\n"\ "\n"\ "2. You may apply bug fixes, portability fixes and other modifications\n"\ "derived from the Public Domain or from the Copyright Holder. A Package\n"\ "modified in such a way shall still be considered the Standard Version.\n"\ "\n"\ "3. You may otherwise modify your copy of this Package in any way, provided\n"\ "that you insert a prominent notice in each changed file stating how and\n"\ "when you changed that file, and provided that you do at least ONE of the\n"\ "following:\n"\ "\n"\ " a) place your modifications in the Public Domain or otherwise make them\n"\ " Freely Available, such as by posting said modifications to Usenet or\n"\ " an equivalent medium, or placing the modifications on a major archive\n"\ " site such as uunet.uu.net, or by allowing the Copyright Holder to include\n"\ " your modifications in the Standard Version of the Package.\n"\ "\n"\ " b) use the modified Package only within your corporation or organization.\n"\ "\n"\ " c) rename any non-standard executables so the names do not conflict\n"\ " with standard executables, which must also be provided, and provide\n"\ " a separate manual page for each non-standard executable that clearly\n"\ " documents how it differs from the Standard Version.\n"\ "\n"\ " d) make other distribution arrangements with the Copyright Holder.\n"\ "\n"\ "4. You may distribute the programs of this Package in object code or\n"\ "executable form, provided that you do at least ONE of the following:\n"\ "\n"\ " a) distribute a Standard Version of the executables and library files,\n"\ " together with instructions (in the manual page or equivalent) on where\n"\ " to get the Standard Version.\n"\ "\n"\ " b) accompany the distribution with the machine-readable source of\n"\ " the Package with your modifications.\n"\ "\n"\ " c) give non-standard executables non-standard names, and clearly\n"\ " document the differences in manual pages (or equivalent), together\n"\ " with instructions on where to get the Standard Version.\n"\ "\n"\ " d) make other distribution arrangements with the Copyright Holder.\n"\ "\n"\ "5. You may charge a reasonable copying fee for any distribution of this\n"\ "Package. You may charge any fee you choose for support of this\n"\ "Package. You may not charge a fee for this Package itself. However,\n"\ "you may distribute this Package in aggregate with other (possibly\n"\ "commercial) programs as part of a larger (possibly commercial) software\n"\ "distribution provided that you do not advertise this Package as a\n"\ "product of your own. You may embed this Package's interpreter within\n"\ "an executable of yours (by linking); this shall be construed as a mere\n"\ "form of aggregation, provided that the complete Standard Version of the\n"\ "interpreter is so embedded.\n"\ "\n"\ "6. The scripts and library files supplied as input to or produced as\n"\ "output from the programs of this Package do not automatically fall\n"\ "under the copyright of this Package, but belong to whoever generated\n"\ "them, and may be sold commercially, and may be aggregated with this\n"\ "Package. If such scripts or library files are aggregated with this\n"\ "Package via the so-called \"undump\" or \"unexec\" methods of producing a\n"\ "binary executable image, then distribution of such an image shall\n"\ "neither be construed as a distribution of this Package nor shall it\n"\ "fall under the restrictions of Paragraphs 3 and 4, provided that you do\n"\ "not represent such an executable image as a Standard Version of this\n"\ "Package.\n"\ "\n"\ "7. C subroutines (or comparably compiled subroutines in other\n"\ "languages) supplied by you and linked into this Package in order to\n"\ "emulate subroutines and variables of the language defined by this\n"\ "Package shall not be considered part of this Package, but are the\n"\ "equivalent of input as in Paragraph 6, provided these subroutines do\n"\ "not change the language in any way that would cause it to fail the\n"\ "regression tests for the language.\n"\ "\n"\ "8. Aggregation of this Package with a commercial distribution is always\n"\ "permitted provided that the use of this Package is embedded; that is,\n"\ "when no overt attempt is made to make this Package's interfaces visible\n"\ "to the end user of the commercial distribution. Such use shall not be\n"\ "construed as a distribution of this Package.\n"\ "\n"\ "9. The name of the Copyright Holder may not be used to endorse or promote\n"\ "products derived from this software without specific prior written permission.\n"\ "\n"\ "10. THIS PACKAGE IS PROVIDED \"AS IS\" AND WITHOUT ANY EXPRESS OR\n"\ "IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED\n"\ "WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n"\ "\n"\ " The End\n"\ ; /*EOF*/ eperl-2.2.14/eperl_logo.c100664 1750 1750 103460 6317437560 127610ustar rseen/* eperl_logo.gif.c -- automatically generated by bin2c */ int ePerl_LOGO_size = 6805; char ePerl_LOGO_data[] = { 0x47,0x49,0x46,0x38,0x39,0x61,0xf1,0x00,0x6c,0x00,0xf7,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x33,0x00,0x00,0x66,0x00,0x00,0x99,0x00,0x00,0xcc,0x00,0x00, 0xff,0x00,0x33,0x00,0x00,0x33,0x33,0x00,0x33,0x66,0x00,0x33,0x99,0x00,0x33, 0xcc,0x00,0x33,0xff,0x00,0x66,0x00,0x00,0x66,0x33,0x00,0x66,0x66,0x00,0x66, 0x99,0x00,0x66,0xcc,0x00,0x66,0xff,0x00,0x99,0x00,0x00,0x99,0x33,0x00,0x99, 0x66,0x00,0x99,0x99,0x00,0x99,0xcc,0x00,0x99,0xff,0x00,0xcc,0x00,0x00,0xcc, 0x33,0x00,0xcc,0x66,0x00,0xcc,0x99,0x00,0xcc,0xcc,0x00,0xcc,0xff,0x00,0xff, 0x00,0x00,0xff,0x33,0x00,0xff,0x66,0x00,0xff,0x99,0x00,0xff,0xcc,0x00,0xff, 0xff,0x33,0x00,0x00,0x33,0x00,0x33,0x33,0x00,0x66,0x33,0x00,0x99,0x33,0x00, 0xcc,0x33,0x00,0xff,0x33,0x33,0x00,0x33,0x33,0x33,0x33,0x33,0x66,0x33,0x33, 0x99,0x33,0x33,0xcc,0x33,0x33,0xff,0x33,0x66,0x00,0x33,0x66,0x33,0x33,0x66, 0x66,0x33,0x66,0x99,0x33,0x66,0xcc,0x33,0x66,0xff,0x33,0x99,0x00,0x33,0x99, 0x33,0x33,0x99,0x66,0x33,0x99,0x99,0x33,0x99,0xcc,0x33,0x99,0xff,0x33,0xcc, 0x00,0x33,0xcc,0x33,0x33,0xcc,0x66,0x33,0xcc,0x99,0x33,0xcc,0xcc,0x33,0xcc, 0xff,0x33,0xff,0x00,0x33,0xff,0x33,0x33,0xff,0x66,0x33,0xff,0x99,0x33,0xff, 0xcc,0x33,0xff,0xff,0x66,0x00,0x00,0x66,0x00,0x33,0x66,0x00,0x66,0x66,0x00, 0x99,0x66,0x00,0xcc,0x66,0x00,0xff,0x66,0x33,0x00,0x66,0x33,0x33,0x66,0x33, 0x66,0x66,0x33,0x99,0x66,0x33,0xcc,0x66,0x33,0xff,0x66,0x66,0x00,0x66,0x66, 0x33,0x66,0x66,0x66,0x66,0x66,0x99,0x66,0x66,0xcc,0x66,0x66,0xff,0x66,0x99, 0x00,0x66,0x99,0x33,0x66,0x99,0x66,0x66,0x99,0x99,0x66,0x99,0xcc,0x66,0x99, 0xff,0x66,0xcc,0x00,0x66,0xcc,0x33,0x66,0xcc,0x66,0x66,0xcc,0x99,0x66,0xcc, 0xcc,0x66,0xcc,0xff,0x66,0xff,0x00,0x66,0xff,0x33,0x66,0xff,0x66,0x66,0xff, 0x99,0x66,0xff,0xcc,0x66,0xff,0xff,0x99,0x00,0x00,0x99,0x00,0x33,0x99,0x00, 0x66,0x99,0x00,0x99,0x99,0x00,0xcc,0x99,0x00,0xff,0x99,0x33,0x00,0x99,0x33, 0x33,0x99,0x33,0x66,0x99,0x33,0x99,0x99,0x33,0xcc,0x99,0x33,0xff,0x99,0x66, 0x00,0x99,0x66,0x33,0x99,0x66,0x66,0x99,0x66,0x99,0x99,0x66,0xcc,0x99,0x66, 0xff,0x99,0x99,0x00,0x99,0x99,0x33,0x99,0x99,0x66,0x99,0x99,0x99,0x99,0x99, 0xcc,0x99,0x99,0xff,0x99,0xcc,0x00,0x99,0xcc,0x33,0x99,0xcc,0x66,0x99,0xcc, 0x99,0x99,0xcc,0xcc,0x99,0xcc,0xff,0x99,0xff,0x00,0x99,0xff,0x33,0x99,0xff, 0x66,0x99,0xff,0x99,0x99,0xff,0xcc,0x99,0xff,0xff,0xcc,0x00,0x00,0xcc,0x00, 0x33,0xcc,0x00,0x66,0xcc,0x00,0x99,0xcc,0x00,0xcc,0xcc,0x00,0xff,0xcc,0x33, 0x00,0xcc,0x33,0x33,0xcc,0x33,0x66,0xcc,0x33,0x99,0xcc,0x33,0xcc,0xcc,0x33, 0xff,0xcc,0x66,0x00,0xcc,0x66,0x33,0xcc,0x66,0x66,0xcc,0x66,0x99,0xcc,0x66, 0xcc,0xcc,0x66,0xff,0xcc,0x99,0x00,0xcc,0x99,0x33,0xcc,0x99,0x66,0xcc,0x99, 0x99,0xcc,0x99,0xcc,0xcc,0x99,0xff,0xcc,0xcc,0x00,0xcc,0xcc,0x33,0xcc,0xcc, 0x66,0xcc,0xcc,0x99,0xcc,0xcc,0xcc,0xcc,0xcc,0xff,0xcc,0xff,0x00,0xcc,0xff, 0x33,0xcc,0xff,0x66,0xcc,0xff,0x99,0xcc,0xff,0xcc,0xcc,0xff,0xff,0xff,0x00, 0x00,0xff,0x00,0x33,0xff,0x00,0x66,0xff,0x00,0x99,0xff,0x00,0xcc,0xff,0x00, 0xff,0xff,0x33,0x00,0xff,0x33,0x33,0xff,0x33,0x66,0xff,0x33,0x99,0xff,0x33, 0xcc,0xff,0x33,0xff,0xff,0x66,0x00,0xff,0x66,0x33,0xff,0x66,0x66,0xff,0x66, 0x99,0xff,0x66,0xcc,0xff,0x66,0xff,0xff,0x99,0x00,0xff,0x99,0x33,0xff,0x99, 0x66,0xff,0x99,0x99,0xff,0x99,0xcc,0xff,0x99,0xff,0xff,0xcc,0x00,0xff,0xcc, 0x33,0xff,0xcc,0x66,0xff,0xcc,0x99,0xff,0xcc,0xcc,0xff,0xcc,0xff,0xff,0xff, 0x00,0xff,0xff,0x33,0xff,0xff,0x66,0xff,0xff,0x99,0xff,0xff,0xcc,0xff,0xff, 0xff,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x21,0xf9,0x04,0x01,0x00,0x00,0xd8,0x00,0x21,0xfe,0x16,0x47,0x49,0x46, 0x20,0x53,0x6d,0x61,0x72,0x74,0x53,0x61,0x76,0x65,0x72,0x20,0x56,0x65,0x72, 0x31,0x2e,0x31,0x61,0x00,0x2c,0x00,0x00,0x00,0x00,0xf1,0x00,0x6c,0x00,0x40, 0x08,0xfe,0x00,0xb1,0x09,0x1c,0x48,0xb0,0xa0,0xc1,0x83,0x08,0x13,0x2a,0x5c, 0xc8,0xb0,0xa1,0xc3,0x87,0x10,0x23,0x4a,0x9c,0x48,0xb1,0xa2,0xc5,0x8b,0x18, 0x33,0x6a,0xdc,0x28,0x91,0x95,0x47,0x56,0x14,0x3f,0x8a,0xf4,0x88,0xcd,0xe3, 0x13,0x2b,0xac,0x56,0x01,0x0a,0x04,0x68,0x45,0x20,0x90,0xac,0x02,0x91,0xb0, 0xf2,0xe4,0x24,0xa0,0x2a,0x34,0x51,0x16,0x1c,0xa9,0x71,0xe4,0xc7,0x92,0x3f, 0x79,0x02,0xfd,0x39,0x30,0x26,0x80,0x15,0x3e,0x41,0x12,0x4c,0xaa,0x54,0x60, 0xd2,0x40,0x47,0x49,0x0e,0x1d,0xb9,0x02,0xc0,0xcb,0xa2,0x49,0x97,0xfa,0x84, 0x8a,0xb4,0xa9,0x45,0x8f,0x2b,0x56,0x41,0x5b,0xb5,0xaa,0xd4,0x2a,0x8f,0x65, 0xd1,0xc6,0x5c,0xa1,0xe2,0xa5,0x57,0xa7,0xac,0x54,0xe0,0x7c,0xc2,0x16,0x90, 0x15,0x9c,0x55,0xe8,0x56,0x01,0x64,0xd7,0x4a,0xa0,0xb3,0x2b,0x57,0xe8,0x39, 0x54,0x45,0x0f,0xcb,0xb3,0xa5,0xec,0xae,0x28,0x6c,0x45,0x4f,0xe3,0x97,0x81, 0x06,0x97,0xe2,0xa2,0xc7,0x6e,0x09,0x44,0x6f,0x11,0x7a,0x04,0x00,0xc0,0x8a, 0x5f,0x92,0x41,0xad,0x74,0x56,0x6a,0xb4,0x6b,0x49,0xae,0x22,0x39,0x5f,0x85, 0xab,0x9a,0xb3,0x67,0xb7,0x53,0xab,0xae,0x06,0x5a,0xb5,0xab,0x68,0xd3,0x4e, 0xa1,0x5a,0xdd,0xdc,0xd9,0xef,0xd5,0xd4,0xa3,0xb1,0xd6,0x96,0xfa,0xd0,0xa3, 0xe7,0x6b,0xd0,0x64,0xc5,0x3c,0x5b,0xf6,0x10,0x20,0xb3,0x7f,0x13,0xe3,0x7c, 0xce,0x0a,0x3a,0x20,0x95,0x7c,0x1b,0x2b,0x67,0x45,0x93,0x6f,0xca,0x52,0x56, 0x54,0xfe,0x08,0x5e,0xf9,0x3c,0xf2,0x4a,0x96,0x89,0xf9,0x3e,0x29,0xcc,0xb2, 0x7d,0x95,0xc5,0x78,0xe9,0x3e,0x51,0x41,0x77,0xc5,0xe2,0xc6,0x67,0xf5,0x9c, 0xcc,0xcc,0xb1,0xbf,0xff,0xff,0x5f,0x05,0x62,0x85,0x4a,0xef,0x55,0x16,0x08, 0x4b,0x7c,0x91,0x67,0x57,0x5e,0x87,0x95,0x12,0xc8,0x64,0xec,0x5d,0xe7,0xa0, 0x61,0x64,0x8d,0x35,0xe1,0x5e,0x80,0xac,0x17,0xc3,0x60,0x8d,0xb1,0x72,0x5d, 0x20,0x7b,0xd1,0x54,0xc5,0x81,0x2b,0x25,0xc6,0x92,0x15,0x8b,0x2d,0xb8,0xde, 0x79,0x2b,0x95,0xb5,0x82,0x5e,0xab,0x04,0x72,0x52,0x34,0xfc,0x19,0x04,0x16, 0x67,0x38,0xe6,0xa8,0xe3,0x8e,0x3c,0xe6,0x88,0x1b,0x50,0xa2,0xf5,0x28,0xe4, 0x90,0xaa,0x35,0xc5,0x1d,0x91,0x48,0xf6,0xf8,0x23,0x90,0x42,0xba,0x15,0x48, 0x8a,0x7a,0xac,0x70,0x17,0x5b,0x2b,0x38,0xc1,0x96,0x67,0xe2,0x89,0xf7,0xc4, 0x87,0xab,0x78,0x76,0x93,0x94,0x5f,0x56,0xf1,0x51,0x90,0x49,0x12,0x79,0x17, 0x5d,0x37,0xc9,0x17,0x43,0x15,0x50,0x4c,0xf7,0x1e,0x5b,0x6a,0xea,0x91,0x17, 0x4a,0x35,0xda,0xc8,0x4a,0x55,0x3d,0xce,0x96,0xd0,0x91,0x4d,0x7a,0x74,0x0d, 0x9e,0x3c,0x5a,0x71,0x0d,0x46,0xd7,0x90,0xb9,0x23,0x9d,0x0b,0x19,0x25,0x24, 0x68,0x7c,0xf2,0x08,0x08,0x4c,0x82,0xb8,0xf4,0xc4,0x4b,0xad,0xc8,0xa9,0xd2, 0x92,0x40,0x4a,0xc8,0x5d,0x61,0x2b,0x60,0xe6,0x94,0x20,0x3d,0xea,0xd1,0x0a, 0x17,0xeb,0xad,0x30,0x53,0x4c,0x07,0xa6,0xaa,0x6a,0x20,0x5c,0xa4,0x7a,0x17, 0x8a,0xff,0x73,0xc1,0x67,0x9f,0x67,0x8d,0x75,0xe1,0x99,0x1e,0xb6,0x0a,0x78, 0xa0,0x6f,0x44,0xed,0xd4,0xe8,0x8e,0x6e,0x8d,0x04,0x19,0x8a,0x48,0x32,0x6a, 0x68,0x99,0x43,0x12,0x97,0x1b,0xb2,0xcc,0x72,0x46,0x9c,0x71,0x42,0x5e,0x01, 0x12,0x34,0xb6,0x4a,0xf9,0xd1,0x2a,0x2f,0x56,0x21,0xc3,0xaa,0xbe,0xbd,0x9a, 0x53,0x78,0xbe,0xa5,0x0a,0x68,0xb3,0x3c,0xba,0xb4,0xea,0x93,0x31,0x5e,0xb9, 0x47,0xab,0x57,0xac,0xb4,0xee,0x6b,0xaa,0x1e,0x62,0x4a,0xaf,0x9a,0xdd,0x29, 0xa4,0x7d,0xf8,0xe6,0x3b,0xeb,0x6b,0x22,0xed,0xf9,0xab,0x8e,0x3a,0x5d,0xf4, 0xaf,0x8f,0xd7,0x88,0x74,0x8d,0x6e,0x8b,0xd6,0x08,0x6d,0x8f,0x5c,0xb4,0xc2, 0x9d,0x61,0x4f,0xb0,0x70,0xde,0xae,0x28,0x4e,0x19,0x88,0x20,0x67,0x6d,0x4a, 0x6b,0x17,0x4f,0xf2,0x3a,0xaf,0x48,0xab,0x20,0xf2,0x97,0x80,0xb4,0x86,0x3b, 0xe6,0xbd,0x43,0xdd,0x15,0xe3,0x9c,0x28,0x72,0xb1,0xc7,0x81,0x1f,0xd7,0xc9, 0xd0,0x8d,0x79,0xca,0x0c,0x11,0xcd,0xe4,0x16,0x0b,0x13,0xc2,0x3b,0x62,0x0a, 0xd7,0xb8,0x87,0x7a,0xe5,0x51,0x15,0x39,0xef,0x28,0x83,0xb2,0x42,0xd9,0xc8, 0x73,0xd1,0x3e,0x2a,0x0b,0xe0,0xd3,0x50,0xf7,0x87,0x33,0x00,0x4e,0x47,0x6d, 0xf5,0x54,0x4c,0x5d,0xad,0xf5,0xd6,0xfe,0xf1,0xe6,0x91,0x6e,0xab,0xdd,0xa8, 0x13,0x6f,0x2e,0x81,0x14,0x0d,0x6a,0xb3,0x80,0xdd,0x14,0xb5,0x51,0xb1,0x52, 0xe4,0xcf,0xbb,0x61,0x53,0x15,0xa2,0x40,0xb5,0x6d,0xef,0x0a,0xd6,0x90,0x66, 0xef,0x81,0xfe,0x9c,0x1d,0x22,0x12,0x34,0xa2,0xd1,0xcd,0xf5,0xe0,0x84,0x3b, 0xa4,0xa8,0xb5,0x4f,0xe2,0x48,0x67,0x90,0x65,0x57,0x45,0xdc,0xd9,0x9c,0xa9, 0x80,0x52,0xe2,0xae,0x99,0x82,0x1a,0x48,0x50,0xe0,0x58,0xb6,0xbd,0x07,0x2c, 0xae,0xf9,0x4b,0x91,0x1e,0xe5,0x39,0x67,0x65,0x07,0x3e,0xe6,0xb8,0x23,0x56, 0x5d,0xf8,0xea,0xac,0x73,0x4d,0x2f,0xd4,0xaf,0xb7,0x2e,0xfb,0xec,0xb4,0xd7, 0x7e,0x73,0xec,0x5f,0xe3,0x1b,0xbb,0xed,0x0a,0xc5,0x44,0xac,0xcf,0x13,0xf9, 0x8e,0x27,0xa6,0xc6,0x91,0xa9,0xa7,0xe1,0x02,0x0e,0xaf,0x7a,0x48,0xdc,0x71, 0xc1,0xca,0x35,0x79,0xa7,0xd4,0x65,0x15,0x82,0xd8,0x0c,0x57,0x0c,0x03,0x0a, 0x88,0x93,0x35,0x79,0x5b,0x03,0xe2,0x49,0x7f,0xa5,0xd4,0x52,0x29,0xb2,0x3c, 0x59,0x13,0x97,0x0f,0x1e,0x12,0xa5,0x15,0xdb,0xc5,0xf0,0xd1,0x97,0x4f,0x38, 0xbf,0xbc,0x66,0xba,0x05,0xb5,0x77,0xa1,0xae,0x9d,0x3c,0xda,0xd7,0x76,0xbb, 0x2d,0xba,0x48,0xb7,0x51,0x94,0xfd,0x1c,0x07,0xb6,0x82,0x2d,0xab,0x2b,0xf6, 0xa2,0xdb,0x8d,0x9c,0xe4,0x2c,0x46,0xc9,0xa6,0x7e,0x52,0x29,0xcd,0xfc,0x1a, 0xe2,0x91,0x2b,0x88,0x69,0x2c,0xcc,0x89,0x51,0x82,0xf8,0x52,0x99,0x18,0xa5, 0x87,0x56,0xd4,0x23,0x4d,0x20,0x0c,0xe0,0x98,0xbf,0x94,0x85,0x26,0xf6,0x99, 0x0e,0x8b,0xcc,0xe2,0x20,0x15,0x02,0xc2,0x30,0x26,0x8c,0x4c,0x65,0xac,0x60, 0x25,0x7c,0xe1,0xe5,0x3d,0x55,0xc0,0x89,0x15,0x5a,0xa2,0x82,0xea,0x19,0x8e, 0x4f,0xf8,0xfe,0xfa,0xdf,0x91,0x4c,0x23,0x41,0x98,0x24,0xd0,0x3e,0xba,0xd9, 0x57,0x90,0x82,0x05,0x44,0xfb,0xe4,0x8f,0x6c,0x4e,0x44,0x49,0xe0,0xec,0xd3, 0xc4,0xa8,0xe8,0x06,0x45,0x2f,0x61,0x9c,0x13,0xf7,0xe7,0xbf,0x20,0xa2,0x64, 0x6e,0x54,0xb4,0x5e,0x51,0x02,0xd1,0x16,0x10,0x59,0x21,0x3d,0x08,0x2a,0x91, 0x79,0xf2,0xc2,0x97,0x91,0x25,0xc6,0x40,0x31,0x42,0x90,0x4a,0x1c,0x94,0x92, 0x13,0xe1,0x45,0x4e,0xf8,0xd1,0xa0,0x83,0x02,0xf1,0x87,0xc5,0x38,0xe6,0x55, 0xa4,0x60,0xc9,0x13,0xd6,0x94,0x97,0x18,0xd4,0xa4,0x30,0x38,0x71,0x50,0x4b, 0xf4,0xf2,0xa1,0xb2,0xfd,0xd0,0x89,0xb5,0x39,0xca,0x51,0x6a,0x43,0xc9,0x49, 0xee,0xeb,0x40,0xfd,0x3a,0x88,0x71,0x2a,0x09,0x49,0x7d,0xe9,0x6b,0x92,0x96, 0xb4,0xe4,0x6c,0xd6,0x42,0x49,0x4e,0x9a,0xd2,0x92,0xfc,0xda,0x1d,0x5c,0x6e, 0x73,0x94,0x00,0x88,0xe7,0x28,0x6e,0xd9,0x83,0xb9,0x6e,0x62,0x17,0xb9,0xdc, 0xc5,0x2e,0x8b,0xc4,0xc9,0x0a,0xca,0x93,0x9f,0xbc,0x18,0xe6,0x26,0x3b,0x74, 0x8c,0xa9,0x16,0x13,0x88,0x59,0x44,0x29,0x44,0x39,0xbc,0xe1,0x73,0xd2,0x62, 0xa9,0xb3,0xb4,0xe7,0x85,0x27,0x91,0xd3,0x7d,0xac,0xc0,0x85,0x3c,0xdc,0xc5, 0x30,0x67,0xbc,0x09,0x0e,0x59,0x62,0x2d,0x31,0x4e,0x4d,0x47,0x4c,0x14,0x16, 0xb1,0x88,0xf4,0x9b,0x81,0x69,0xae,0x64,0xe8,0xa4,0x15,0xc9,0xfc,0xc2,0xce, 0x67,0x2d,0xad,0x69,0x4c,0x11,0x1e,0x39,0xf5,0xc6,0x02,0x21,0xb1,0x8f,0x36, 0x8b,0x41,0xff,0xa2,0x7d,0xe4,0x24,0x9e,0x67,0xdd,0x29,0x98,0x55,0x40,0x44, 0x78,0x1c,0xf3,0x9e,0xdf,0xbc,0xb3,0x68,0x7b,0xd8,0x0e,0x58,0x74,0x08,0xc2, 0xf5,0xa8,0x40,0x72,0x96,0x13,0x10,0xae,0xce,0x95,0xaa,0xdd,0x7d,0x33,0x47, 0xc7,0xd3,0xe4,0xb1,0x74,0x04,0xc0,0x7b,0x79,0xf2,0xa3,0xf9,0x12,0x9c,0x53, 0x36,0xaa,0xb9,0x09,0x96,0x84,0xa4,0xa4,0x03,0x4d,0x2b,0x88,0xd6,0xa3,0x47, 0x9d,0xe6,0x8c,0x62,0xf2,0x88,0x0c,0x4a,0x45,0xa7,0xa4,0xc4,0x40,0x4a,0x0f, 0x42,0xd1,0xa3,0xa8,0xc2,0xb4,0xa3,0xb4,0xcb,0x0a,0x7b,0xd8,0x61,0xbb,0xaa, 0x45,0x9e,0xf7,0x3c,0xb4,0x64,0x57,0xe0,0x42,0x52,0xf5,0x70,0x05,0xcf,0x74, 0xa1,0x5d,0xbb,0x82,0x99,0xdf,0x34,0x69,0xaf,0x9e,0xd6,0x4c,0x2b,0x40,0xcb, 0xd1,0xe4,0x62,0xc2,0x55,0xc8,0x74,0xf5,0xab,0x6f,0x31,0x27,0xd3,0x6a,0x6a, 0xa7,0x7a,0xf6,0x48,0x5a,0x27,0x5a,0xa7,0x15,0x9a,0x5a,0x32,0x29,0x95,0x70, 0xa2,0x28,0x72,0xab,0x7d,0xfa,0xc2,0x85,0x5a,0x61,0x72,0x57,0xf6,0x11,0x4f, 0x3a,0x9b,0xfa,0xca,0x3e,0x01,0xe5,0x49,0x51,0xa2,0x4b,0xc9,0x5e,0x86,0x19, 0x31,0xf6,0xae,0xaa,0x3c,0xca,0x28,0xf3,0x50,0xba,0x9b,0x78,0x3a,0xf6,0x59, 0x8c,0x5d,0x81,0x01,0xb1,0x3a,0xa4,0x8c,0x2e,0x8c,0x47,0x5d,0x80,0xc6,0x2c, 0x9e,0xc7,0x0a,0x1a,0x3d,0xd6,0x88,0x77,0x01,0x4f,0x20,0x82,0xda,0xa5,0xf9, 0x08,0x8a,0xa5,0x89,0x55,0xd8,0x21,0x86,0x94,0x59,0xac,0xac,0x62,0x5e,0x53, 0xe1,0xc8,0x45,0xfe,0x71,0xa4,0xd8,0xe0,0x89,0xd5,0xaa,0x54,0x83,0x49,0x64, 0x27,0x78,0xdb,0xb6,0x95,0x44,0x16,0x99,0xc3,0x6d,0x4c,0xfd,0xa5,0xb0,0xde, 0x0e,0x29,0x2c,0x26,0xe5,0x9d,0x72,0x2b,0xb2,0x19,0x22,0xee,0x4c,0x28,0xac, 0x90,0x05,0x8d,0x0e,0x31,0x14,0xbf,0x09,0x6d,0x3b,0xd5,0x0b,0x8a,0x35,0x1c, 0x96,0x31,0xac,0xf8,0x0a,0x55,0x41,0xd1,0x0a,0x57,0x93,0x26,0x92,0x40,0x14, 0xd6,0xb0,0xcb,0x4d,0x6f,0x47,0xfc,0x07,0xad,0x15,0x94,0x64,0x59,0x5c,0x64, 0xaf,0x08,0xdb,0x76,0x9b,0xf7,0x02,0xa5,0x04,0x6d,0x93,0x0d,0x68,0x55,0x03, 0x0d,0x44,0xbc,0xad,0x24,0xb3,0x78,0x42,0x03,0xfd,0x37,0xca,0x25,0x06,0x30, 0x6b,0xea,0x4d,0xb0,0x82,0x47,0x3a,0xe0,0x83,0xfd,0x37,0x23,0xbc,0x41,0x49, 0xc1,0x8e,0x34,0xdc,0x05,0x5b,0xf8,0xc2,0x18,0xc6,0x48,0x26,0x33,0xcc,0xe1, 0x0e,0xcb,0x76,0x53,0x2c,0x10,0x6c,0x04,0x9f,0x44,0xbe,0x0c,0x2d,0x26,0xb9, 0x09,0xde,0x70,0x4f,0x54,0x89,0x15,0x14,0x13,0x17,0xbd,0xb7,0x63,0x49,0x9b, 0x70,0xea,0x62,0x20,0xad,0x07,0x5c,0xd3,0xbc,0x8b,0x87,0xd4,0xd8,0x25,0x3d, 0x7c,0x64,0x56,0x7b,0x11,0x24,0x8a,0xda,0x22,0x42,0x14,0x8a,0x07,0x36,0xbc, 0x83,0x56,0xc0,0x34,0xfc,0xe3,0xb8,0x51,0xf5,0x72,0xeb,0x5d,0x20,0x8c,0x13, 0x05,0xa2,0xe7,0x91,0x25,0x25,0x58,0x26,0x4b,0x94,0x78,0x8b,0x88,0x15,0xe4, 0x01,0x97,0xac,0xc8,0x61,0x8a,0x0e,0xb3,0xa0,0x97,0x8c,0xe5,0x33,0xf0,0x19, 0x50,0x8c,0xd6,0xfe,0xfc,0x9e,0x1b,0x73,0x01,0x1a,0x05,0xbb,0xcb,0x4b,0x4a, 0xf1,0xa6,0xda,0xfa,0x4b,0x40,0xa2,0x0b,0x92,0x5f,0x86,0x97,0x38,0x3c,0xad, 0x45,0x92,0x71,0x53,0xf2,0xdd,0x52,0xfa,0x11,0x3c,0xcf,0x6a,0x6e,0x85,0x26, 0x5d,0x5c,0xf1,0x54,0x4e,0x3d,0xff,0xae,0x7f,0x77,0xf3,0xcc,0x13,0x0f,0xb7, 0xe8,0x07,0x33,0x97,0x3b,0x56,0x80,0xc6,0x77,0xd4,0x42,0x96,0x38,0xbe,0x70, 0x64,0x20,0x42,0x2e,0x56,0x50,0x24,0xa7,0x0f,0x99,0x78,0x2f,0xd6,0xf1,0x92, 0x96,0x5f,0x65,0x13,0x03,0x91,0x87,0x4a,0x7b,0x71,0x8c,0x06,0xc3,0x97,0x98, 0xb6,0xfa,0x90,0x82,0x07,0x96,0x67,0x4d,0xdf,0x16,0x61,0x23,0xea,0xf7,0xa4, 0x0d,0x1c,0x08,0xfe,0xa4,0x64,0xb7,0xe4,0x1d,0x05,0x1b,0x41,0xf2,0xa7,0x7e, 0xfd,0xb7,0x64,0x60,0xdb,0xa6,0xd8,0xbf,0x43,0xb6,0x6f,0xe1,0x66,0xe7,0xc3, 0x62,0x3a,0x10,0xd7,0xb8,0x86,0x07,0x5f,0xd2,0x69,0x53,0xbc,0xf0,0x9a,0x23, 0x2b,0xcf,0x4a,0x08,0x0a,0x1a,0x32,0xfa,0x85,0x39,0x9e,0xc9,0x21,0x88,0xc4, 0xec,0x98,0x18,0xec,0x51,0x8f,0x87,0x30,0x0b,0x5f,0x1c,0x14,0xd7,0x1d,0xd2, 0x64,0x4d,0x7a,0x49,0x77,0xa9,0x48,0xc1,0x8a,0xfd,0x3c,0x12,0xd2,0xc6,0x79, 0x09,0xaf,0xf7,0xb6,0xdf,0x9a,0x42,0xf9,0x79,0x6a,0x43,0xb4,0x4f,0xfc,0x52, 0xa4,0x44,0xbb,0xa6,0x60,0x97,0xfb,0xf1,0x70,0x6e,0x84,0x40,0x00,0x26,0x8e, 0x89,0x5c,0xe1,0xe2,0xcd,0xcc,0x28,0xe7,0x52,0xd4,0x3a,0x90,0xd0,0xf9,0xe5, 0x99,0x0e,0x41,0xff,0x96,0x07,0x31,0xc7,0x3b,0x76,0xf4,0xcc,0xd7,0x56,0x61, 0x18,0x3d,0x18,0x72,0x2f,0x11,0x12,0xf9,0x88,0x36,0x58,0x22,0x2f,0x79,0x29, 0x4a,0xf4,0x89,0x4f,0x5e,0xb4,0xb4,0x98,0x2d,0x79,0xc6,0x5a,0x11,0x41,0x30, 0x74,0xe9,0x65,0x3f,0xac,0xa9,0xd8,0xe8,0x48,0xe3,0x89,0x63,0x87,0x82,0x35, 0xb8,0xf8,0x44,0xbc,0xf6,0x3b,0xfa,0xcc,0xee,0xf4,0x20,0x9c,0x20,0x28,0x32, 0x3b,0x3c,0x51,0x30,0xb3,0xde,0xc6,0x65,0xb6,0x88,0xde,0x3b,0xbc,0xce,0xb5, 0xbe,0xe7,0x97,0x64,0xb6,0xe8,0x40,0xde,0x5b,0x0f,0x86,0x3e,0xed,0x18,0xf5, 0x84,0xbd,0xd6,0x8d,0xe1,0x20,0x99,0x5f,0x14,0x3f,0x07,0x4d,0x0a,0xc6,0x9f, 0x7d,0x6c,0xd0,0xf3,0xce,0x77,0xdc,0xf5,0x3d,0x2b,0x7b,0x8f,0xe7,0x69,0x00, 0xd0,0xc2,0x5d,0xca,0x29,0x8d,0x2c,0xd1,0x03,0x17,0xf2,0xb2,0xcb,0xef,0xfc, 0x25,0xee,0x71,0xdf,0x69,0xc9,0x1b,0x93,0x4f,0x1d,0xee,0xa5,0x2c,0x2d,0x99, 0x25,0xbd,0x1f,0x55,0x16,0x0f,0x92,0xe5,0x9a,0xaf,0x92,0xe6,0x62,0x1c,0x54, 0x0a,0xe7,0xa4,0x49,0x72,0xe0,0xc1,0x09,0x8a,0x67,0xcb,0x34,0x29,0xd9,0x77, 0xd4,0xb8,0x05,0x96,0x91,0x18,0x9b,0xb3,0x6e,0xda,0x29,0xab,0xb4,0xfd,0x5a, 0x0c,0x02,0x41,0x8a,0x74,0xef,0x7c,0x3e,0x88,0x3c,0x49,0x0e,0xb7,0xd4,0xe9, 0xc9,0xbc,0xca,0xa8,0x53,0x8a,0x59,0xec,0x01,0x50,0x19,0x9c,0xe0,0xf1,0x3d, 0x77,0xc1,0x61,0xd6,0x71,0x58,0xf9,0x95,0xc4,0xcf,0xb0,0xac,0x8f,0x7d,0xc0, 0x2e,0xbb,0xfc,0xdc,0xfe,0x16,0x85,0xf6,0x56,0x5d,0x32,0xf7,0x75,0xe4,0xe3, 0x93,0xa2,0xb0,0x30,0x7a,0xa1,0xcf,0x43,0xc3,0x79,0x05,0xc1,0xcc,0xb0,0xd5, 0x82,0x34,0x40,0xb0,0x70,0x9f,0x33,0x15,0x90,0xc0,0x00,0x2b,0x28,0x01,0x5e, 0xd2,0xed,0x98,0x41,0xce,0x47,0x05,0xb2,0x24,0x1e,0x54,0x52,0x71,0x26,0x95, 0x7d,0xd5,0x86,0x70,0xc7,0xd5,0x51,0x3d,0xd2,0x6c,0x14,0x81,0x3f,0x0b,0xc8, 0x5b,0x88,0xd5,0x33,0xef,0x35,0x7e,0x39,0xc2,0x05,0xd1,0x70,0x1a,0x6d,0xa1, 0x72,0x9b,0x12,0x6a,0x0c,0xc8,0x0a,0x94,0x91,0x78,0xd8,0xc0,0x18,0x3a,0x66, 0x44,0xc1,0xa5,0x23,0x5d,0xf1,0x22,0x37,0x15,0x16,0x0e,0x53,0x5e,0x82,0x10, 0x08,0x87,0x70,0x2e,0x39,0x87,0x1f,0x8b,0x34,0x2b,0xb8,0x02,0x08,0xed,0xb2, 0x54,0xb9,0xb2,0x2a,0x16,0x15,0x81,0xe0,0x64,0x3d,0x8a,0x52,0x33,0x14,0x98, 0x7b,0x7f,0xc7,0x1f,0xb7,0x05,0x3c,0x4b,0x71,0x50,0x38,0x62,0x2c,0x42,0xe2, 0x52,0xac,0x20,0x08,0x6f,0xe2,0x11,0xd1,0x80,0x45,0x4f,0xd0,0x05,0x99,0x61, 0x1c,0x6d,0xe4,0x21,0x82,0x05,0x0d,0xdf,0xc7,0x23,0x24,0x60,0x6c,0x2a,0x40, 0x3a,0x52,0xf2,0x1a,0x86,0xd1,0x05,0xb8,0x62,0x18,0x2f,0x43,0x31,0xe0,0xd3, 0x66,0xe2,0x61,0x2b,0x6b,0x45,0x19,0x64,0x68,0x2b,0x49,0x35,0x5a,0xad,0xe2, 0x1b,0x1f,0x43,0x55,0xf4,0xe7,0x64,0xf5,0x82,0x84,0x29,0xc5,0x24,0xdd,0xe7, 0x34,0xb7,0x55,0x53,0xf1,0xa4,0x87,0xc1,0xc6,0x87,0x81,0x02,0x12,0xad,0x10, 0x4c,0x00,0x90,0x5d,0xff,0x00,0x60,0x13,0x93,0x73,0x2e,0xa4,0x92,0x43,0x5e, 0x02,0x3e,0xaa,0x02,0x7e,0x65,0x22,0x39,0x81,0x00,0x55,0xbb,0x32,0x22,0x94, 0x77,0x54,0x02,0x92,0x2b,0x37,0x08,0x08,0xeb,0x12,0x8a,0xac,0xb2,0x2e,0x81, 0x50,0x87,0x76,0xd8,0x7d,0x3b,0x12,0x41,0x7f,0x82,0x8a,0x7e,0x28,0x88,0x63, 0x85,0x34,0xab,0xd8,0x23,0x7b,0x30,0x26,0x39,0x61,0x83,0xb6,0x28,0x25,0x92, 0xf3,0x53,0xba,0x62,0x2b,0xf2,0x91,0x3c,0xd4,0x14,0x54,0x7b,0x60,0x17,0x43, 0x52,0x32,0x07,0x62,0x1f,0x24,0x90,0x80,0x5e,0x25,0x20,0xe0,0x21,0x58,0xa1, 0xa8,0x4e,0xe6,0x05,0x78,0x14,0xc4,0x83,0xe1,0x57,0x35,0x41,0x98,0x3f,0x1a, 0x46,0x89,0x65,0x62,0x84,0x84,0xb8,0x23,0xf2,0x43,0x5a,0x61,0x88,0x4e,0x3a, 0xd4,0x16,0xa5,0x50,0x5e,0x82,0x41,0x2b,0x27,0x51,0x57,0x57,0x10,0x3e,0x7a, 0x63,0x39,0xb5,0xf8,0x1a,0x71,0xf4,0x24,0x5b,0xc4,0x23,0x4f,0x00,0x40,0x2b, 0x51,0x48,0xea,0xb4,0x12,0x52,0x77,0x3b,0x77,0x18,0x4e,0x4f,0x57,0x1c,0x7f, 0x38,0x65,0x1a,0x75,0x2f,0x49,0x37,0x4f,0xa7,0xd8,0x23,0x54,0x18,0x25,0x8c, 0xc6,0x8f,0xb0,0xf2,0x22,0x98,0x21,0x51,0x75,0x45,0x2b,0x19,0xf2,0x86,0x81, 0x80,0x5f,0xe5,0x22,0x78,0x83,0xf7,0x80,0x27,0x93,0x73,0x79,0xb5,0x39,0x35, 0xe6,0x2f,0xfb,0x08,0x90,0x9a,0x11,0x8b,0xe5,0x02,0x52,0x24,0xa9,0x2f,0xe5, 0x26,0x90,0x55,0x28,0x37,0xc3,0x18,0x56,0xc6,0xc5,0x19,0x06,0xc0,0x19,0xc7, 0xc8,0x19,0x01,0x20,0x93,0xff,0xfb,0xe3,0x14,0xa5,0x70,0x53,0x5f,0x48,0x27, 0x07,0x92,0x31,0x4d,0x98,0x80,0x3c,0x41,0x39,0x4a,0xd2,0x91,0x10,0x26,0x8d, 0xb9,0xb7,0x62,0xd8,0x98,0x33,0xa0,0xc1,0x58,0x22,0xa5,0x15,0xb4,0x87,0x1b, 0xd5,0xd8,0x2c,0xf3,0x28,0x34,0x7d,0x77,0x87,0xcc,0x52,0x6d,0xb0,0xe3,0x3b, 0xe9,0xc4,0x2f,0x2b,0xa6,0x56,0x59,0xd9,0x95,0x5e,0x59,0x32,0xe5,0xe6,0x95, 0xfc,0xd8,0x8a,0x5f,0x89,0x71,0x5f,0x79,0x96,0xc4,0x28,0x94,0x76,0xc2,0x1d, 0x50,0x70,0x00,0xf7,0xf2,0x19,0x6a,0xe9,0x61,0xe9,0x75,0x32,0x0c,0x28,0x97, 0x76,0x79,0x97,0x3d,0x61,0x3a,0xed,0x35,0x2c,0x13,0x07,0x28,0xeb,0x52,0x02, 0x7b,0xd6,0x3f,0xa2,0x11,0x00,0x7a,0x80,0x08,0x5d,0x92,0x55,0x0a,0x94,0x6b, 0x32,0xb1,0x3f,0xe3,0x64,0x50,0xb5,0x01,0x19,0x2c,0xf0,0x85,0x5d,0x71,0x45, 0x90,0x81,0x68,0x78,0x89,0x97,0x82,0xa6,0x36,0x63,0x14,0x6c,0x51,0xe8,0x5b, 0x52,0xb6,0x0a,0x0f,0xc6,0x1b,0x90,0x31,0x6d,0x87,0x48,0x5f,0x8b,0x18,0x41, 0x09,0xe4,0x30,0xb7,0x91,0x37,0xc2,0x76,0x1b,0x60,0x13,0x54,0x37,0x05,0x00, 0x80,0x19,0x97,0x97,0x69,0x3b,0x43,0x14,0x67,0xfd,0x13,0x44,0x81,0x10,0x0d, 0x7e,0x63,0x3a,0x70,0x23,0x28,0x43,0x04,0x40,0x4e,0xe4,0x3c,0x97,0xe3,0x60, 0x13,0x97,0x38,0x56,0x10,0x3d,0x50,0x71,0x60,0xc8,0x59,0x30,0xb2,0x50,0x0a, 0x07,0x20,0x60,0x48,0x01,0x2a,0x9d,0x11,0x3d,0x9a,0x55,0x0a,0x61,0x54,0x9b, 0x98,0xe9,0x4f,0x44,0x91,0x49,0xff,0xaa,0xf3,0x59,0xbf,0xd6,0x74,0x4e,0xa7, 0x37,0xbd,0xf2,0x59,0x50,0x36,0x9e,0xb4,0xa9,0x9d,0xea,0x99,0x28,0xa4,0xf4, 0x22,0x48,0x26,0x35,0x02,0x85,0x2f,0x56,0x90,0x5d,0xeb,0x59,0x9f,0xf6,0x79, 0x9f,0xf8,0x99,0x9f,0xfa,0xb9,0x9f,0xfc,0xd9,0x35,0xf5,0x92,0x8f,0xfd,0x19, 0xa0,0xad,0x53,0x68,0xa9,0x63,0x24,0xdc,0xb1,0x4b,0x7a,0x91,0x9e,0x02,0xba, 0xa0,0x7b,0xb7,0x13,0x87,0xd0,0x26,0x90,0xd1,0x12,0xe5,0xf4,0x1e,0xd9,0x71, 0x17,0xd3,0xc6,0xa0,0x0c,0x6a,0x91,0xfe,0x28,0x08,0x7d,0xc1,0x91,0x98,0xa6, 0x12,0x6d,0x47,0x67,0xbf,0x01,0x2b,0x83,0x84,0x48,0xa1,0xc6,0x9d,0x15,0x05, 0x92,0x57,0xf9,0x35,0xef,0xf9,0x15,0xe5,0x15,0x08,0xaf,0xd7,0x62,0xc6,0xa1, 0x96,0xc2,0x02,0xa3,0x2a,0x5a,0x2f,0x39,0x11,0x13,0x8a,0x11,0x95,0xc8,0x23, 0x18,0xca,0xc1,0x42,0xe6,0x21,0x51,0xe7,0x76,0x65,0x2e,0xc7,0x0a,0xad,0x40, 0x46,0xea,0xf6,0x20,0xb8,0x24,0x4d,0x00,0x34,0x29,0x5f,0xc2,0x91,0xb5,0x43, 0x4a,0x51,0xd1,0x13,0xf0,0x38,0x37,0x83,0xe2,0x2b,0x71,0x75,0xa1,0xc5,0x51, 0xa5,0x9d,0x71,0xa5,0x43,0xe9,0x19,0x70,0x36,0x16,0xd2,0x53,0x1d,0x58,0xe4, 0x83,0xd8,0x49,0x21,0xbd,0xc7,0x18,0x7b,0x80,0x79,0xe9,0x36,0x8e,0x27,0xf4, 0x12,0xb2,0x54,0x18,0xf1,0xf6,0x20,0xd1,0x11,0x1e,0x82,0x11,0x54,0x81,0x60, 0x0d,0x89,0x51,0x6b,0x39,0xc4,0x02,0xe5,0xe7,0xa2,0x9a,0xe4,0x5d,0x5a,0xe1, 0x2b,0xe1,0x29,0x33,0xbc,0xc5,0x1a,0xff,0xde,0x37,0xa8,0x4a,0xe6,0xa5,0x82, 0xaa,0x19,0x88,0xaa,0xa0,0x47,0x28,0x26,0x05,0x93,0x16,0x9d,0x47,0x16,0x66, 0xa1,0x7a,0xdf,0x79,0x27,0x93,0xb2,0x4b,0x67,0x04,0x22,0x8a,0x94,0x48,0x32, 0xb2,0x43,0x63,0x21,0x48,0x5c,0xa0,0x48,0xa4,0x67,0x1d,0x73,0xc2,0x05,0x19, 0x43,0x16,0x37,0xa1,0x07,0x65,0x71,0x43,0x31,0xfa,0x43,0x24,0x43,0x63,0x85, 0xb6,0x38,0xa9,0x84,0x69,0x9f,0xb1,0x99,0x93,0x59,0xa6,0x06,0x3a,0xab,0x70, 0x39,0x14,0xbe,0x98,0x45,0x5d,0x0a,0x17,0xbe,0xea,0x35,0x7a,0xe3,0xab,0xb0, 0x51,0xab,0x34,0x16,0x38,0x8c,0x7a,0x69,0x23,0x32,0xa9,0xe1,0x73,0x65,0x66, 0xd1,0x79,0x6d,0xd4,0x21,0x2c,0x29,0x25,0xd3,0xa1,0x07,0x59,0x42,0x02,0xe6, 0x72,0x2b,0x76,0x01,0x1d,0x78,0x71,0x1f,0x09,0x02,0xae,0xeb,0xe1,0xaa,0xb8, 0x74,0x16,0xcf,0x20,0x3d,0xe6,0xe1,0x18,0x2a,0x70,0x16,0xfe,0x08,0x36,0x43, 0x31,0x37,0x8f,0xe6,0x39,0xba,0x13,0x9c,0x24,0x01,0x46,0x08,0xa4,0x70,0xf0, 0xfa,0x11,0x45,0xe2,0x9a,0x0a,0x28,0x12,0x0a,0x97,0x3b,0x5c,0xb4,0xaf,0x37, 0xb2,0x97,0xff,0x7a,0xa3,0xc4,0x9a,0x9c,0x6a,0x31,0xad,0xa5,0xb0,0xa6,0x07, 0xf2,0x4b,0x7f,0xd1,0x7c,0x1a,0x98,0x1b,0x24,0x00,0x73,0xe3,0x08,0x0d,0xeb, 0x06,0x7d,0x06,0xe2,0x20,0xce,0x94,0x43,0x72,0x32,0x22,0x95,0x71,0x1e,0x89, 0xa1,0x02,0x86,0x94,0x42,0x55,0x90,0x07,0xf0,0xa1,0x07,0x33,0x54,0x18,0x7c, 0x41,0x02,0xee,0x1a,0x8d,0x0d,0x77,0x32,0xff,0x27,0x28,0x98,0xc1,0x76,0x24, 0x82,0x72,0x91,0x4e,0x19,0x40,0x31,0x8b,0x9b,0x48,0x61,0x69,0x36,0xbb,0x30, 0xfe,0x34,0x60,0x31,0xdb,0x5e,0x04,0x26,0x34,0x7a,0xc9,0x3c,0x9b,0xc2,0x59, 0x26,0x44,0x7a,0x6c,0xda,0x18,0xf1,0x26,0x6e,0xe6,0x21,0x18,0x22,0xd4,0x85, 0x9a,0xa2,0x4d,0x6a,0xd7,0x7f,0x1c,0x54,0x7a,0x97,0x0a,0x43,0x1b,0xbb,0x0a, 0xea,0x83,0x6a,0x61,0x32,0x1f,0x4e,0x3a,0x1f,0x79,0xb5,0x43,0xd9,0x39,0x75, 0xa5,0xa4,0x68,0xc1,0x72,0x70,0xf2,0x55,0x37,0xb9,0x25,0x68,0xc2,0x01,0x4a, 0x41,0x24,0x3a,0x6e,0x61,0x99,0x9b,0x99,0x5b,0x10,0x14,0xb7,0x74,0x52,0x4a, 0xb5,0x01,0x97,0x76,0x0b,0x5f,0x56,0xf9,0x64,0x9e,0x71,0x16,0x18,0xc4,0xb1, 0x65,0xb1,0x93,0x07,0x32,0x27,0x9d,0xd6,0x1e,0x6c,0x1a,0x03,0x3e,0xa4,0x31, 0xae,0x2a,0x3e,0x22,0x42,0x76,0x30,0xb7,0x25,0x80,0x30,0xa7,0xb8,0x04,0x6a, 0xcd,0x67,0x25,0x4e,0x20,0x22,0xe2,0x61,0x54,0xeb,0xe1,0x71,0x67,0xa7,0x02, 0xf2,0x03,0xb3,0x56,0x31,0x61,0x8c,0x22,0x65,0x0c,0xb6,0x7d,0x7a,0x59,0x44, 0x5b,0xd8,0xb3,0xa7,0xdb,0x2f,0xfc,0x8a,0x87,0x8a,0x42,0xaf,0xa8,0xc9,0x68, 0xa2,0x89,0xba,0x46,0x54,0xb4,0x77,0x4b,0x56,0x5b,0x3a,0x8f,0x5d,0x02,0x1d, 0xcd,0x61,0x22,0xd3,0xca,0x12,0x05,0xb2,0x93,0x96,0x1a,0x23,0x67,0x94,0x18, 0x2b,0x30,0x8b,0x02,0xf2,0x75,0x2b,0x83,0x26,0x91,0x51,0xaa,0x5e,0xdb,0x46, 0x7b,0x2a,0x51,0xcf,0xf4,0x42,0xf5,0xf8,0x22,0xff,0x8b,0x41,0x19,0xd4,0x17, 0x03,0x56,0xa2,0x6e,0x2a,0x91,0xab,0x86,0xb3,0x44,0xc2,0x89,0x14,0x6c,0x5b, 0xb3,0xf7,0x43,0x32,0x6d,0x03,0x71,0xfa,0x3a,0x69,0xa4,0x64,0x68,0x89,0x46, 0x2c,0x59,0x64,0xbe,0x60,0x41,0x6c,0x93,0x23,0x69,0x8d,0x95,0x3b,0x2e,0xa1, 0x98,0x9d,0xe1,0x38,0xdc,0x11,0xb8,0x63,0xe4,0x56,0xa8,0xa6,0x3e,0x94,0xf1, 0x82,0x0a,0x62,0x46,0x23,0xe2,0x71,0x7f,0x61,0x17,0x39,0xf5,0x41,0x86,0xf1, 0x3c,0xcb,0x24,0x48,0x14,0x4a,0x13,0xa5,0x7a,0x22,0x8a,0xe4,0x18,0x78,0xe4, 0x6a,0x38,0xa4,0xb2,0x2f,0x77,0x1f,0x7a,0xa5,0x4d,0x6c,0x61,0x75,0xd2,0xe4, 0x52,0xef,0x5a,0x6f,0x66,0x89,0x6d,0xb9,0xf1,0xab,0xf8,0xb4,0x38,0x95,0x39, 0x2b,0xdd,0x29,0x3c,0x48,0x24,0x4e,0x30,0x2c,0x71,0x06,0x87,0x2f,0xc1,0x52, 0x31,0x6b,0xbb,0x68,0x2f,0x81,0xba,0xc9,0xd3,0x4d,0xf7,0xbb,0x94,0x54,0xb6, 0x4b,0x20,0x4a,0x1e,0x89,0x17,0xb2,0xda,0xdb,0x71,0xdb,0x56,0x7a,0x26,0x67, 0xbc,0x5b,0x12,0x19,0xc9,0xfb,0xb1,0x5b,0xf2,0x47,0x23,0x12,0xbc,0x04,0xf2, 0x18,0x75,0x24,0x4d,0x65,0x61,0x48,0x1b,0x6c,0x48,0xad,0x52,0x19,0xce,0x21, 0x27,0x1a,0xa2,0x07,0x0e,0x42,0x64,0xb6,0x95,0x9e,0x99,0x5a,0x27,0xf9,0xf8, 0x3a,0x7e,0xd8,0xc6,0xdf,0x45,0x84,0x6e,0xdc,0x11,0x4f,0x72,0x22,0x96,0x6b, 0x1e,0x76,0x21,0x27,0x1a,0x7c,0x4b,0x1e,0x94,0x20,0x9e,0x11,0x48,0xd1,0xa1, 0x29,0x68,0x01,0x4c,0x9c,0x3a,0x27,0xa5,0xd0,0x41,0xff,0xfc,0xa6,0xad,0xde, 0x12,0xb2,0x0d,0xdc,0x76,0x55,0x10,0x8c,0xd1,0x37,0x22,0xcf,0x14,0x13,0x55, 0x20,0x1e,0x1f,0x52,0x05,0x53,0x85,0xa1,0xea,0x15,0x13,0x4e,0x2a,0x22,0x8d, 0x61,0x22,0x74,0x7a,0xc7,0xb7,0x24,0xbc,0x5d,0x92,0x07,0x57,0xb7,0x66,0x25, 0xf7,0x79,0x6f,0x22,0x4d,0x9d,0x9a,0x21,0xb1,0x36,0x73,0xda,0x6b,0x20,0x60, 0x5c,0x6b,0x9f,0x7b,0x63,0x05,0x32,0xae,0x85,0x07,0xaa,0x98,0xea,0x8f,0x43, 0xa8,0xa1,0x2f,0xb6,0xcb,0x4b,0x07,0x75,0x43,0x58,0x12,0xba,0x1b,0x8d,0x82, 0x17,0x13,0x06,0xf0,0x1c,0x05,0x02,0x89,0x95,0xe1,0x18,0xa9,0x57,0x2a,0xae, 0x6a,0x42,0x0b,0x42,0x19,0x46,0x9c,0xae,0x74,0x96,0x57,0x41,0x95,0xb2,0xde, 0x32,0x3e,0x57,0xb6,0x0a,0x85,0x81,0x16,0x95,0xba,0x6e,0xa1,0x26,0x7c,0x35, 0x61,0x6f,0xf3,0x36,0x3d,0x36,0x81,0x17,0xab,0x47,0x94,0xb5,0x17,0x2c,0xb7, 0x87,0x8a,0x83,0x88,0x0d,0x0e,0x88,0x5b,0x50,0x6a,0x27,0x4a,0x99,0x3b,0xa4, 0xf0,0xb5,0x6f,0x82,0x2f,0x04,0xa5,0x73,0xd9,0x33,0x21,0xc7,0xc7,0x78,0xfe, 0xb7,0x7b,0xab,0xc0,0x56,0x03,0x98,0x2f,0x25,0x20,0x80,0x2b,0x00,0x05,0x6b, 0xa2,0x2f,0xf9,0xa6,0x78,0xd1,0xf7,0x04,0x4e,0xe0,0xbd,0x79,0x51,0x05,0x2d, 0x44,0x50,0xe3,0x6c,0x16,0x2f,0x92,0xce,0x54,0x59,0x34,0x4b,0xf2,0x94,0x4c, 0xe3,0x4e,0xee,0xac,0xa5,0xdb,0x08,0x30,0x5f,0xc3,0x1e,0x0f,0x4d,0x1f,0xf9, 0xb4,0x91,0xf9,0xf6,0x20,0x29,0x81,0xc7,0x34,0xf1,0xc4,0xff,0x74,0xe1,0x70, 0xb8,0x55,0x8f,0x8c,0x21,0x66,0xb4,0x6c,0x20,0xef,0x51,0x43,0x14,0xba,0x07, 0x55,0x60,0x00,0xb7,0x86,0xb6,0x21,0x4d,0x68,0x70,0xe3,0xce,0xa3,0xe4,0x8a, 0xad,0xf7,0x7a,0xd9,0x47,0x85,0x60,0x51,0x76,0x90,0xf8,0xb9,0x4e,0xc4,0x97, 0x57,0x42,0x1e,0x8f,0x6c,0x17,0x34,0xf5,0x11,0x32,0x10,0x7b,0x07,0x50,0x43, 0x9f,0x8b,0x43,0xb1,0x76,0x26,0x8c,0x97,0x25,0x55,0x92,0x4f,0xe5,0x04,0xd4, 0xf7,0x22,0xb7,0x80,0x96,0x24,0x44,0x24,0x92,0xdd,0x57,0xd4,0xc7,0x25,0x49, 0x9d,0x94,0x8d,0xa8,0xc9,0x58,0x80,0xd0,0x0a,0x40,0x71,0xb5,0x2b,0x70,0x00, 0x1a,0x99,0x9d,0x22,0x61,0xb9,0xa1,0xe5,0xb4,0x2c,0x07,0xc4,0xa6,0xb0,0x7c, 0x6d,0xd1,0x82,0x07,0xfa,0x42,0xcb,0x2c,0xc2,0xf6,0x51,0x02,0xac,0x70,0x08, 0x03,0x38,0x22,0x18,0x73,0x57,0xaa,0x64,0x80,0x8e,0x05,0x71,0x66,0xe2,0x6b, 0x7d,0x32,0x61,0x98,0xcd,0x59,0xa8,0xab,0xbb,0x46,0x6b,0x4f,0x79,0x47,0x7b, 0x88,0x32,0x34,0x42,0x32,0x8b,0x75,0xf3,0x22,0x44,0xf6,0x22,0xa4,0x02,0x74, 0xa3,0x26,0x72,0x1b,0x98,0x17,0xad,0x85,0x0d,0xb2,0x80,0x52,0x8b,0x01,0x00, 0xf7,0x77,0x8c,0x2b,0x10,0x03,0x0a,0x9d,0xdb,0x86,0x34,0x53,0xc1,0xe2,0x20, 0x26,0xeb,0x7c,0xd4,0x47,0x02,0xdb,0xb2,0x2a,0x67,0x48,0x51,0x8a,0x25,0xd9, 0xec,0x49,0x95,0x00,0xeb,0x57,0x02,0xb3,0x5b,0x36,0xd3,0x5b,0x2a,0x75,0x87, 0xd2,0x72,0x1a,0x61,0x51,0xa0,0xdf,0xaa,0x53,0x74,0x1d,0xa9,0xff,0x59,0xc7, 0x1d,0x27,0x61,0xc6,0x40,0xf1,0x85,0x87,0x32,0x0b,0xd8,0x69,0x48,0xfd,0x84, 0x16,0xc6,0x5d,0xdc,0xb0,0xd2,0x26,0x2a,0x62,0xa7,0x80,0xf0,0x86,0x65,0xe8, 0xde,0xf0,0x62,0x32,0x05,0x99,0x5a,0x33,0x23,0x88,0x0a,0x58,0x88,0x1a,0xa6, 0x87,0x42,0xec,0x2b,0xc9,0x62,0x44,0xa8,0xb5,0x23,0xd3,0x3d,0x34,0x32,0x82, 0x19,0xb1,0x6d,0xc9,0x8e,0xd1,0xc6,0x1b,0x72,0x20,0x05,0x3e,0xb1,0x17,0xb9, 0x23,0x54,0xb8,0x1e,0xf5,0x41,0x51,0x64,0x68,0xdc,0xfa,0xf6,0x25,0x54,0x40, 0x83,0xb7,0xc2,0x86,0xb8,0xd2,0x18,0xf1,0x7d,0x20,0xd6,0x35,0xdf,0xb2,0x57, 0xdf,0xfd,0x9d,0x7d,0x80,0xc8,0x77,0x9a,0xa4,0xdf,0x05,0xa8,0x87,0xce,0x75, 0x87,0x56,0x40,0xd7,0x29,0x31,0x25,0x1f,0x31,0xd1,0x52,0xfb,0x5d,0x34,0x11, 0xc1,0x99,0xb7,0x70,0x3c,0x72,0x00,0x54,0x59,0x02,0x52,0xd2,0x05,0xee,0xc2, 0x2a,0x6f,0x88,0x42,0x5c,0xf0,0x1c,0x34,0xa1,0x57,0xb4,0x42,0x19,0x40,0x05, 0x91,0x1c,0x9e,0x2a,0x2f,0xf3,0xe1,0xed,0x7c,0x55,0x87,0x75,0x87,0x08,0xa4, 0xd6,0xb8,0xd5,0x8a,0xf7,0x32,0x59,0x9a,0xe4,0x60,0x9e,0xed,0x14,0xd6,0x60, 0x56,0x8e,0xe2,0xe2,0x4e,0x8b,0x40,0x4e,0x5d,0xe2,0xab,0xd0,0x82,0x81,0xd0, 0x26,0x67,0x34,0x25,0xe1,0x62,0xe6,0xf2,0xdc,0x86,0x36,0xa8,0x2b,0x34,0xf1, 0x46,0xf9,0xcc,0x56,0x1a,0x4c,0x19,0x49,0x05,0x91,0xe9,0xa8,0x2b,0x2d,0x4a, 0x59,0x40,0xe8,0x58,0xae,0x58,0x4e,0x1b,0xdd,0x2c,0x56,0xae,0x24,0xff,0xc6, 0x3d,0xab,0x44,0xe2,0x94,0xea,0x0c,0x00,0x16,0x08,0xdb,0x22,0x82,0x40,0x4f, 0x82,0xe4,0x14,0xee,0x7c,0x29,0xa2,0x02,0xc3,0x9d,0x2a,0xff,0xdd,0x53,0x01, 0x40,0x51,0x37,0x37,0xc9,0x2e,0x51,0x86,0x72,0x38,0x5a,0x56,0xe0,0xde,0x7a, 0xbe,0xe7,0x84,0x1a,0xd4,0xd6,0x48,0x1b,0xac,0x18,0x56,0x47,0x49,0x2e,0x7a, 0x42,0xe2,0xca,0x59,0x50,0xa8,0x92,0x3c,0x05,0x55,0x86,0x9f,0x08,0x05,0x3b, 0x54,0x05,0x84,0xd4,0xbc,0x24,0xc2,0x31,0x87,0xde,0x56,0x48,0x12,0x2e,0xe2, 0xc2,0x4d,0x2a,0x30,0x54,0xc1,0xd8,0x05,0xef,0x42,0xa7,0xd0,0x45,0xd6,0x21, 0x3d,0x4a,0x2d,0xc9,0x2c,0x4e,0x13,0xcf,0x6b,0xdd,0xc6,0x8c,0x25,0x3f,0x81, 0x20,0x31,0x48,0x84,0x4e,0x2f,0xc2,0x4e,0x41,0xfe,0x47,0x96,0x58,0x31,0xa1, 0xa8,0x54,0x56,0x10,0x00,0xb8,0xd7,0xbf,0x25,0xc3,0x43,0x44,0x22,0x2c,0xbb, 0x34,0xc9,0x92,0xe3,0x32,0x75,0x75,0x1e,0x0a,0x9a,0x7d,0x1c,0x7d,0x3c,0x4f, 0x39,0x96,0x7a,0xa7,0x34,0xcb,0x87,0x40,0xf5,0x72,0xe9,0x39,0xe2,0x63,0x98, 0xd6,0x12,0x7d,0xd1,0x17,0x3a,0x75,0x12,0x1c,0x23,0x32,0xa8,0x52,0x32,0x32, 0xa0,0x43,0x4d,0x05,0x43,0xbb,0xcb,0x2a,0xc2,0xe7,0x19,0x37,0x48,0x2b,0x15, 0xcb,0xe2,0xa4,0x81,0x22,0x74,0x56,0x31,0xea,0x84,0x08,0xe3,0x88,0xb0,0xa8, 0x6e,0x55,0x30,0x8c,0xe5,0x7c,0x1e,0x28,0xcd,0x1a,0x3c,0x2a,0x9e,0x4e,0x54, 0x59,0x97,0x71,0x2b,0x8b,0x56,0x88,0x2d,0x55,0xd0,0x54,0xeb,0xc4,0x02,0xff, 0x88,0x54,0xe2,0xa4,0x42,0x2b,0x2e,0xb7,0xe4,0xa5,0x70,0x5e,0xe8,0x9e,0x4f, 0xf4,0x71,0x57,0x81,0x10,0x03,0x31,0x59,0x2e,0x43,0x41,0xa1,0xeb,0xe3,0x7c, 0x2c,0xef,0xe1,0xb0,0xc5,0x3c,0x1f,0xd9,0x77,0x89,0x42,0xe5,0x5a,0x15,0xf2, 0x72,0xec,0xd9,0x9d,0x8d,0x92,0x54,0xc5,0x58,0x3e,0xe6,0x7b,0x8b,0xc1,0x31, 0x39,0x9c,0xd2,0xe6,0x42,0x31,0x32,0x0f,0xf0,0x7e,0x11,0x9b,0x40,0x53,0xe2, 0x4f,0x81,0x92,0xc6,0xd1,0x85,0x48,0x9e,0x17,0x24,0xc4,0x0a,0xe7,0x25,0x30, 0x89,0x2e,0xc0,0xd1,0xc8,0xe2,0x4c,0x1f,0x74,0x28,0xae,0xea,0x3e,0x49,0xcf, 0x42,0xc2,0xef,0x24,0xc3,0x44,0x32,0x3a,0x12,0x53,0x28,0x5a,0x75,0x85,0x47, 0x75,0x1b,0x94,0xc5,0x25,0xf1,0x4e,0x81,0x08,0xf5,0x21,0x03,0xc4,0xc4,0x62, 0xeb,0xf5,0x91,0x2b,0x26,0xf1,0xbe,0x0c,0xd2,0x18,0x69,0x23,0x4d,0xd9,0xc6, 0x12,0x9f,0x2a,0xa6,0xf0,0x82,0x87,0x20,0x08,0x7b,0x34,0xa7,0xcf,0x72,0x08, 0x8d,0x41,0xa1,0x4f,0x92,0xcf,0x52,0x84,0x32,0x49,0x67,0x0a,0x54,0xf9,0xb2, 0xe8,0xa9,0xf1,0xf5,0xa2,0xf8,0x5f,0x6a,0xea,0x49,0xe9,0xf4,0x27,0x3e,0xf7, 0x45,0xd1,0xe5,0xb1,0xc7,0xa3,0x70,0x21,0x08,0x70,0xc9,0x14,0x1b,0xad,0x4e, 0xe3,0x54,0x59,0xd9,0xed,0x3a,0x6b,0x8f,0xfa,0xab,0xc4,0xfa,0x20,0x01,0xed, 0x26,0xe8,0xf1,0x47,0x78,0xee,0x06,0xea,0xe5,0x3d,0x25,0x38,0x26,0x9e,0xe8, 0xac,0x0e,0xfc,0x89,0xcf,0xdc,0x4c,0x16,0xe8,0x45,0x73,0x92,0x8f,0x4f,0x3f, 0xff,0x04,0xb9,0xf1,0x56,0x75,0x34,0x2c,0xc9,0x77,0xd4,0x5f,0x59,0x90,0x7a, 0x69,0xaa,0x3f,0xfd,0xc2,0xdf,0xe0,0x41,0x63,0xa0,0xfc,0x0d,0xfe,0x25,0x11, 0x0d,0xdf,0x7f,0xe8,0x0e,0x73,0x69,0x78,0x86,0x2c,0x65,0xd3,0xfb,0x03,0xca, 0x59,0x08,0x36,0x94,0x8f,0xb5,0xd9,0x7e,0xb2,0xff,0xf6,0x9f,0xd9,0xe4,0x69, 0x9e,0x00,0x11,0xc8,0xca,0x0a,0x56,0xac,0xb0,0x1d,0x3c,0x58,0x50,0xe1,0x42, 0x85,0x08,0x19,0x3e,0x84,0xd8,0x8a,0xa1,0x2c,0x68,0x0d,0x11,0x5e,0xc4,0x98, 0x31,0xe3,0xc3,0x40,0x1d,0x3d,0x2a,0xb4,0x56,0x50,0xe3,0x48,0x92,0x25,0x4d, 0x9e,0x44,0x99,0x52,0xe5,0x4a,0x96,0x23,0x0b,0x76,0xb4,0x02,0xc0,0x8a,0xc1, 0x96,0x35,0x6d,0xde,0xc4,0x99,0x53,0xe7,0x4e,0x9e,0x3d,0x49,0x16,0x04,0x00, 0x20,0x10,0x4d,0x6c,0x0c,0x8b,0x12,0x4d,0x48,0x73,0xa1,0x46,0xa3,0x47,0x8f, 0x22,0x4d,0x8a,0xb1,0xa9,0xc8,0x8b,0x0f,0x9d,0x56,0x5d,0xea,0x53,0xeb,0x56, 0xae,0x3c,0x59,0xc5,0x24,0xa8,0x30,0xd0,0x8a,0xa0,0x2b,0x56,0x08,0x9c,0xf9, 0x32,0x66,0x8c,0x68,0x63,0xcb,0x52,0x7d,0x49,0x56,0x05,0x80,0xb3,0x63,0x61, 0xd2,0x85,0xcb,0xca,0xac,0x48,0x56,0x02,0x83,0xd2,0xb5,0x32,0xf6,0x8a,0x52, 0x81,0x64,0x83,0x56,0x11,0x54,0x25,0x6d,0xc1,0x81,0x06,0x4a,0x00,0x20,0x91, 0xb6,0xeb,0x64,0xca,0x95,0x99,0xea,0x15,0xca,0x18,0xef,0xc2,0x98,0x69,0x4d, 0x1d,0x7a,0x3c,0x30,0x90,0xac,0xbe,0x9b,0xbf,0x02,0x28,0xb1,0xb0,0x55,0xa0, 0xa0,0xfe,0x05,0xc9,0x0e,0x75,0xd8,0xf9,0x5a,0xe9,0xcc,0x0b,0x83,0xae,0x8a, 0x2b,0x93,0x95,0x44,0xd7,0x32,0xa3,0x71,0x41,0xbd,0x70,0x16,0xeb,0xb0,0x96, 0x8d,0x1f,0xd7,0x5a,0x3a,0x2c,0x59,0x2b,0xd7,0x1c,0x62,0x86,0xcd,0x0a,0xb8, 0xee,0xa3,0x9d,0x7b,0x43,0x21,0x9d,0xf4,0x89,0xcc,0x6b,0xc4,0xe1,0xb2,0x06, 0xf0,0x32,0x28,0x22,0xa2,0xa7,0xc3,0x82,0x17,0x54,0x1e,0x3c,0x66,0x2b,0xb2, 0xa2,0x15,0x2c,0x25,0x63,0x33,0x72,0xfa,0xf5,0x6d,0xf6,0x1e,0xba,0x5e,0x29, 0xe6,0xb0,0xbd,0x67,0x26,0x0d,0xca,0x14,0x59,0xf6,0x68,0x8d,0x28,0x59,0x62, 0x02,0x00,0x11,0x68,0xc8,0xe2,0x22,0x9a,0xa4,0xe6,0x6a,0x8f,0x95,0xc7,0xb8, 0x68,0xc5,0x21,0xf0,0x86,0x62,0xaf,0x3c,0x56,0x82,0x0a,0xac,0x2c,0xb3,0xac, 0xb8,0x62,0xa8,0xec,0xec,0x23,0xb1,0xc4,0x93,0x94,0xd3,0xac,0xb8,0xde,0x00, 0xe0,0x42,0xac,0xf9,0xb0,0x39,0x50,0xb7,0x18,0x55,0xc4,0x4c,0x26,0x68,0x10, 0x29,0x50,0x3c,0x00,0x02,0x50,0x28,0xa8,0xe8,0x66,0xd1,0x23,0x28,0x03,0x7a, 0xcc,0xec,0xa0,0xd5,0xfe,0x32,0xcf,0x22,0x91,0x30,0x34,0xb1,0x49,0x27,0x13, 0xb2,0x6e,0x85,0x81,0xe8,0xea,0x68,0xaf,0xd7,0xc6,0x82,0x6e,0xbf,0xd7,0x58, 0x61,0xc1,0x2c,0x2a,0xc7,0x3a,0xcb,0x00,0xa1,0x8e,0x54,0x21,0x10,0x41,0xae, 0xc4,0xeb,0x89,0x0e,0x85,0xf2,0xab,0x23,0xbc,0xa4,0xbc,0xd0,0x2f,0x2b,0xac, 0x3b,0x4d,0x26,0x41,0xaa,0x04,0x80,0x05,0xaa,0x9e,0xe4,0x93,0xc4,0x97,0x30, 0xfc,0x60,0x93,0xa1,0x8e,0xc4,0x82,0xea,0xa8,0x41,0xc5,0x02,0xd4,0x3b,0x44, 0x71,0x33,0x28,0x50,0x85,0x4c,0x39,0xb4,0xa8,0x55,0x0e,0x85,0x8f,0xd2,0x03, 0x84,0x92,0xe5,0xa9,0x8f,0x78,0xeb,0xb3,0x53,0x4f,0x71,0xea,0xeb,0xac,0xfd, 0x14,0xf5,0xea,0xab,0xe2,0x8e,0x22,0x6b,0x8f,0x42,0x3f,0x65,0xb5,0xd5,0x9a, 0x56,0xb4,0xa2,0x0b,0xb2,0x56,0xc0,0xcd,0x27,0x1d,0xa5,0x9c,0x52,0x32,0x57, 0x77,0xe5,0xb5,0xa5,0x86,0xb2,0xe2,0xaa,0xa2,0x46,0xf7,0xec,0xb5,0x58,0x63, 0x8f,0x45,0x36,0x59,0x65,0x97,0x2d,0x11,0x00,0x3b }; /*EOF*/ eperl-2.2.14/eperl_logo.gif100664 1750 1750 15225 6317437272 132650ustar rseenGIF89añl÷3f™Ìÿ3333f3™3Ì3ÿff3fff™fÌfÿ™™3™f™™™Ì™ÿÌÌ3ÌfÌ™ÌÌÌÿÿÿ3ÿfÿ™ÿÌÿÿ3333f3™3Ì3ÿ3333333f33™33Ì33ÿ3f3f33ff3f™3fÌ3fÿ3™3™33™f3™™3™Ì3™ÿ3Ì3Ì33Ìf3Ì™3ÌÌ3Ìÿ3ÿ3ÿ33ÿf3ÿ™3ÿÌ3ÿÿff3fff™fÌfÿf3f33f3ff3™f3Ìf3ÿffff3fffff™ffÌffÿf™f™3f™ff™™f™Ìf™ÿfÌfÌ3fÌffÌ™fÌÌfÌÿfÿfÿ3fÿffÿ™fÿÌfÿÿ™™3™f™™™Ì™ÿ™3™33™3f™3™™3Ì™3ÿ™f™f3™ff™f™™fÌ™fÿ™™™™3™™f™™™™™Ì™™ÿ™Ì™Ì3™Ìf™Ì™™ÌÌ™Ìÿ™ÿ™ÿ3™ÿf™ÿ™™ÿÌ™ÿÿÌÌ3ÌfÌ™ÌÌÌÿÌ3Ì33Ì3fÌ3™Ì3ÌÌ3ÿÌfÌf3ÌffÌf™ÌfÌÌfÿ̙̙3Ì™fÌ™™Ì™ÌÌ™ÿÌÌÌÌ3ÌÌfÌÌ™ÌÌÌÌÌÿÌÿÌÿ3ÌÿfÌÿ™ÌÿÌÌÿÿÿÿ3ÿfÿ™ÿÌÿÿÿ3ÿ33ÿ3fÿ3™ÿ3Ìÿ3ÿÿfÿf3ÿffÿf™ÿfÌÿfÿÿ™ÿ™3ÿ™fÿ™™ÿ™Ìÿ™ÿÿÌÿÌ3ÿÌfÿÌ™ÿÌÌÿÌÿÿÿÿÿ3ÿÿfÿÿ™ÿÿÌÿÿÿ€€€!ùØ!þGIF SmartSaver Ver1.1a,ñl@þ± H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜ(‘•GV?ŠôˆÍã+¬V hE ¬‘°òä$ *4Q©qäÇ’?yý90&€>ALªT`Ò@GI¹ÀË¢I—ú„Š´©E+VA[µªÔ*eÑÆ\¡â¥W§¬Tà|œUèVd×J ³+Wè9TE˳¥ì®(lEOã——â¢Çn DozÀŠ_’A­tVj´kI®"9_…«š³g·S«®Zµ«hÓN¡ZÝÜÙïÕÔ£±Ö–úУçkÐdÅ<[ö ³ã|Î : •|+gE“oÊRVTþ^ù<òJ–‰ù>)̲}•Åxé>QAwÅâÆgõœÌ̱¿ÿÿ_b…JïUK|‘gW^‡•Èdì]ç ad5á^€¬Ã`±r] {ÑTÅ+%Æ’‹-¸Þy+•µ‚^«rR4üg8æ¨ãŽ<æˆP¢õ(äª5Å‘Höø#BºHŠz¬p[+8Á–gâ‰÷ć«xv“”_VñQIy]7ÉCPL÷[jê‘J5ÚÈJU=ΖБMzt ž* àÓP÷‡3NGmõTL]­õÖþñæ‘n«Ý¨o. j³€ÝµQ±RäÏ»aS¢@µmï Öfïþœ"4¢ÑÍõà„;¤¨µOâHgeWEÜÙœ©€Râ®™‚HPàX¶½,®ùK‘å9ge>æ¸#V]øê¬sM/Ô¯·.ûì´×~sì_ã»í ÅD¬ÏùŽ'¦Æ‘©§á¯zHÜqÁÊ5y§Ôe‚Ø W  ˆ“5y[âI¥ÔR)²ºÙW‚DûälNDIàìÓĨèE/aœ÷ç¿ ¢dnT´^QÑY!=*‘yò—‘%Æ@1BJ”’áENøÑ ƒñ‡Å8æU¤`ÉÖ”—Ô¤08qPKôò¡²ýЉµ9ÊQjCÉIîë@ý:ˆq* I}ék’–´älÖBINšÒ’üÚ\ns”ˆç(nÙƒ¹nb¹ÜÅ.‹ÄÉ Ê“Ÿ¼æ&;tŒ©ˆYD)D9¼ásÒb©³´ç…'‘Ó}¬À…<ÜÅ0g¼ Yb-1NMGL±ˆô›i®dè¤ÉüÂÎg-­iL9õÆ!±6‹Aÿ¢}ä$žgÝ)˜U@Dxóžß¼³h{ØXtÂõ¨@r–®Î•ªÝ}3GÇÓä±tÀ{yò£ùœS6ª¹ –„¤¤M+ˆÖ£GæŒbòˆ JE§¤Ä@JBÑ£¨Â´£´Ë {Øa»ªEž÷<´dWàBRõpÏt¡]»‚™ß4i¯žÖL+@ËÑäbÂUÈtõ«o1'Ójj§zöHZ'Z§šZ2)•p¢(r«}úÂ…ZarWöO:›úÊ>åIQ¢KÉ^†1ö®ª<Ê(óPº›x:öYŒ]±:¤Œ.ŒG]€Æ,žÇ =ÖˆwO ‚Ú¥ùŠ¥‰UØ!†”Y¬¬b^SáÈEþq¤Øà‰ÕªTƒId'xÛ¶•D™ÃmLý¥°Þ),&år+²"îL(¬1¿ m;Õ Š5–1¬ø UAÑ W“&’@Ö°ËMoGü­”dY\d¯Ûv›÷¥m“ hU D¼­$³xBý7Ê%0kêM°‚G:àƒý7#¼AIÁŽ4Ü[øÂÆH&3ÌáËvS,lŸD¾ -&¹ ÞpOT‰½·cI›pêb ­\Ó¼‹‡ÔØ%=|dV{$ŠÚ"BŠ6¼ƒVÀ4üã¸Qõrë] Œ¢ç‘%%X&K”x‹ˆä—¬Èaг —Œå3ðPŒÖþüžs»ËKJñ¦ÚúK@¢ ’_†—8<­E’qSòÝRú<Ïjn…&]\ñTN=ÿ®wóÌ·è3—;V€ÆwÔB–8¾pd B.VP$§™x/Öñ’–_e‘‡J{qŒט¶ú‚–gMßa#ê÷¤ þ¤d·äAò§~ý·d`ۦؿC¶oáfçÃb:׸†_ÒiS¼ðš#+ÏJ 2ú…9žÉ!ˆÄì˜ìQ‡0 _×ÒdMzIw©HÁŠý<ÒÆy ¯÷¶ßšBùyjC´OüR¤D»¦`—ûñpn„@&މ\áâÍÌ(çRÔ:Ðùå™Aÿ–1Ç;vôÌ×Va=r/ùˆ6X"/y)Jô‰O^´´˜-yÆZA0tée?¬©ØèHã‰c‡‚5¸øD¼ö;úÌîô œ (2;íõ„½Öá ™_?M ÆŸ}lÐóÎwÜõ=+{çiÐÂ]Ê),Ñò²Ëïü%îqßiÉ“Oî¥,-™%½U’嚯’æbT ç¤IràÁ ŠgË4)ÙwÔ¸–‘›³nÚ)«´ýZ AŠtï|>ˆª~e"9U»2"”wT’+7ëЬ².P‡vØ};A‚Š~(ˆc…4«Ø#{0&9aƒ¶(%’óSºb+ò‘<ÔT{`CR2b$€^% à!X¡¨NæxăáW5A˜?F‰eb„„¸#òCZaˆN:Ô¥P^‚A+'QWW>zc9µøqô$[Ä#O@+QHê´Rw;wNOW8eu/I7O§Ø#T%ŒÆ°ò"˜!QuE+ò†€_å"xƒ÷€'“syµ95æ/ûš‹åR$©/å&U(7ÃVÆÅÀÇÈ “ÿûã¥pS_H'’1M˜€¤1®*>"Bv0·%€0§¸jÍg%N "âaTëáqg§ò³V1aŒ"e ¶}zYD[س§Û/üЇŠB¯¨Éh¢‰ºFT´wKV[:]Ía"Óʲ“–#g”+0‹òu+ƒ&‘Qª^ÛF{*QÏôBõø"ÿ‹AÔV¢n*‘«†³D‰l[³÷C2mqú:i¤dh‰F,Yd¾`Al“#i•;.¡˜á8ܸcäV¨¦>”ñ‚ bF#âqa9õA†ñ<Ë$HJ¥z"Šäxäj8¤²/wz¥MlauÒäRïZof‰m¹ñ«ø´8•9+Ý)W¶ …•ºn¡&|5aoó6=6«G”µ,·‡Šƒˆ ˆ[Pj'J™;¤ðµo‚/¥sÙ3!ÇÇxþ·{«ÀV˜/% €+k¢/ù¦xÑ÷Nà½yQ-DPãl/’ÎTY4Kò”LãNÛ0_ÃMù´‘ùö )Ç4ñÄÿtáp¸UŒ!f´l ïQCºU`·†¶!MhpãΣ䊭÷zÙG…`Qvø¹NÄ—WBl4õ2{PCŸ‹C±v&Œ—%U’OåÔ÷"·€–$D$’ÝWÔÇ%I”¨ÉX€Ð @qµ+p™"a¹¡å´,Ħ°|mÑ‚úBË,ÂöQ¬p8"sWªd€Žqfâk}2a˜ÍY¨«»FkOyG{ˆ24B2‹uó"Dö"¤t£&r˜­… ²€R‹÷wŒ+ Û†4SÁâ &ë|ÔGÛ²*gHQŠ%ÙìI•ëW³[6Ó[*u‡ÒraQ ßªSt©ÿYÇ'aÆ@ñ…‡2 ØiHý„Æ]ܰÒ&*b§€ð†eèÞðb2™Z3#ˆ Xˆ¦‡Bì+ÉbD¨µ#Ó=42‚±mÉŽÑÆr >±¹#T¸õAQdhÜúö%T@ƒ·Â†¸Òñ} Ö5ß²Wßý}€Èwš¤ß¨‡Îu‡V@×)1%1ÑRû]4Á™·pæ{‹Á19œÒæB12ð~›@SâO’ÆÑ…Hž$Ä ç%0‰.ÀÑÈâLt(®ê>IÏBÂï$ÃD2:S(Zu…Gu”Å%ñNõ!ÄÄbëõ‘+&ñ¾ Òi#MÙÆŸ*¦ð‚‡ {4§ÏrA¡O’ÏR„2Ig Tù²è©ñõ¢ø_jêIéô'>÷EÑå±Ç£p!pÉ­NãTYÙí:kú«Äú í&èñGxîêå=%8&žè¬ü‰ÏÜLèEs’O?ÿ¹ñVu4,ÉwÔ_Yziª?ýÂßàAc ü þ% ßèsix†,eÓûÊY6”µÙ~²ÿöŸÙäižÈÊ V¬°„ØŠ¡,h ^Ę1ãÃ@=*´VPãH’%MžD™RåJ–# v´ÀŠÁ–5mÞÄ™SçNž=I Ml ‹MHs¡F£G"Mб©È‹V]êSëV® ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_main.c -- ePerl main procedure */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_security.h" #include "eperl_getopt.h" #include "eperl_perl5.h" #include "eperl_proto.h" int mode = MODE_UNKNOWN; char *allowed_file_ext[] = LIST_OF_ALLOWED_FILE_EXT; char *allowed_caller_uid[] = LIST_OF_ALLOWED_CALLER_UID; /* * Display an error message and a logfile content as a HTML page */ void PrintError(int mode, char *scripturl, char *scriptfile, char *logfile, char *str, ...) { va_list ap; char ca[1024]; char *cpBuf; char *cp; va_start(ap, str); vsprintf(ca, str, ap); IO_restore_stdout(); IO_restore_stderr(); if (mode == MODE_CGI || mode == MODE_NPHCGI) { if (mode == MODE_NPHCGI) HTTP_PrintResponseHeaders(""); printf("Content-Type: text/html\n\n"); printf("\n"); printf("\n"); printf("ePerl: ERROR: %s\n", ca); printf("\n"); printf("\n"); printf("
\n"); cp = getenv("SCRIPT_NAME"); if (cp == NULL) cp = "UNKNOWN_IMG_DIR"; printf("\"Powered\n", cp); printf("\n"); printf("\n"); printf("\n", cp); printf("\n"); printf("\n"); printf("\n", ePerl_Version); printf("\n"); printf("
\"Embedded
Version %s
\n"); printf("

\n"); printf("\n"); printf("\n"); printf("\n"); printf("
\n"); printf("ERROR:\n"); printf("
\n"); printf("

%s

\n", ca); printf("
\n"); if (logfile != NULL) { if ((cpBuf = ePerl_ReadErrorFile(logfile, scriptfile, scripturl)) != NULL) { printf("

"); printf("\n"); printf("\n"); printf("\n"); printf("
\n"); printf("Contents of STDERR channel:\n"); printf("
\n"); printf("
\n");
                printf("%s", cpBuf);
                printf("
"); printf("
\n"); } } printf("

\n"); printf("\n"); printf("\n"); } else { fprintf(stderr, "ePerl:Error: %s\n", ca); if (logfile != NULL) { if ((cpBuf = ePerl_ReadErrorFile(logfile, scriptfile, scripturl)) != NULL) { fprintf(stderr, "\n"); fprintf(stderr, "---- Contents of STDERR channel: ---------\n"); fprintf(stderr, "%s", cpBuf); if (cpBuf[strlen(cpBuf)-1] != '\n') fprintf(stderr, "\n"); fprintf(stderr, "------------------------------------------\n"); } } } fflush(stderr); fflush(stdout); va_end(ap); return; } void give_version(void) { fprintf(stdout, "%s\n", ePerl_Hello); fprintf(stdout, "\n"); fprintf(stdout, "Copyright (c) 1996,1997,1998 Ralf S. Engelschall \n"); fprintf(stdout, "\n"); fprintf(stdout, "This program is distributed in the hope that it will be useful,\n"); fprintf(stdout, "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); fprintf(stdout, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either\n"); fprintf(stdout, "the Artistic License or the GNU General Public License for more details.\n"); fprintf(stdout, "\n"); } void give_version_extended(void) { give_version(); fprintf(stdout, "Characteristics of this binary:\n"); fprintf(stdout, " Perl Version : %s (%s)\n", AC_perl_vers, AC_perl_prog); fprintf(stdout, " Perl I/O Layer : %s\n", PERL_IO_LAYER_ID); fprintf(stdout, " Perl Library : %s/CORE/libperl.a\n", AC_perl_archlib); fprintf(stdout, " Perl DynaLoader : %s\n", AC_perl_dla); fprintf(stdout, " System Libs : %s\n", AC_perl_libs); fprintf(stdout, " Built User : %s\n", AC_build_user); fprintf(stdout, " Built Time : %s\n", AC_build_time_iso); fprintf(stdout, "\n"); } void give_readme(void) { fprintf(stdout, ePerl_README); } void give_license(void) { fprintf(stdout, ePerl_LICENSE); } void give_img_logo(void) { if (mode == MODE_NPHCGI) HTTP_PrintResponseHeaders(""); printf("Content-Type: image/gif\n\n"); fwrite(ePerl_LOGO_data, ePerl_LOGO_size, 1, stdout); } void give_img_powered(void) { if (mode == MODE_NPHCGI) HTTP_PrintResponseHeaders(""); printf("Content-Type: image/gif\n\n"); fwrite(ePerl_POWERED_data, ePerl_POWERED_size, 1, stdout); } void give_usage(char *name) { fprintf(stderr, "Usage: %s [options] [scriptfile]\n", name); fprintf(stderr, "\n"); fprintf(stderr, "Input Options:\n"); fprintf(stderr, " -d, --define=NAME=VALUE define global Perl variable ($main::name)\n"); fprintf(stderr, " -D, --setenv=NAME=VALUE define environment variable ($ENV{'name'})\n"); fprintf(stderr, " -I, --includedir=PATH add @INC/#include directory\n"); fprintf(stderr, " -B, --block-begin=STR set begin block delimiter\n"); fprintf(stderr, " -E, --block-end=STR set end block delimiter\n"); fprintf(stderr, " -n, --nocase force block delimiters to be case insensitive\n"); fprintf(stderr, " -k, --keepcwd force keeping of current working directory\n"); fprintf(stderr, " -P, --preprocess enable ePerl Preprocessor\n"); fprintf(stderr, " -C, --convert-entity enable HTML entity conversion for ePerl blocks\n"); fprintf(stderr, " -L, --line-continue enable line continuation via backslashes\n"); fprintf(stderr, "\n"); fprintf(stderr, "Output Options:\n"); fprintf(stderr, " -T, --tainting enable Perl Tainting\n"); fprintf(stderr, " -w, --warnings enable Perl Warnings\n"); fprintf(stderr, " -x, --debug enable ePerl debugging output on console\n"); fprintf(stderr, " -m, --mode=STR force runtime mode to FILTER, CGI or NPH-CGI\n"); fprintf(stderr, " -o, --outputfile=PATH force the output to be send to this file (default=stdout)\n"); fprintf(stderr, " -c, --check run syntax check only and exit (no execution)\n"); fprintf(stderr, "\n"); fprintf(stderr, "Giving Feedback:\n"); fprintf(stderr, " -r, --readme display ePerl README file\n"); fprintf(stderr, " -l, --license display ePerl license files (COPYING and ARTISTIC)\n"); fprintf(stderr, " -v, --version display ePerl VERSION id\n"); fprintf(stderr, " -V, --ingredients display ePerl VERSION id & compilation parameters\n"); fprintf(stderr, " -h, --help display ePerl usage list (this one)\n"); fprintf(stderr, "\n"); } char *RememberedINC[1024] = { NULL }; void RememberINC(char *str) { int i; for (i = 0; RememberedINC[i] != NULL; i++) ; RememberedINC[i++] = strdup(str); RememberedINC[i++] = NULL; return; } void mysighandler(int rc) { /* ignore more signals */ signal(SIGINT, SIG_IGN); signal(SIGTERM, SIG_IGN); /* restore filehandles */ IO_restore_stdout(); IO_restore_stderr(); /* give interrupt information */ fprintf(stderr, "ePerl: **INTERRUPT**\n"); /* exit immediately */ myexit(EX_FAIL); } void myinit(void) { /* caught signals */ signal(SIGINT, mysighandler); signal(SIGTERM, mysighandler); } void myexit(int rc) { /* cleanup */ #ifndef DEBUG_ENABLED remove_mytmpfiles(); #endif /* restore signals */ signal(SIGINT, SIG_DFL); signal(SIGTERM, SIG_DFL); #ifdef DEBUG_ENABLED #ifdef HAVE_DMALLOC dmalloc_shutdown(); #endif #endif /* die gracefully */ exit(rc); } struct option options[] = { { "define", 1, NULL, 'd' }, { "setenv", 1, NULL, 'D' }, { "includedir", 1, NULL, 'I' }, { "block-begin", 1, NULL, 'B' }, { "block-end", 1, NULL, 'E' }, { "nocase", 0, NULL, 'n' }, { "keepcwd", 0, NULL, 'k' }, { "preprocess", 0, NULL, 'P' }, { "convert-entity", 0, NULL, 'C' }, { "line-continue", 0, NULL, 'L' }, { "tainting", 0, NULL, 'T' }, { "warnings", 0, NULL, 'w' }, { "debug", 0, NULL, 'x' }, { "mode", 1, NULL, 'm' }, { "outputfile", 1, NULL, 'o' }, { "check", 0, NULL, 'c' }, { "readme", 0, NULL, 'r' }, { "license", 0, NULL, 'l' }, { "version", 0, NULL, 'v' }, { "ingredients", 0, NULL, 'V' }, { "help", 0, NULL, 'h' } }; /* * main procedure */ int main(int argc, char **argv, char **env) { DECL_EXRC; FILE *fp = NULL; FILE *er = NULL; FILE *out = NULL; char *cpBuf = NULL; char *cpBuf2 = NULL; char *cpBuf3 = NULL; char perlscript[1024] = ""; char perlstderr[1024] = ""; char perlstdout[1024] = ""; char dir_tmp[1024]; char *dir_home; char *dir_script; char ca[1024] = ""; int myargc; char *myargv[20]; char *progname; int nBuf; int nOut; char *source = NULL; char sourcedir[2048]; char *cp; static PerlInterpreter *my_perl = NULL; struct stat st; char *cpOut = NULL; int size; struct passwd *pw; struct passwd *pw2; struct group *gr; int uid, gid; int keepcwd = FALSE; int c; char *cpScript = NULL; int allow; int i, n, k; char *outputfile = NULL; char cwd[MAXPATHLEN]; int fCheck = FALSE; int fTaint = FALSE; int fWarn = FALSE; int fNoCase = FALSE; int fPP = FALSE; char *cwd2; int fOkSwitch; char *cpHost; char *cpPort; char *cpPath; char *cpCGIgi; char *cpCGIpt; char *cpCGIqs; int fCGIqsEqualChar; /* first step: our process initialisation */ myinit(); /* second step: canonicalize program name */ progname = argv[0]; if ((cp = strrchr(progname, '/')) != NULL) { progname = cp+1; } /* parse the option arguments */ opterr = 0; while ((c = getopt_long(argc, argv, ":d:D:I:B:E:nkPCLTwxm:o:crlvVh", options, NULL)) != -1) { if (optarg == NULL) optarg = "(null)"; switch (c) { case 'd': Perl5_RememberScalar(optarg); break; case 'D': env = Perl5_SetEnvVar(env, optarg); break; case 'I': RememberINC(optarg); break; case 'B': ePerl_begin_delimiter = strdup(optarg); break; case 'E': ePerl_end_delimiter = strdup(optarg); break; case 'n': fNoCase = TRUE; break; case 'k': keepcwd = TRUE; break; case 'P': fPP = TRUE; break; case 'C': ePerl_convert_entities = TRUE; break; case 'L': ePerl_line_continuation = TRUE; break; case 'T': fTaint = TRUE; break; case 'w': fWarn = TRUE; break; case 'x': fDebug = TRUE; break; case 'm': if (strcasecmp(optarg, "f") == 0 || strcasecmp(optarg, "filter") == 0 ) { mode = MODE_FILTER; } else if (strcasecmp(optarg, "c") == 0 || strcasecmp(optarg, "cgi") == 0 ) { mode = MODE_CGI; } else if (strcasecmp(optarg, "n") == 0 || strcasecmp(optarg, "nph") == 0 || strcasecmp(optarg, "nphcgi") == 0 || strcasecmp(optarg, "nph-cgi") == 0 ) { mode = MODE_NPHCGI; } else { PrintError(mode, "", NULL, NULL, "Unknown runtime mode `%s'", optarg); CU(EX_USAGE); } break; case 'o': outputfile = strdup(optarg); break; case 'c': fCheck = TRUE; break; case 'r': give_readme(); myexit(EX_OK); case 'l': give_license(); myexit(EX_OK); case 'v': give_version(); myexit(EX_OK); case 'V': give_version_extended(); myexit(EX_OK); case 'h': give_usage(progname); myexit(EX_OK); case '?': if (isprint(optopt)) fprintf(stderr, "ePerl:Error: Unknown option `-%c'.\n", optopt); else fprintf(stderr, "ePerl:Error: Unknown option character `\\x%x'.\n", optopt); fprintf(stderr, "Try `%s --help' for more information.\n", progname); myexit(EX_USAGE); case ':': if (isprint(optopt)) fprintf(stderr, "ePerl:Error: Missing argument for option `-%c'.\n", optopt); else fprintf(stderr, "ePerl:Error: Missing argument for option character `\\x%x'.\n", optopt); fprintf(stderr, "Try `%s --help' for more information.\n", progname); myexit(EX_USAGE); } } /* * determine source filename and runtime mode */ if ((cpCGIgi = getenv("GATEWAY_INTERFACE")) == NULL) cpCGIgi = ""; if ((cpCGIpt = getenv("PATH_TRANSLATED")) == NULL) cpCGIpt = ""; if ((cpCGIqs = getenv("QUERY_STRING")) == NULL) cpCGIqs = ""; fCGIqsEqualChar = FALSE; if (cpCGIqs != NULL && strchr(cpCGIqs, '=') != NULL) fCGIqsEqualChar = TRUE; /* * Server-Side-Scripting-Language: * * Request: * /url/to/nph-eperl/url/to/script.phtml[?query-string] * Environment: * GATEWAY_INTERFACE=CGI/1.1 * SCRIPT_NAME=/url/to/nph-eperl * SCRIPT_FILENAME=/path/to/nph-eperl * PATH_INFO=/url/to/script.phtml * PATH_TRANSLATED=/path/to/script.phtml * a) QUERY_STRING="" * optind=argc * b) QUERY_STRING=query-string (containing "=" char) * optind=argc * c) QUERY_STRING=query-string (containing NO "=" char) * optind=argc-1 * argv[optind]=query-string */ if ( cpCGIgi[0] != NUL && cpCGIpt[0] != NUL && ( ( optind == argc && ( cpCGIqs[0] == NUL || fCGIqsEqualChar ) ) || ( optind == argc-1 && !fCGIqsEqualChar && stringEQ(argv[optind], cpCGIqs) ) ) ) { if (strncasecmp(cpCGIgi, "CGI/1", 5) != 0) { fprintf(stderr, "ePerl:Error: Unknown gateway interface: NOT CGI/1.x\n"); CU(EX_IOERR); } /* CGI/1.1 or NPH-CGI/1.1 script, source in PATH_TRANSLATED. */ source = cpCGIpt; /* determine whether pure CGI or NPH-CGI mode */ if ((cp = getenv("SCRIPT_FILENAME")) != NULL) { strcpy(ca, cp); if ((cp = strrchr(ca, '/')) != NULL) *cp++ = NUL; else cp = ca; if (strncasecmp(cp, "nph-", 4) == 0) mode = (mode == MODE_UNKNOWN ? MODE_NPHCGI : mode); else mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); } else { mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); } /* set the command line for ``ps'' output */ sprintf(ca, "%s %s [%sCGI/SSSL]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); argv[0] = strdup(ca); } /* * Stand-Alone inside Webserver environment: * * Request: * /url/to/script.cgi[/path-info][?query-string] * [script.cgi has shebang #!/path/to/eperl] * Environment: * GATEWAY_INTERFACE=CGI/1.1 * SCRIPT_NAME=/url/to/script.cgi * SCRIPT_FILENAME=/path/to/script.cgi * PATH_INFO=/path-info * PATH_TRANSLATED=/path/to/docroot/path-info * a) QUERY_STRING="" * optind=argc-1 * argv[optind]=/path/to/script.cgi * b) QUERY_STRING=query-string (containing "=" char) * optind=argc-1 * argv[optind]=/path/to/script.cgi * c) QUERY_STRING=query-string (containing NO "=" char) * optind=argc-2 * argv[optind]=/path/to/script.cgi * argv[optind+1]=query-string */ else if ( cpCGIgi[0] != NUL && ( ( optind == argc-1 && ( cpCGIqs[0] == NUL || fCGIqsEqualChar ) ) || ( optind == argc-2 && !fCGIqsEqualChar && stringEQ(argv[optind+1], cpCGIqs)) ) ) { if (strncasecmp(cpCGIgi, "CGI/1", 5) != 0) { fprintf(stderr, "ePerl:Error: Unknown gateway interface: NOT CGI/1.x\n"); CU(EX_IOERR); } /* CGI/1.1 or NPH-CGI/1.1 script, source in ARGV */ source = argv[optind]; /* determine whether pure CGI or NPH-CGI mode */ if ((cp = getenv("SCRIPT_FILENAME")) != NULL) { strcpy(ca, cp); if ((cp = strrchr(ca, '/')) != NULL) *cp++ = NUL; else cp = ca; if (strncasecmp(cp, "nph-", 4) == 0) mode = (mode == MODE_UNKNOWN ? MODE_NPHCGI : mode); else mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); } else { mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); } /* set the command line for ``ps'' output */ sprintf(ca, "%s %s [%sCGI/stand-alone]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); argv[0] = strdup(ca); } /* * Stand-Alone outside Webserver environment: * * Request: * eperl script * Environment: * GATEWAY_INTERFACE="" * SCRIPT_NAME="" * SCRIPT_FILENAME="" * PATH_INFO="" * PATH_TRANSLATED="" * QUERY_STRING="" * optind=argc-1 * argv[optind]=script */ else if ( cpCGIgi[0] == NUL && cpCGIpt[0] == NUL && cpCGIqs[0] == NUL && optind == argc-1 ) { /* stand-alone filter, source as argument: either manually on the console or via shebang */ source = argv[optind]; mode = (mode == MODE_UNKNOWN ? MODE_FILTER : mode); /* provide flexibility by recognizing "-" for stdin */ if (stringEQ(source, "-")) { /* store stdin to tmpfile */ source = mytmpfile("ePerl.stdin"); if ((fp = fopen(source, "w")) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open tmpfile `%s' for writing", source); CU(EX_IOERR); } while ((c = fgetc(stdin)) != EOF) { fputc(c, fp); } fclose(fp); fp = NULL; /* stdin script implies keeping of cwd */ keepcwd = TRUE; } } /* * Any other calling environment is an error... */ else { fprintf(stderr, "ePerl:Error: Missing required file to process\n"); fprintf(stderr, "ePerl:Error: Use either a filename, `-' for STDIN or PATH_TRANSLATED.\n"); fprintf(stderr, "Try `%s --help' for more information.\n", progname); myexit(EX_USAGE); } /* set default delimiters */ if (ePerl_begin_delimiter == NULL) { if (mode == MODE_FILTER) ePerl_begin_delimiter = BEGIN_DELIMITER_FILTER; else ePerl_begin_delimiter = BEGIN_DELIMITER_CGI; } if (ePerl_end_delimiter == NULL) { if (mode == MODE_FILTER) ePerl_end_delimiter = END_DELIMITER_FILTER; else ePerl_end_delimiter = END_DELIMITER_CGI; } if (fNoCase) ePerl_case_sensitive_delimiters = FALSE; else ePerl_case_sensitive_delimiters = TRUE; /* the built-in GIF images */ if ((mode == MODE_CGI || mode == MODE_NPHCGI) && (cp = getenv("PATH_INFO")) != NULL) { if (stringEQ(cp, "/logo.gif")) { give_img_logo(); myexit(0); } else if (stringEQ(cp, "/powered.gif")) { give_img_powered(); myexit(0); } } /* CGI modes imply - Preprocessor usage - HTML entity conversions - adding of DOCUMENT_ROOT to include paths */ if (mode == MODE_CGI || mode == MODE_NPHCGI) { fPP = TRUE; ePerl_convert_entities = TRUE; if ((cp = getenv("DOCUMENT_ROOT")) != NULL) RememberINC(cp); } /* check for valid source file */ if (*source == NUL) { PrintError(mode, "", NULL, NULL, "Filename is empty"); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } /* check for existing source file */ if ((stat(source, &st)) != 0) { PrintError(mode, source, NULL, NULL, "File `%s' not exists", source); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } /* * Security Checks for the CGI modes */ if (mode == MODE_CGI || mode == MODE_NPHCGI) { /* * * == General Security == * */ /* general security check: allowed file extension */ if (CGI_NEEDS_ALLOWED_FILE_EXT) { allow = FALSE; n = strlen(source); for (i = 0; allowed_file_ext[i] != NULL; i++) { k = strlen(allowed_file_ext[i]); if (stringEQ(source+n-k, allowed_file_ext[i])) allow = TRUE; } if (!allow) { PrintError(mode, source, NULL, NULL, "File `%s' is not allowed to be interpreted by ePerl (wrong extension!)", source); CU(EX_OK); } } /* * * == Perl Security == * */ /* perhaps force Taint mode */ if (CGI_MODES_FORCE_TAINTING) fTaint = TRUE; /* perhaps force Warnings */ if (CGI_MODES_FORCE_WARNINGS) fWarn = TRUE; /* * * == UID/GID switching == * */ /* we can only do a switching if we have euid == 0 (root) */ if (geteuid() == 0) { fOkSwitch = TRUE; /* get our real user id (= caller uid) */ uid = getuid(); /* security check: valid caller uid */ pw = getpwuid(uid); if (SETUID_NEEDS_VALID_CALLER_UID && pw == NULL) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid UID %d of caller", uid); CU(EX_OK); } else fOkSwitch = FALSE; } else { /* security check: allowed caller uid */ if (SETUID_NEEDS_ALLOWED_CALLER_UID) { allow = FALSE; for (i = 0; allowed_caller_uid[i] != NULL; i++) { if (isdigit(allowed_caller_uid[i][0])) pw2 = getpwuid(atoi(allowed_caller_uid[i])); else pw2 = getpwnam(allowed_caller_uid[i]); if (stringEQ(pw->pw_name, pw2->pw_name)) { allow = TRUE; break; } } if (!allow) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "UID %d of caller not allowed", uid); CU(EX_OK); } else fOkSwitch = FALSE; } } } /* security check: valid owner UID */ pw = getpwuid(st.st_uid); if (SETUID_NEEDS_VALID_OWNER_UID && pw == NULL) if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid UID %d of owner", st.st_uid); CU(EX_OK); } else fOkSwitch = FALSE; else uid = pw->pw_uid; /* security check: valid owner GID */ gr = getgrgid(st.st_gid); if (SETUID_NEEDS_VALID_OWNER_GID && gr == NULL) if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid GID %d of owner", st.st_gid); CU(EX_OK); } else fOkSwitch = FALSE; else gid = gr->gr_gid; /* security check: file has to stay below owner homedir */ if (fOkSwitch && SETUID_NEEDS_BELOW_OWNER_HOME) { /* preserve current working directory */ cwd2 = getcwd(NULL, 1024); /* determine physical homedir of owner */ pw = getpwuid(st.st_uid); if (chdir(pw->pw_dir) == -1) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid homedir ``%s'' of file owner", pw->pw_dir); CU(EX_OK); } else fOkSwitch = FALSE; } else { dir_home = getcwd(NULL, 1024); /* determine physical dir of file */ strcpy(dir_tmp, source); if ((cp = strrchr(dir_tmp, '/')) == NULL) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': no absolute path", source); CU(EX_OK); } else fOkSwitch = FALSE; } else { *cp = NUL; if (chdir(dir_tmp) == -1) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': cannot chdir to its location", source); CU(EX_OK); } else fOkSwitch = FALSE; } else { dir_script = getcwd(NULL, 1024); /* dir_home has to be a prefix of dir_script */ if (strncmp(dir_script, dir_home, strlen(dir_home)) < 0) { if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': does not stay below homedir of owner", source); CU(EX_OK); } else fOkSwitch = FALSE; } free(dir_script); } } free(dir_home); } /* restore original cwd */ chdir(cwd2); free(cwd2); } if (fOkSwitch && uid != 0 && gid != 0) { /* switch to new uid/gid */ if (((setgid(gid)) != 0) || (initgroups(pw->pw_name,gid) != 0)) { PrintError(mode, source, NULL, NULL, "Unable to set GID %d: setgid/initgroups failed", gid); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } if ((setuid(uid)) != 0) { PrintError(mode, source, NULL, NULL, "Unable to set UID %d: setuid failed", uid); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } } } } /* Security! Eliminate effective root permissions if we are running setuid */ if (geteuid() == 0) { uid = getuid(); gid = getgid(); #ifdef HAVE_SETEUID seteuid(uid); #else /* HP/UX and others eliminate the effective UID with setuid(uid) ! */ setuid(uid); #endif #ifdef HAVE_SETEGID setegid(uid); #else /* HP/UX and others eliminate the effective GID with setgid(gid) ! */ setgid(gid); #endif } /* read source file into internal buffer */ if ((cpBuf = ePerl_ReadSourceFile(source, &cpBuf, &nBuf)) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open source file `%s' for reading\n%s", source, ePerl_GetError); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } /* strip shebang prefix */ if (strncmp(cpBuf, "#!", 2) == 0) { for (cpScript = cpBuf; (*cpScript != ' ' && *cpScript != '\t' && *cpScript != '\n') && (cpScript-cpBuf < nBuf); cpScript++) ; for (cpScript = cpBuf; *cpScript != '\n' && (cpScript-cpBuf < nBuf); cpScript++) ; cpScript++; } else cpScript = cpBuf; /* now set the additional env vars */ env = mysetenv(env, "SCRIPT_SRC_PATH", "%s", abspath(source)); env = mysetenv(env, "SCRIPT_SRC_PATH_FILE", "%s", filename(source)); env = mysetenv(env, "SCRIPT_SRC_PATH_DIR", "%s", abspath(dirname(source))); if ((cpPath = getenv("PATH_INFO")) != NULL) { if ((cpHost = getenv("SERVER_NAME")) == NULL) cpHost = "localhost"; cpPort = getenv("SERVER_PORT"); if (stringEQ(cpPort, "80")) cpPort = NULL; sprintf(ca, "http://%s%s%s%s", cpHost, cpPort != NULL ? ":" : "", cpPort != NULL ? cpPort : "", cpPath); env = mysetenv(env, "SCRIPT_SRC_URL", "%s", ca); env = mysetenv(env, "SCRIPT_SRC_URL_FILE", "%s", filename(ca)); env = mysetenv(env, "SCRIPT_SRC_URL_DIR", "%s", dirname(ca)); } else { env = mysetenv(env, "SCRIPT_SRC_URL", "file://%s", abspath(source)); env = mysetenv(env, "SCRIPT_SRC_URL_FILE", "%s", filename(source)); env = mysetenv(env, "SCRIPT_SRC_URL_DIR", "file://%s", abspath(source)); } env = mysetenv(env, "SCRIPT_SRC_SIZE", "%d", nBuf); stat(source, &st); env = mysetenv(env, "SCRIPT_SRC_MODIFIED", "%d", st.st_mtime); cp = ctime(&(st.st_mtime)); cp[strlen(cp)-1] = NUL; env = mysetenv(env, "SCRIPT_SRC_MODIFIED_CTIME", "%s", cp); env = mysetenv(env, "SCRIPT_SRC_MODIFIED_ISOTIME", "%s", isotime(&(st.st_mtime))); if ((pw = getpwuid(st.st_uid)) != NULL) env = mysetenv(env, "SCRIPT_SRC_OWNER", "%s", pw->pw_name); else env = mysetenv(env, "SCRIPT_SRC_OWNER", "unknown-uid-%d", st.st_uid); env = mysetenv(env, "VERSION_INTERPRETER", "%s", ePerl_WebID); env = mysetenv(env, "VERSION_LANGUAGE", "Perl/%s", AC_perl_vers); /* optionally run the ePerl preprocessor */ if (fPP) { /* switch to directory where script stays */ getcwd(cwd, MAXPATHLEN); strcpy(sourcedir, source); for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) ; *cp = NUL; chdir(sourcedir); /* run the preprocessor */ if ((cpBuf3 = ePerl_PP(cpScript, RememberedINC)) == NULL) { PrintError(mode, source, NULL, NULL, "Preprocessing failed for `%s': %s", source, ePerl_PP_GetError()); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } cpScript = cpBuf3; /* switch to previous dir */ chdir(cwd); } /* convert bristled source to valid Perl code */ if ((cpBuf2 = ePerl_Bristled2Plain(cpScript)) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot convert bristled code file `%s' to pure HTML", source); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } cpScript = cpBuf2; /* write buffer to temporary script file */ strcpy(perlscript, mytmpfile("ePerl.script")); #ifndef DEBUG_ENABLED unlink(perlscript); #endif if ((fp = fopen(perlscript, "w")) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open Perl script file `%s' for writing", perlscript); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } fwrite(cpScript, strlen(cpScript), 1, fp); fclose(fp); fp = NULL; /* in Debug mode output the script to the console */ if (fDebug) { if ((fp = fopen("/dev/tty", "w")) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open /dev/tty for debugging message"); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } fprintf(fp, "----internally created Perl script-----------------------------------\n"); fwrite(cpScript, strlen(cpScript)-1, 1, fp); if (cpScript[strlen(cpScript)-1] == '\n') fprintf(fp, "%c", cpScript[strlen(cpScript)-1]); else fprintf(fp, "%c\n", cpScript[strlen(cpScript)-1]); fprintf(fp, "----internally created Perl script-----------------------------------\n"); fclose(fp); fp = NULL; } /* open a file for Perl's STDOUT channel and redirect stdout to the new channel */ strcpy(perlstdout, mytmpfile("ePerl.stdout")); #ifndef DEBUG_ENABLED unlink(perlstdout); #endif if ((out = fopen(perlstdout, "w")) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for writing", perlstdout); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } IO_redirect_stdout(out); /* open a file for Perl's STDERR channel and redirect stderr to the new channel */ strcpy(perlstderr, mytmpfile("ePerl.stderr")); #ifndef DEBUG_ENABLED unlink(perlstderr); #endif if ((er = fopen(perlstderr, "w")) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open STDERR file `%s' for writing", perlstderr); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } IO_redirect_stderr(er); /* now allocate the Perl interpreter */ my_perl = perl_alloc(); perl_construct(my_perl); /* perl_destruct_level = 1; */ /* initialise the Perl Locale environment */ #if AC_perl_vnum < 500400 perl_init_i18nl14n(1); /* Perl 5.003 or lower */ #else perl_init_i18nl10n(1); /* Perl 5.004 or higher */ #endif /* create command line... */ myargc = 0; /* - program name and possible -T -w options */ myargv[myargc++] = progname; if (fTaint) myargv[myargc++] = "-T"; if (fWarn) myargv[myargc++] = "-w"; /* - previously remembered Perl 5 INC entries (option -I) */ for (i = 0; RememberedINC[i] != NULL; i++) { myargv[myargc++] = "-I"; myargv[myargc++] = RememberedINC[i]; } /* - and the script itself */ myargv[myargc++] = perlscript; /* now parse the script! NOTICE: At this point, the script gets only _parsed_, not evaluated/executed! */ #ifdef HAVE_PERL_DYNALOADER rc = perl_parse(my_perl, Perl5_XSInit, myargc, myargv, env); #else rc = perl_parse(my_perl, NULL, myargc, myargv, env); #endif if (rc != 0) { if (fCheck && mode == MODE_FILTER) { fclose(er); er = NULL; IO_restore_stdout(); IO_restore_stderr(); if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) { fprintf(stderr, cpBuf); } CU(EX_IOERR); } else { fclose(er); er = NULL; PrintError(mode, source, perlscript, perlstderr, "Perl parsing error (interpreter rc=%d)", rc); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } } /* Stop when we are just doing a syntax check */ if (fCheck && mode == MODE_FILTER) { fclose(er); er = NULL; IO_restore_stdout(); IO_restore_stderr(); fprintf(stderr, "%s syntax OK\n", source); CU(EX_OK); } /* change to directory of script: this actually is not important to us, but really useful for the ePerl source file programmer!! */ cwd[0] = NUL; if (!keepcwd) { /* if running as a Unix filter remember the cwd for outputfile */ if (mode == MODE_FILTER) getcwd(cwd, MAXPATHLEN); /* determine dir of source file and switch to it */ strcpy(sourcedir, source); for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) ; *cp = NUL; chdir(sourcedir); } /* Set the previously remembered Perl 5 scalars (option -d) */ Perl5_SetRememberedScalars(); /* Force unbuffered I/O */ Perl5_ForceUnbufferedStdout(); /* NOW IT IS TIME to evaluate/execute the script!!! */ rc = perl_run(my_perl); /* pre-close the handles, to be able to check its size and to be able to display the contents */ fclose(out); out = NULL; fclose(er); er = NULL; /* when the Perl interpreter failed or there is data on stderr, we print a error page */ if (stat(perlstderr, &st) == 0) size = st.st_size; else size = 0; if (rc != 0 || size > 0) { PrintError(mode, source, perlscript, perlstderr, "Perl runtime error (interpreter rc=%d)", rc); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } /* else all processing was fine, so we read in the stdout contents */ if ((cpOut = ePerl_ReadSourceFile(perlstdout, &cpOut, &nOut)) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for reading", perlstdout); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } stat(perlstdout, &st); /* ok, now recover the stdout and stderr and print out the real contents on stdout or outputfile */ IO_restore_stdout(); IO_restore_stderr(); /* if we are running as a NPH-CGI/1.1 script we had to provide the HTTP reponse headers ourself */ if (mode == MODE_NPHCGI) { HTTP_PrintResponseHeaders(cpOut); /* if there are no HTTP header lines, we print a basic Content-Type header which should be ok */ if (!HTTP_HeadersExists(cpOut)) { printf("Content-Type: text/html\n"); printf("Content-Length: %d\n", nOut); printf("\n"); } } else if (mode == MODE_CGI) { HTTP_StripResponseHeaders(&cpOut, &nOut); /* if there are no HTTP header lines, we print a basic Content-Type header which should be ok */ if (!HTTP_HeadersExists(cpOut)) { printf("Content-Type: text/html\n"); printf("Content-Length: %d\n", nOut); printf("\n"); } } else if (mode == MODE_FILTER) { HTTP_StripResponseHeaders(&cpOut, &nOut); } /* now when the request was not a HEAD request we create the output */ cp = getenv("REQUEST_METHOD"); if (! ((mode == MODE_CGI || mode == MODE_NPHCGI) && cp != NULL && stringEQ(cp, "HEAD"))) { if (outputfile != NULL && stringNE(outputfile, "-")) { /* if we remembered current working dir, restore it now */ if (mode == MODE_FILTER && cwd[0] != NUL) chdir(cwd); /* open outputfile and write out the data */ if ((fp = fopen(outputfile, "w")) == NULL) { PrintError(mode, source, NULL, NULL, "Cannot open output file `%s' for writing", outputfile); CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); } fwrite(cpOut, nOut, 1, fp); fclose(fp); fp = NULL; } else { /* data just goes to stdout */ fwrite(cpOut, nOut, 1, stdout); /* make sure that the data is out before we exit */ fflush(stdout); } } CUS: /* the Clean Up Sequence */ /* Ok, the script got evaluated. Now we can destroy and de-allocate the Perl interpreter */ if (my_perl) { perl_destruct(my_perl); perl_free(my_perl); } /* close all still open file handles */ if (out) fclose(out); if (er) fclose(er); if (fp) fclose(fp); /* de-allocate the script buffer */ if (cpBuf) free(cpBuf); if (cpBuf2) free(cpBuf2); if (cpOut) free(cpOut); /* remove temporary files */ #ifndef DEBUG_ENABLED if (*perlstderr != NUL) unlink(perlstderr); if (*perlstdout != NUL) unlink(perlstdout); if (*perlscript != NUL) unlink(perlscript); #endif myexit(EXRC); return EXRC; /* make -Wall happy ;-) */ } /*EOF*/ eperl-2.2.14/eperl_parse.c100664 1750 1750 43665 6551343730 131200ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_parse.c -- ePerl parser stuff */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_proto.h" /* ** ** Static Data ** */ char *ePerl_begin_delimiter = NULL; char *ePerl_end_delimiter = NULL; int ePerl_case_sensitive_delimiters = TRUE; int ePerl_convert_entities = FALSE; int ePerl_line_continuation = FALSE; static char ePerl_ErrorString[1024] = ""; /* ** ** Functions ** */ /* ** set ePerl error string */ void ePerl_SetError(char *str, ...) { va_list ap; va_start(ap, str); vsprintf(ePerl_ErrorString, str, ap); va_end(ap); return; } /* ** get ePerl error string */ char *ePerl_GetError(void) { return ePerl_ErrorString; } /* ** fprintf for internal buffer */ char *ePerl_fprintf(char *cpOut, char *str, ...) { va_list ap; va_start(ap, str); vsprintf(cpOut, str, ap); va_end(ap); return cpOut+strlen(cpOut); } /* ** fwrite for internal buffer */ char *ePerl_fwrite(char *cpBuf, int nBuf, int cNum, char *cpOut) { char *cp; int n; n = nBuf*cNum; (void)strncpy(cpOut, cpBuf, n); cp = cpOut + n; *cp = NUL; return cp; } /* ** fwrite for internal buffer WITH character escaping */ char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut) { char *cpI; char *cpO; for (cpI = cpBuf, cpO = cpOut; cpI < (cpBuf+(nBuf*cNum)); ) { switch (*cpI) { case '"': *cpO++ = '\\'; *cpO++ = *cpI++; break; case '@': *cpO++ = '\\'; *cpO++ = *cpI++; break; case '$': *cpO++ = '\\'; *cpO++ = *cpI++; break; case '\\': *cpO++ = '\\'; *cpO++ = *cpI++; break; case '\t': *cpO++ = '\\'; *cpO++ = 't'; cpI++; break; case '\n': *cpO++ = '\\'; *cpO++ = 'n'; cpI++; break; default: *cpO++ = *cpI++; } } *cpO = NUL; return cpO; } /* ** fwrite for internal buffer WITH HTML entity conversion */ struct html2char { char *h; char c; }; static struct html2char html2char[] = { { "copy", '©' }, /* Copyright */ { "die", '¨' }, /* Diæresis / Umlaut */ { "laquo", '«' }, /* Left angle quote, guillemot left */ { "not", '¬' }, /* Not sign */ { "ordf", 'ª' }, /* Feminine ordinal */ { "sect", '§' }, /* Section sign */ { "um", '¨' }, /* Diæresis / Umlaut */ { "AElig", 'Æ' }, /* Capital AE ligature */ { "Aacute", 'Á' }, /* Capital A, acute accent */ { "Acirc", 'Â' }, /* Capital A, circumflex */ { "Agrave", 'À' }, /* Capital A, grave accent */ { "Aring", 'Å' }, /* Capital A, ring */ { "Atilde", 'Ã' }, /* Capital A, tilde */ { "Auml", 'Ä' }, /* Capital A, diæresis / umlaut */ { "Ccedil", 'Ç' }, /* Capital C, cedilla */ { "ETH", 'Ð' }, /* Capital Eth, Icelandic */ { "Eacute", 'É' }, /* Capital E, acute accent */ { "Ecirc", 'Ê' }, /* Capital E, circumflex */ { "Egrave", 'È' }, /* Capital E, grave accent */ { "Euml", 'Ë' }, /* Capital E, diæresis / umlaut */ { "Iacute", 'Í' }, /* Capital I, acute accent */ { "Icirc", 'Î' }, /* Capital I, circumflex */ { "Igrave", 'Ì' }, /* Capital I, grave accent */ { "Iuml", 'Ï' }, /* Capital I, diæresis / umlaut */ { "Ntilde", 'Ñ' }, /* Capital N, tilde */ { "Oacute", 'Ó' }, /* Capital O, acute accent */ { "Ocirc", 'Ô' }, /* Capital O, circumflex */ { "Ograve", 'Ò' }, /* Capital O, grave accent */ { "Oslash", 'Ø' }, /* Capital O, slash */ { "Otilde", 'Õ' }, /* Capital O, tilde */ { "Ouml", 'Ö' }, /* Capital O, diæresis / umlaut */ { "THORN", 'Þ' }, /* Capital Thorn, Icelandic */ { "Uacute", 'Ú' }, /* Capital U, acute accent */ { "Ucirc", 'Û' }, /* Capital U, circumflex */ { "Ugrave", 'Ù' }, /* Capital U, grave accent */ { "Uuml", 'Ü' }, /* Capital U, diæresis / umlaut */ { "Yacute", 'Ý' }, /* Capital Y, acute accent */ { "aacute", 'ß' }, /* Small a, acute accent */ { "acirc", 'â' }, /* Small a, circumflex */ { "acute", '´' }, /* Acute accent */ { "aelig", 'æ' }, /* Small ae ligature */ { "agrave", 'à' }, /* Small a, grave accent */ { "amp", '&' }, /* Ampersand */ { "aring", 'å' }, /* Small a, ring */ { "atilde", 'ã' }, /* Small a, tilde */ { "auml", 'ä' }, /* Small a, diæresis / umlaut */ { "brkbar", '¦' }, /* Broken vertical bar */ { "brvbar", '¦' }, /* Broken vertical bar */ { "ccedil", 'ç' }, /* Small c, cedilla */ { "cedil", '¸' }, /* Cedilla */ { "cent", '¢' }, /* Cent sign */ { "curren", '¤' }, /* General currency sign */ { "deg", '°' }, /* Degree sign */ { "divide", '÷' }, /* Division sign */ { "eacute", 'é' }, /* Small e, acute accent */ { "ecirc", 'ê' }, /* Small e, circumflex */ { "egrave", 'è' }, /* Small e, grave accent */ { "eth", 'ð' }, /* Small eth, Icelandic */ { "euml", 'ë' }, /* Small e, diæresis / umlaut */ { "frac12", '½' }, /* Fraction one-half */ { "frac14", '¼' }, /* Fraction one-fourth */ { "frac34", '¾' }, /* Fraction three-fourths */ { "gt", '>' }, /* Greater than */ { "hibar", '¯' }, /* Macron accent */ { "iacute", 'í' }, /* Small i, acute accent */ { "icirc", 'î' }, /* Small i, circumflex */ { "iexcl", '¡' }, /* Inverted exclamation */ { "igrave", 'ì' }, /* Small i, grave accent */ { "iquest", '¿' }, /* Inverted question mark */ { "iuml", 'ï' }, /* Small i, diæresis / umlaut */ { "lt", '<' }, /* Less than */ { "macr", '¯' }, /* Macron accent */ { "micro", 'µ' }, /* Micro sign */ { "middot", '·' }, /* Middle dot */ { "nbsp", ' ' }, /* Non-breaking Space */ { "ntilde", 'ñ' }, /* Small n, tilde */ { "oacute", 'ó' }, /* Small o, acute accent */ { "ocirc", 'ô' }, /* Small o, circumflex */ { "ograve", 'ò' }, /* Small o, grave accent */ { "ordm", 'º' }, /* Masculine ordinal */ { "oslash", 'ø' }, /* Small o, slash */ { "otilde", 'õ' }, /* Small o, tilde */ { "ouml", 'ö' }, /* Small o, diæresis / umlaut */ { "para", '¶' }, /* Paragraph sign */ { "plusmn", '±' }, /* Plus or minus */ { "pound", '£' }, /* Pound sterling */ { "quot", '"' }, /* Quotation mark */ { "raquo", '»' }, /* Right angle quote, guillemot right */ { "reg", '®' }, /* Registered trademark */ { "shy", '­' }, /* Soft hyphen */ { "sup1", '¹' }, /* Superscript one */ { "sup2", '²' }, /* Superscript two */ { "sup3", '³' }, /* Superscript three */ { "szlig", 'ß' }, /* Small sharp s, German sz */ { "thorn", 'þ' }, /* Small thorn, Icelandic */ { "times", '×' }, /* Multiply sign */ { "uacute", 'ú' }, /* Small u, acute accent */ { "ucirc", 'û' }, /* Small u, circumflex */ { "ugrave", 'ù' }, /* Small u, grave accent */ { "uuml", 'ü' }, /* Small u, diæresis / umlaut */ { "yacute", 'ý' }, /* Small y, acute accent */ { "yen", '¥' }, /* Yen sign */ { "yuml",'\255' }, /* Small y, diæresis / umlaut */ { NULL, NUL } }; char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut) { char *cpI; char *cpO; int i; int n; char *cpE; cpI = cpBuf; cpO = cpOut; cpE = cpBuf+(nBuf*cNum); while (cpI < cpE) { if (*cpI == '&') { for (i = 0; html2char[i].h != NULL; i++) { n = strlen(html2char[i].h); if (cpI+1+n+1 < cpE) { if (*(cpI+1+n) == ';') { if (strncmp(cpI+1, html2char[i].h, n) == 0) { *cpO++ = html2char[i].c; cpI += 1+n+1; continue; } } } } } *cpO++ = *cpI++; } *cpO = NUL; return cpO; } /* ** ** Own string functions with maximum length (n) support ** */ char *strnchr(char *buf, char chr, int n) { char *cp; char *cpe; for (cp = buf, cpe = buf+n-1; cp <= cpe; cp++) { if (*cp == chr) return cp; } return NULL; } char *strnstr(char *buf, char *str, int n) { char *cp; char *cpe; int len; len = strlen(str); for (cp = buf, cpe = buf+n-len; cp <= cpe; cp++) { if (strncmp(cp, str, len) == 0) return cp; } return NULL; } char *strncasestr(char *buf, char *str, int n) { char *cp; char *cpe; int len; len = strlen(str); for (cp = buf, cpe = buf+n-len; cp <= cpe; cp++) { if (strncasecmp(cp, str, len) == 0) return cp; } return NULL; } char *strndup(char *buf, int n) { char *cp; cp = (char *)malloc(n+1); strncpy(cp, buf, n); return cp; } /* ** convert buffer from bristled format to plain format */ char *ePerl_Bristled2Plain(char *cpBuf) { char *rc; char *cpOutBuf = NULL; char *cpOut = NULL; char *cps, *cpe; char *cps2, *cpe2; int nBuf; char *cpEND; int n; if (strlen(cpBuf) == 0) { /* make sure we return a buffer which the caller can free() */ cpOutBuf = (char *)malloc(sizeof(char) * 1); *cpOutBuf = NUL; return cpOutBuf; } nBuf = strlen(cpBuf); cpEND = cpBuf+nBuf; /* allocate memory for the Perl code */ n = sizeof(char) * nBuf * 10; if (nBuf < 1024) n = 16384; if ((cpOutBuf = (char *)malloc(n)) == NULL) { ePerl_SetError("Cannot allocate %d bytes of memory", n); CU(NULL); } cpOut = cpOutBuf; /* now step through the file and convert it to legal Perl code. This is a bit complicated because we have to make sure that we parse the correct delimiters while the delimiter characters could also occur inside the Perl code! */ cps = cpBuf; while (cps < cpEND) { if (ePerl_case_sensitive_delimiters) cpe = strnstr(cps, ePerl_begin_delimiter, cpEND-cps); else cpe = strncasestr(cps, ePerl_begin_delimiter, cpEND-cps); if (cpe == NULL) { /* there are no more ePerl blocks, so just encapsulate the remaining contents into Perl print constructs */ if (cps < cpEND) { cps2 = cps; /* first, do all complete lines */ while (cps2 < cpEND && (cpe2 = strnchr(cps2, '\n', cpEND-cps2)) != NULL) { if (ePerl_line_continuation && cps < cpe2 && *(cpe2-1) == '\\') { if (cpe2-1-cps2 > 0) { cpOut = ePerl_fprintf(cpOut, "print \""); cpOut = ePerl_Efwrite(cps2, cpe2-1-cps2, 1, cpOut); cpOut = ePerl_fprintf(cpOut, "\";"); } cpOut = ePerl_fprintf(cpOut, "\n"); } else { cpOut = ePerl_fprintf(cpOut, "print \""); cpOut = ePerl_Efwrite(cps2, cpe2-cps2, 1, cpOut); cpOut = ePerl_fprintf(cpOut, "\\n\";\n"); } cps2 = cpe2+1; } /* then do the remainder which is not finished by a newline */ if (cpEND > cps2) { cpOut = ePerl_fprintf(cpOut, "print \""); cpOut = ePerl_Efwrite(cps2, cpEND-cps2, 1, cpOut); cpOut = ePerl_fprintf(cpOut, "\";"); } } break; /* and break the whole processing step */ } else { /* Ok, there is at least one more ePerl block */ /* first, encapsulate the content from current pos up to the begin of the ePerl block as print statements */ if (cps < cpe) { cps2 = cps; while ((cpe2 = strnchr(cps2, '\n', cpe-cps2)) != NULL) { if (ePerl_line_continuation && cps < cpe2 && *(cpe2-1) == '\\') { if (cpe2-1-cps2 > 0) { cpOut = ePerl_fprintf(cpOut, "print \""); cpOut = ePerl_Efwrite(cps2, cpe2-1-cps2, 1, cpOut); cpOut = ePerl_fprintf(cpOut, "\";"); } cpOut = ePerl_fprintf(cpOut, "\n"); } else { cpOut = ePerl_fprintf(cpOut, "print \""); cpOut = ePerl_Efwrite(cps2, cpe2-cps2, 1, cpOut); cpOut = ePerl_fprintf(cpOut, "\\n\";\n"); } cps2 = cpe2+1; } if (cpe > cps2) { cpOut = ePerl_fprintf(cpOut, "print \""); cpOut = ePerl_Efwrite(cps2, cpe-cps2, 1, cpOut); cpOut = ePerl_fprintf(cpOut, "\";"); } } /* just output a leading space to make the -x display more readable. */ if (cpOut > cpOutBuf && *(cpOut-1) != '\n') cpOut = ePerl_fprintf(cpOut, " "); /* skip the start delimiter */ cps = cpe+strlen(ePerl_begin_delimiter); /* recognize the 'print' shortcut with '=', * e.g. <:=$var:> */ if (*cps == '=') { cpOut = ePerl_fprintf(cpOut, "print "); cps++; } /* skip all following whitespaces. Be careful: we could skip newlines too, but then the error output will give wrong line numbers!!! */ while (cps < cpEND) { if (*cps != ' ' && *cps != '\t') break; cps++; } cpe = cps; /* move forward to end of ePerl block. */ if (ePerl_case_sensitive_delimiters) cpe = strnstr(cpe, ePerl_end_delimiter, cpEND-cpe); else cpe = strncasestr(cpe, ePerl_end_delimiter, cpEND-cpe); if (cpe == NULL) { ePerl_SetError("Missing end delimiter"); CU(NULL); } /* step again backward over whitespaces */ for (cpe2 = cpe; cpe2 > cps && (*(cpe2-1) == ' ' || *(cpe2-1) == '\t' || *(cpe2-1) == '\n'); cpe2--) ; /* pass through the ePerl block without changes! */ if (cpe2 > cps) { if (ePerl_convert_entities == TRUE) cpOut = ePerl_Cfwrite(cps, cpe2-cps, 1, cpOut); else cpOut = ePerl_fwrite(cps, cpe2-cps, 1, cpOut); /* be smart and automatically add a semicolon if not provided at the end of the ePerl block. But know the continuation indicator "_". */ if ((*(cpe2-1) != ';') && (*(cpe2-1) != '_') ) cpOut = ePerl_fprintf(cpOut, ";"); if (*(cpe2-1) == '_') cpOut = cpOut - 1; } /* end preserve newlines for correct line numbers */ for ( ; cpe2 <= cpe; cpe2++) if (*cpe2 == '\n') cpOut = ePerl_fprintf(cpOut, "\n"); /* output a trailing space to make the -x display more readable when no newlines have finished the block. */ if (cpOut > cpOutBuf && *(cpOut-1) != '\n') cpOut = ePerl_fprintf(cpOut, " "); /* and adjust the current position to the first character after the end delimiter */ cps = cpe+strlen(ePerl_end_delimiter); /* finally just one more feature: when an end delimiter is directly followed by ``//'' this discards all data up to and including the following newline */ if (cps < cpEND-2 && *cps == '/' && *(cps+1) == '/') { /* skip characters */ cps += 2; for ( ; cps < cpEND && *cps != '\n'; cps++) ; if (cps < cpEND) cps++; /* but preserve the newline in the script */ cpOut = ePerl_fprintf(cpOut, "\n"); } } } RETURN_WVAL(cpOutBuf); CUS: if (cpOutBuf) free(cpOutBuf); RETURN_EXRC; } /*EOF*/ eperl-2.2.14/eperl_perl5.c100664 1750 1750 6716 6561074323 130110ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_perl5.c -- ePerl Perl5 related stuff */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_perl5.h" #include "eperl_perl5_sm.h" #include "eperl_proto.h" #ifdef HAVE_PERL_DYNALOADER extern void boot_DynaLoader _((CV* cv)); /* ** ** the Perl XS init function for dynamic library loading ** */ void Perl5_XSInit(void) { char *file = __FILE__; /* dXSUB_SYS; */ /* dummy = 0; */ /* make gcc -Wall happy ;-) */ /* do newXS() the available modules */ DO_NEWXS_STATIC_MODULES } #endif /* HAVE_PERL_DYNALOADER */ /* ** ** Force Perl to use unbuffered I/O ** */ void Perl5_ForceUnbufferedStdout(void) { #if AC_perl_vnum < 500476 IoFLAGS(GvIOp(defoutgv)) |= IOf_FLUSH; /* $|=1 */ #else IoFLAGS(GvIOp(PL_defoutgv)) |= IOf_FLUSH; /* $|=1 */ #endif return; } /* ** ** set a Perl environment variable ** */ char **Perl5_SetEnvVar(char **env, char *str) { char ca[1024]; char *cp; strcpy(ca, str); cp = strchr(ca, '='); *cp++ = '\0'; return mysetenv(env, ca, cp); } /* ** ** sets a Perl scalar variable ** */ void Perl5_SetScalar(char *pname, char *vname, char *vvalue) { ENTER; save_hptr(&curstash); curstash = gv_stashpv(pname, TRUE); sv_setpv(perl_get_sv(vname, TRUE), vvalue); LEAVE; return; } /* ** ** remember a Perl scalar variable ** and set it later ** ** (this is needed because we have to ** remember the scalars when parsing ** the command line, but actually setting ** them can only be done later when the ** Perl 5 interpreter is allocated !!) ** */ char *Perl5_RememberedScalars[1024] = { NULL }; void Perl5_RememberScalar(char *str) { int i; for (i = 0; Perl5_RememberedScalars[i] != NULL; i++) ; Perl5_RememberedScalars[i++] = strdup(str); Perl5_RememberedScalars[i++] = NULL; return; } void Perl5_SetRememberedScalars(void) { char ca[1024]; char *cp; int i; for (i = 0; Perl5_RememberedScalars[i] != NULL; i++) { strcpy(ca, Perl5_RememberedScalars[i]); cp = strchr(ca, '='); *cp++ = '\0'; Perl5_SetScalar("main", ca, cp); } } /*EOF*/ eperl-2.2.14/eperl_perl5.h100664 1750 1750 3750 6551344055 130120ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_perl5.h -- Perl 5 header file mangling */ #ifndef EPERL_PERL5_H #define EPERL_PERL5_H 1 /* first include the standard Perl includes designed for embedding */ #include #include /* try to adjust for PerlIO handling */ #ifdef USE_PERLIO #undef fwrite #define fwrite(buf,size,count,f) PerlIO_write(f,buf,size*count) #endif /* define the I/O type string for verbosity */ #ifdef USE_PERLIO #ifdef USE_SFIO #define PERL_IO_LAYER_ID "PerlIO/SfIO" #else #define PERL_IO_LAYER_ID "PerlIO/StdIO" #endif #else #define PERL_IO_LAYER_ID "Raw/StdIO" #endif #endif /* EPERL_PERL5_H */ /*EOF*/ eperl-2.2.14/eperl_perl5_sm.pl100664 1750 1750 6070 6424100320 136530ustar rseen## ## eperl_perl5_sm.pl -- Determine newXS() calls for XS-Init function ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. ## use Config; print <<'EOT' /* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997 Ralf S. Engelschall, All rights reserved. ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_perl5_sm.h -- Perl 5 Static Module definition */ #ifndef EPERL_PERL5_SM_H #define EPERL_PERL5_SM_H 1 EOT ; # # code stolen from Perl 5.004_04's ExtUtils::Embed because # this module is only available in newer Perl versions. # sub static_ext { unless (scalar @Extensions) { @Extensions = sort split /\s+/, $Config{static_ext}; unshift @Extensions, qw(DynaLoader); } return @Extensions; } sub xsi_body { my(@exts) = @_; my($pname,@retval,%seen); my($dl) = &canon('/','DynaLoader'); foreach $_ (@exts){ my($pname) = &canon('/', $_); my($mname, $cname, $ccode); ($mname = $pname) =~ s!/!::!g; ($cname = $pname) =~ s!/!__!g; if ($pname eq $dl){ $ccode = "newXS(\"${mname}::boot_${cname}\", boot_${cname}, file);\\\n"; push(@retval, $ccode) unless $seen{$ccode}++; } else { $ccode = "newXS(\"${mname}::bootstrap\", boot_${cname}, file);\\\n"; push(@retval, $ccode) unless $seen{$ccode}++; } } return join '', @retval; } sub canon { my($as, @ext) = @_; foreach(@ext) { # might be X::Y or lib/auto/X/Y/Y.a next if s!::!/!g; s:^(lib|ext)/(auto/)?::; s:/\w+\.\w+$::; } grep(s:/:$as:, @ext) if ($as ne '/'); return @ext; } @mods = (); push(@mods, &static_ext()); @mods = grep(!$seen{$_}++, @mods); $DEF = "#define DO_NEWXS_STATIC_MODULES \\\n"; $DEF .= &xsi_body(@mods); $DEF =~ s|\\\n$|\n|s; print $DEF; print <1úSÓ HꎥÃX EP;· DL’Y<Ú†&½2Ëkë–~ذfÀñ2óòâϘ ¾0JÊ¥>·1¡ \ù"TCº—¹z‰{ri»ì¨X.ÔQhPPàÓ©Ó[Ó—3“@wD⟊µŽu<¡•IR“I5¹³FïÉ$ˆQ>I…a‰ ^€óõÇi–É&Øv„ ¶A>_%˜•Hî8ÈQfŒ£¡‚4á§…‹`hÙ&ŽqžMù848•fÎÜX28ÞÂàc…þ/èxBqÜ Å SCLÔÐämÕ1¥!5˜C€–¯ÝF [j9å!Žög¨Ô°æ’tÖiçxæ©çž|ÒÙ[”Å „j衈&ªè¢Œ6ê¨@^p1$2Ú ,ìPœvêé§  ê¨Pˆê)¡¤rŠjª¬¶Zà°)/ `­rú¦*àÊDÀ+ì°I”j Ä;¤@ȪIÈk,³ÉÛ„P4-±ÚzZ (à€ ²”`Å:ñD§N ¼ª¿V+m£@k/°Ì˜ì ­P°­°ãè€ÁP´›¬Pð[±Äb[þ¼ÀC­(Ø`Z/$À@ <°i5T ­ÂÅ«B ,ÈËPTE®PXBm±«j @[*­‚ùÌ)Îãð@@Š[û„ ¸™PÄî:¡@û`(LƒY À€8¤°U˜€C‘m ÃÛ2¯hiÂ9ÇŒCÎÖ}L0Ül„ͳ„AÂɾÅBÚº›8 À > °€BhÄ%ôЃ (PaÛŠ²ÚºÍB *°0<`àÀ P„ÉÃìYT² 0·–„ìLáE²ÃO+8À,š$ñ ƒ&A/ €ë°×6QCBôDþQôeÂM0ì5瀋ƒ ß[ 8LAõfGB 800x0«ÞzUh‚0 xä˜@Í: ƒgà:à Á9Ð @°ÒŒxÆèÌ1´a5 Lð^÷p¶ôe‹SåJ,°,`A R°œ‚€….`AàBA¢„”`UXBÛ0…©?­M¸Â3lòx0o#:± (j’€ãØHjæö\€‹©pKC0…&˜2 b–‚ûá ã‚B‚)4Ð!Á° 1 ð!n°€Ì3t@–È+PAØ:2þQhH?")(@€±mäåØS5Å!Š /`¹1ñÃA À 0 +°-!e[˜¸Fè† §ÑX„ H0yÛ‘3&„€“[P\š0FA2à‡P‰h|TZ€M ±‘]#§“ÀmÖi-Àrмr’ÒxþŠ9”W-zH¿å)™À°LX¡=gެ†K;àr™  :X#&ËC;Ö‚-n“_E(·ŒÍȬƒ)Õhû¢Žð_wôrœA)÷3 d-i‰´U’Q™W‡ÏxmÍØ†øÕI+À ö╺öF-rgi$ÿÌ  ˜ l#,P sI‡øµ2üˆ—àtI„p#S-€É` tÙ˜Õ#Ý;¯@ D—os•é熠Ȍq¸í×:LD@p0ìWiî"g‰ðh'A0xñ‡ í&”À‹Ç_h§2r鉨2'„q8›jvRT°T@¬yÒb`âù,–6žt³-£‚2ÉØ2™(F„Vào(i,S•Ô™4h*´BaÄ)‡&D3 ’,åãFú˜ÉšŸ¹5ŸÖöŒžû¢3<#w5¡JvN@_]9mûBm êž¾÷{½gm‡¡¥R ‚"(‡\ÅR\„²ÿN`*ÎB£^°’¢*8š¾é˜ß¢žX*Y¢aGsûb1u7< ý‚àp^P<¸Ñ€A2šð&!ä ¥WúPr¡ú£í)t(vÚ{ùej \p ñh§J°yÑ0j íPRÀr4øaPÐ3²Pæ°©2'y—V0¤èƒH¤¾÷bÉÛðEšÐ qÛÀ<Ñ`207Ö3EEGÁ1=¢ ùä—œ©: š•,¶2xöY¤¬Ó+=,S §„ pÝPy¨õÁ!Z)õÑIs³·ðJ:Ÿd'Rûè‰W ¤ 8™r™³Ú{µ*©ÿØ“£Rß°‚ b1…ºN‹qF¨TKœ v>8—E0›×öƒqèªDZ«-³·º°Qê¦c”â8u%øÑû· ¤+ñ %©Y8þÃ8—-y\0gºVDj¤Àò×p P3 Àe ¯„EX31°Â¹ÓAhÒ&òб,flhÓê¯:i¶š¾‘8Ê)Ûá3wõ,Éj£ÀÕ,M« AKOFYz¨¯ê:è7•D²ŒZ´kµ2×Öfù™0œ3ÈB8/úJ0Áù)%»IÖÀ)KÐ)][- £Œ |$Z´Ùúªn¾â_J ,ê©0Z,œ€ó(£Ù¸®¸¡¥2 æfW ƒ-‘וecmøe¶º­¾µ)›³’*èd ]°µ©›*-¦ë)¨ »5 º¸»:X«ùxÓó»À¼Â;  Â{¼¿k È;=¾‹¼T;eperl-2.2.14/eperl_pp.c100664 1750 1750 34626 6551343755 124310ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_pp.c -- ePerl preprocessor */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_proto.h" static char ePerl_PP_ErrorString[1024] = ""; /* ** set PP error string */ void ePerl_PP_SetError(char *str, ...) { va_list ap; va_start(ap, str); vsprintf(ePerl_PP_ErrorString, str, ap); va_end(ap); return; } /* ** get PP error string */ char *ePerl_PP_GetError(void) { return ePerl_PP_ErrorString; } /* ** expand #include directives in buffer */ char *ePerl_PP_Process(char *cpInput, char **cppINC, int mode) { char *cpOutBuf = NULL; char *cpEND; char *cps; char *cp; char *cp2; char *cp3; char *cp4; char *cpT = NULL; char *cpInBuf = NULL; char *cpBuf; char caName[1024]; char caArg[1024]; char caStr[1024]; int n; int l1; int l2; int nBuf; int nOut; int nOutBuf; int i; FILE *fp; if (strlen(cpInput) == 0) { /* make sure we return a buffer which the caller can free() */ cpOutBuf = (char *)malloc(sizeof(char) * 1); *cpOutBuf = NUL; return cpOutBuf; } if (mode == 1) { /* treat input as buffer */ cpBuf = cpInput; nBuf = strlen(cpBuf); } else { /* treat input as filename */ if (strncmp(cpInput, "http://", 7) == 0) { fp = HTTP_openURLasFP(cpInput); } else if (*cpInput == '/') { fp = fopen(cpInput, "r"); } else { fp = fopen(cpInput, "r"); if (fp == NULL) { /* we have to try in all include directories! */ for (i = 0; cppINC[i] != NULL; i++) { sprintf(caName, "%s/%s", cppINC[i], cpInput); if ((fp = fopen(caName, "r")) != NULL) break; } } } if (fp == NULL) { ePerl_PP_SetError("Cannot open source file `%s' for reading", cpInput); return NULL; } nBuf = 16384; if ((cpInBuf = (char *)malloc(sizeof(char) * nBuf)) == NULL) { ePerl_PP_SetError("Cannot allocate %d bytes of memory", nBuf); return NULL; } i = 0; while ((n = fread(cpInBuf+i, 1, 16384, fp)) > 0) { i += n; if (n < 16384 && feof(fp)) break; else { nBuf += 16384; if ((cpInBuf = (char *)realloc(cpInBuf, nBuf)) == NULL) { ePerl_PP_SetError("Cannot reallocate %d bytes of memory", nBuf); return NULL; } continue; } } cpInBuf[i] = '\0'; cpBuf = cpInBuf; nBuf = i; fclose(fp); } cpEND = cpBuf+nBuf; cps = cpBuf; nOutBuf = 64; cpOutBuf = (char *)malloc(64); nOut = 0; while (cps < cpEND) { /* * search for any more directives */ cp = NULL; if (cps == cpBuf || ((cps > cpBuf) && (*(cps-1) == '\n'))) { if ((strncmp(cps, "#include", 8) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#sinclude", 9) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#if", 3) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#elsif", 6) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#else", 5) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#endif", 6) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#c", 2) == 0) && (cp == NULL)) cp = cps; } if (((cpT = strnstr(cps, "\n#include", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (((cpT = strnstr(cps, "\n#sinclude", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (((cpT = strnstr(cps, "\n#if", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (((cpT = strnstr(cps, "\n#elsif", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (((cpT = strnstr(cps, "\n#else", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (((cpT = strnstr(cps, "\n#endif", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (((cpT = strnstr(cps, "\n#c", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (cp != NULL && (cp == cpBuf || (cp > cpBuf && *(cp-1) == '\n'))) { /* * Ok, one more directive found... */ /* allocate space and add data up to directive */ i = cp-cps; nOutBuf += i; if ((cp2 = (char *)realloc(cpOutBuf, nOutBuf)) == NULL) { ePerl_PP_SetError("Failed on realloc(buf, %d)", nOutBuf); free(cpOutBuf); return NULL; } cpOutBuf = cp2; strncpy(cpOutBuf+nOut, cps, cp-cps); nOut += i; /* * now process the specific directives... */ if (strncmp(cp, "#include", 8) == 0) { /* * found a #include directive */ cps = cp+8; /* skip whitespaces */ for ( ; cps < cpEND && (*cps == ' ' || *cps == '\t'); cps++) ; /* skip possible quotation mark or opening angle bracket */ if (*cps == '"' || *cps == '<') cps++; /* check for EOL */ if (*cps == '\n') { ePerl_PP_SetError("Missing filename or URL for #include directive"); free(cpOutBuf); return NULL; } /* copy the filename and skip to end of line */ for (i = 0; cps < cpEND && (*cps != ' ' && *cps != '\t' && *cps != '>' && *cps != '"' && *cps != '\n' ); ) caName[i++] = *cps++; caName[i++] = NUL; for ( ; cps < cpEND && *cps != '\n'; cps++) ; if (*cps == '\n') cps++; /* recursive usage */ if ((cp = ePerl_PP_Process(caName, cppINC, 0 /*mode=file*/)) == NULL) return NULL; } else if (strncmp(cp, "#sinclude", 9) == 0) { /* * found a #sinclude directive */ cps = cp+9; /* skip whitespaces */ for ( ; cps < cpEND && (*cps == ' ' || *cps == '\t'); cps++) ; /* skip possible quotation mark or opening angle bracket */ if (*cps == '"' || *cps == '<') cps++; /* check for EOL */ if (*cps == '\n') { ePerl_PP_SetError("Missing filename or URL for #sinclude directive"); free(cpOutBuf); return NULL; } /* copy the filename and skip to end of line */ for (i = 0; cps < cpEND && (*cps != ' ' && *cps != '\t' && *cps != '>' && *cps != '"' && *cps != '\n' ); ) caName[i++] = *cps++; caName[i++] = NUL; for ( ; cps < cpEND && *cps != '\n'; cps++) ; if (*cps == '\n') cps++; /* recursive usage */ if ((cp = ePerl_PP_Process(caName, cppINC, 0 /*mode=file*/)) == NULL) return NULL; /* make it secure by removing all begin/end delimiters!! */ if ((cp2 = (char *)malloc(strlen(cp))) == NULL) return NULL; l1 = strlen(ePerl_begin_delimiter); l2 = strlen(ePerl_end_delimiter); for (cp3 = cp, cp4 = cp2; *cp3 != NUL; ) { if (strncasecmp(cp3, ePerl_begin_delimiter, l1) == 0) cp3 += l1; else if (strncasecmp(cp3, ePerl_end_delimiter, l2) == 0) cp3 += l2; else *cp4++ = *cp3++; } *cp4 = NUL; free(cp); cp = cp2; } else if (strncmp(cp, "#if", 3) == 0) { /* * found a #if directive */ cps = cp+3; /* skip whitespaces */ for ( ; cps < cpEND && (*cps == ' ' || *cps == '\t'); cps++) ; if (*cps == '\n') { ePerl_PP_SetError("Missing expression for #if directive"); free(cpOutBuf); return NULL; } /* copy the argument and create replacement string */ for (i = 0; cps < cpEND && *cps != '\n'; ) caArg[i++] = *cps++; caArg[i++] = NUL; if (*cps == '\n') cps++; sprintf(caStr, "%s if (%s) { _%s//\n", ePerl_begin_delimiter, caArg, ePerl_end_delimiter); cp = caStr; } else if (strncmp(cp, "#elsif", 6) == 0) { /* * found a #elsif directive */ cps = cp+6; /* skip whitespaces */ for ( ; cps < cpEND && (*cps == ' ' || *cps == '\t'); cps++) ; if (*cps == '\n') { ePerl_PP_SetError("Missing expression for #elsif directive"); free(cpOutBuf); return NULL; } /* copy the argument and create replacement string */ for (i = 0; cps < cpEND && *cps != '\n'; ) caArg[i++] = *cps++; caArg[i++] = NUL; if (*cps == '\n') cps++; sprintf(caStr, "%s } elsif (%s) { _%s//\n", ePerl_begin_delimiter, caArg, ePerl_end_delimiter); cp = caStr; } else if (strncmp(cp, "#else", 5) == 0) { /* * found a #else directive */ cps = cp+5; /* skip to end of line */ for (i = 0; cps < cpEND && *cps != '\n'; cps++) ; if (*cps == '\n') cps++; /* create replacement string */ sprintf(caStr, "%s } else { _%s//\n", ePerl_begin_delimiter, ePerl_end_delimiter); cp = caStr; } else if (strncmp(cp, "#endif", 6) == 0) { /* * found a #endif directive */ cps = cp+6; /* skip to end of line */ for (i = 0; cps < cpEND && *cps != '\n'; cps++) ; if (*cps == '\n') cps++; /* create replacement string */ sprintf(caStr, "%s } _%s//\n", ePerl_begin_delimiter, ePerl_end_delimiter); cp = caStr; } else if (strncmp(cp, "#c", 2) == 0) { /* * found a #c directive */ cps = cp+2; /* skip to end of line */ for (i = 0; cps < cpEND && *cps != '\n'; cps++) ; if (*cps == '\n') cps++; /* create replacement string: just a newline * to preserve line numbers */ sprintf(caStr, "\n"); cp = caStr; } /* allocate space and add replacement data */ i = strlen(cp); nOutBuf += i; if ((cp2 = (char *)realloc(cpOutBuf, nOutBuf)) == NULL) { ePerl_PP_SetError("Failed on realloc(buf, %d)", nOutBuf); free(cpOutBuf); return NULL; } cpOutBuf = cp2; strcpy(cpOutBuf+nOut, cp); nOut += i; continue; } else { /* no more found */ /* allocate space and add data */ nOutBuf += (cpEND-cps); if ((cp2 = (char *)realloc(cpOutBuf, nOutBuf)) == NULL) { ePerl_PP_SetError("Failed on realloc(buf, %d)", nOutBuf); free(cpOutBuf); /* XXX free(cp); */ return NULL; } cpOutBuf = cp2; strcpy(cpOutBuf+nOut, cps); break; } } if (cpInBuf) free(cpInBuf); return cpOutBuf; } char *ePerl_PP(char *cpBuf, char **cppINC) { return ePerl_PP_Process(cpBuf, cppINC, 1 /*mode=buffer*/); } /*EOF*/ eperl-2.2.14/eperl_proto.h100664 1750 1750 12445 6551344070 131440ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_proto.h -- ePerl ANSI C prototypes */ #ifndef EPERL_PROTO_H #define EPERL_PROTO_H 1 /*_BEGIN_PROTO_*/ /* eperl_main.c */ extern int mode; extern char *allowed_file_ext[]; extern char *allowed_caller_uid[]; extern void PrintError(int mode, char *scripturl, char *scriptfile, char *logfile, char *str, ...); extern void give_version(void); extern void give_version_extended(void); extern void give_readme(void); extern void give_license(void); extern void give_img_logo(void); extern void give_img_powered(void); extern void give_usage(char *name); extern char *RememberedINC[1024]; extern void RememberINC(char *str); extern void mysighandler(int rc); extern void myinit(void); extern void myexit(int rc); extern struct option options[]; extern int main(int argc, char **argv, char **env); /* eperl_perl5.c */ extern void Perl5_XSInit(void); extern void Perl5_ForceUnbufferedStdout(void); extern char **Perl5_SetEnvVar(char **env, char *str); extern void Perl5_SetScalar(char *pname, char *vname, char *vvalue); extern char *Perl5_RememberedScalars[1024]; extern void Perl5_RememberScalar(char *str); extern void Perl5_SetRememberedScalars(void); /* eperl_parse.c */ extern char *ePerl_begin_delimiter; extern char *ePerl_end_delimiter; extern int ePerl_case_sensitive_delimiters; extern int ePerl_convert_entities; extern int ePerl_line_continuation; extern void ePerl_SetError(char *str, ...); extern char *ePerl_GetError(void); extern char *ePerl_fprintf(char *cpOut, char *str, ...); extern char *ePerl_fwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); extern char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); extern char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); extern char *strnchr(char *buf, char chr, int n); extern char *strnstr(char *buf, char *str, int n); extern char *strncasestr(char *buf, char *str, int n); extern char *strndup(char *buf, int n); extern char *ePerl_Bristled2Plain(char *cpBuf); /* eperl_pp.c */ extern void ePerl_PP_SetError(char *str, ...); extern char *ePerl_PP_GetError(void); extern char *ePerl_PP_Process(char *cpInput, char **cppINC, int mode); extern char *ePerl_PP(char *cpBuf, char **cppINC); /* eperl_sys.c */ extern char **mysetenv(char **env, char *var, char *str, ...); extern void IO_redirect_stdin(FILE *fp); extern void IO_redirect_stdout(FILE *fp); extern void IO_redirect_stderr(FILE *fp); extern int IO_is_stdin_redirected(void); extern int IO_is_stdout_redirected(void); extern int IO_is_stderr_redirected(void); extern void IO_restore_stdin(void); extern void IO_restore_stdout(void); extern void IO_restore_stderr(void); extern char *mytmpfile(char *id); extern void remove_mytmpfiles(void); extern char *isotime(time_t *t); extern char *ePerl_ReadSourceFile(char *filename, char **cpBufC, int *nBufC); extern char *ePerl_ReadErrorFile(char *filename, char *scriptfile, char *scripturl); extern char *filename(char *path); extern char *dirname(char *path); extern char *abspath(char *path); /* eperl_http.c */ extern void HTTP_PrintResponseHeaders(char *cpBuf); extern void HTTP_StripResponseHeaders(char **cpBuf, int *nBuf); extern int HTTP_IsHeaderLine(char *cp1, char *cp2); extern int HTTP_HeadersExists(char *cpBuf); extern int HTTP_HeaderLineExists(char *cpBuf, char *name); extern char *WebTime(void); extern FILE *HTTP_openURLasFP(char *url); /* eperl_debug.c */ extern int fDebug; extern char *cpDebugFile; extern void Debug(char *str, ...); /* eperl_config.c */ /* eperl_version.c */ extern char ePerl_Version[]; extern char ePerl_Hello[]; extern char ePerl_GNUVersion[]; extern char ePerl_WhatID[]; extern char ePerl_RCSIdentID[]; extern char ePerl_WebID[]; extern char ePerl_PlainID[]; /* eperl_readme.c */ extern char *ePerl_README; /* eperl_license.c */ extern char *ePerl_LICENSE; /* eperl_logo.c */ extern int ePerl_LOGO_size; extern char ePerl_LOGO_data[]; /* eperl_powered.c */ extern int ePerl_POWERED_size; extern char ePerl_POWERED_data[]; /*_END_PROTO_*/ #endif /* EPERL_PROTO_H */ /*EOF*/ eperl-2.2.14/eperl_readme.c100664 1750 1750 3367 6561064025 132140ustar rseen/* README.c -- automatically generated by asc2c */ char *ePerl_README = \ " ____ _ \n"\ " ___| _ \\ ___ _ __| |\n"\ " / _ \\ |_) / _ \\ '__| |\n"\ " | __/ __/ __/ | | |\n"\ " \\___|_| \\___|_| |_|\n"\ " \n"\ " ePerl -- Embedded Perl 5 Language\n"\ "\n"\ " Version 2.2.14 (02-08-1998)\n"\ "\n"\ " ePerl interprets an ASCII file bristled with Perl 5 program statements by\n"\ " evaluating the Perl 5 code while passing through the plain ASCII data. It\n"\ " can operate in various ways: As a stand-alone Unix filter or integrated Perl\n"\ " 5 module for general file generation tasks and as a powerful Webserver\n"\ " scripting language for dynamic HTML page programming. \n"\ "\n"\ " The documentation and latest release can be found on\n"\ " http://www.engelschall.com/sw/eperl/\n"\ "\n"\ " Copyright (c) 1996,1997,1998 Ralf S. Engelschall \n"\ "\n"\ " This program is free software; it may be redistributed and/or modified only\n"\ " under the terms of either the Artistic License or the GNU General Public\n"\ " License, which may be found in the ePerl source distribution. Look at the\n"\ " files ARTISTIC and COPYING or run ``eperl -l'' to receive a built-in copy of\n"\ " both license files.\n"\ "\n"\ " This program is distributed in the hope that it will be useful, but WITHOUT\n"\ " ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"\ " FITNESS FOR A PARTICULAR PURPOSE. See either the Artistic License or the\n"\ " GNU General Public License for more details.\n"\ "\n"\ " Ralf S. Engelschall\n"\ " rse@engelschall.com\n"\ " www.engelschall.com\n"\ "\n"\ ; /*EOF*/ eperl-2.2.14/eperl_security.h100664 1750 1750 5520 6551344076 136320ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_security.h -- ePerl security definitions */ #ifndef EPERL_SECURITY_H #define EPERL_SECURITY_H 1 /* * General security for CGI modes */ #define CGI_NEEDS_ALLOWED_FILE_EXT TRUE #define LIST_OF_ALLOWED_FILE_EXT { ".html", ".phtml", ".eperl", ".ephtml", ".epl", ".pl", ".cgi", NULL } /* * Perl security * (BE CAREFUL HERE, THIS CAN MAKE YOUR LIVE HARD!) */ #define CGI_MODES_FORCE_TAINTING FALSE #define CGI_MODES_FORCE_WARNINGS FALSE /* * SetUID security checks for CGI modes: * You can enable/disable any checked steps here. */ #define SETUID_NEEDS_VALID_CALLER_UID TRUE #define SETUID_NEEDS_ALLOWED_CALLER_UID TRUE #define SETUID_NEEDS_VALID_OWNER_UID TRUE #define SETUID_NEEDS_VALID_OWNER_GID TRUE #define SETUID_NEEDS_BELOW_OWNER_HOME TRUE #define LIST_OF_ALLOWED_CALLER_UID { "nobody", "root", NULL } /* * Action when a SetUID security check failed. * * Define ``DO_FOR_FAILED_STEP'' to one of the following: * * MARK_AND_GO_ON: step is marked as failed and processing goes on. * BUT: No UID/GID switching takes place! * (default) * * STOP_AND_ERROR: immediately stop processing print an error. * (for the paranoid webmaster who really * wants to enable ePerl only succeded UID/GID * switching) */ #define MARK_AND_GO_ON 1 #define STOP_AND_ERROR 2 #define DO_FOR_FAILED_STEP MARK_AND_GO_ON #endif /* EPERL_SECURITY_H */ /*EOF*/ eperl-2.2.14/eperl_sys.c100664 1750 1750 23261 6557036476 126260ustar rseen/* ** ____ _ ** ___| _ \ ___ _ __| | ** / _ \ |_) / _ \ '__| | ** | __/ __/ __/ | | | ** \___|_| \___|_| |_| ** ** ePerl -- Embedded Perl 5 Language ** ** ePerl interprets an ASCII file bristled with Perl 5 program statements ** by evaluating the Perl 5 code while passing through the plain ASCII ** data. It can operate both as a standard Unix filter for general file ** generation tasks and as a powerful Webserver scripting language for ** dynamic HTML page programming. ** ** ====================================================================== ** ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall ** ** This program is free software; it may be redistributed and/or modified ** only under the terms of either the Artistic License or the GNU General ** Public License, which may be found in the ePerl source distribution. ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ** a built-in copy of both license files. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ** Artistic License or the GNU General Public License for more details. ** ** ====================================================================== ** ** eperl_sys.c -- ePerl system functions */ #include "eperl_config.h" #include "eperl_global.h" #include "eperl_proto.h" /* ** ** own setenv() function which works with Perl ** */ char **mysetenv(char **env, char *var, char *str, ...) { va_list ap; char ca[1024]; char ca2[1024]; char *cp; int i; char **envN; extern char **environ; static int stillcalled = FALSE; int replaced = FALSE; /* create the key=val string */ va_start(ap, str); vsprintf(ca, str, ap); sprintf(ca2, "%s=%s", var, ca); cp = strdup(ca2); /* now duplicate the old structure */ for (i = 0; env[i] != NULL; i++) ; envN = (char **)malloc(sizeof(char *) * (i+2)); for (i = 0; env[i] != NULL; i++) { if (strncmp(env[i], var, strlen(var)) == 0) { envN[i] = cp; replaced = TRUE; } else envN[i] = env[i]; } /* add the new entry if not replaced */ if (!replaced) { envN[i++] = cp; envN[i++] = NULL; } /* set the libc/exec variable which Perl uses */ if (stillcalled) free(environ); stillcalled = TRUE; environ = envN; va_end(ap); return envN; } /* ** ** I/O handle redirection ** */ #define HANDLE_STDIN 0 #define HANDLE_STDOUT 1 #define HANDLE_STDERR 2 #define HANDLE_STORE_STDIN 10 #define HANDLE_STORE_STDOUT 11 #define HANDLE_STORE_STDERR 12 static int IO_redirected_stdin = FALSE; static int IO_redirected_stdout = FALSE; static int IO_redirected_stderr = FALSE; void IO_redirect_stdin(FILE *fp) { if (IO_redirected_stdin) IO_restore_stdin(); /* first copy the current stdin to the store handle */ (void)dup2(HANDLE_STDIN, HANDLE_STORE_STDIN); /* then copy the new handle to stdin */ (void)dup2(fileno(fp), HANDLE_STDIN); /* and remember the fact */ IO_redirected_stdin = TRUE; } void IO_redirect_stdout(FILE *fp) { if (IO_redirected_stdout) IO_restore_stdout(); /* first copy the current stdout to the store handle */ (void)dup2(HANDLE_STDOUT, HANDLE_STORE_STDOUT); /* then copy the new handle to stdout */ (void)dup2(fileno(fp), HANDLE_STDOUT); /* and remember the fact */ IO_redirected_stdout = TRUE; } void IO_redirect_stderr(FILE *fp) { if (IO_redirected_stderr) IO_restore_stderr(); /* first copy the current stderr to the store handle */ (void)dup2(HANDLE_STDERR, HANDLE_STORE_STDERR); /* then copy the new handle to stderr */ (void)dup2(fileno(fp), HANDLE_STDERR); /* and remember the fact */ IO_redirected_stderr = TRUE; } int IO_is_stdin_redirected(void) { return IO_redirected_stdin; } int IO_is_stdout_redirected(void) { return IO_redirected_stdout; } int IO_is_stderr_redirected(void) { return IO_redirected_stderr; } void IO_restore_stdin(void) { if (IO_redirected_stdin) { dup2(HANDLE_STORE_STDIN, HANDLE_STDIN); IO_redirected_stdin = FALSE; } } void IO_restore_stdout(void) { if (IO_redirected_stdout) { dup2(HANDLE_STORE_STDOUT, HANDLE_STDOUT); IO_redirected_stdout = FALSE; } } void IO_restore_stderr(void) { if (IO_redirected_stderr) { dup2(HANDLE_STORE_STDERR, HANDLE_STDERR); IO_redirected_stderr = FALSE; } } /* ** ** Temporary filename support ** */ static char *mytmpfiles[100] = { NULL }; static int mytmpfilecnt = 0; char *mytmpfile(char *id) { char ca[1024]; char *cp; int i; sprintf(ca, "/tmp/%s.%d.tmp%d", id, (int)getpid(), mytmpfilecnt++); cp = strdup(ca); for (i = 0; mytmpfiles[i] != NULL; i++) ; mytmpfiles[i++] = cp; mytmpfiles[i] = NULL; return cp; } void remove_mytmpfiles(void) { int i; for (i = 0; mytmpfiles[i] != NULL; i++) { unlink(mytmpfiles[i]); } } /* ** ** ISO time ** */ char *isotime(time_t *t) { struct tm *tm; char timestr[128]; tm = localtime(t); sprintf(timestr, "%02d-%02d-19%02d %02d:%02d", tm->tm_mday, tm->tm_mon+1, tm->tm_year, tm->tm_hour, tm->tm_min); return strdup(timestr); } /* ** ** read source file into internal buffer ** */ char *ePerl_ReadSourceFile(char *filename, char **cpBufC, int *nBufC) { char *rc; FILE *fp = NULL; char *cpBuf = NULL; int nBuf; char tmpfile[256]; int usetmp = 0; int c; if (stringEQ(filename, "-")) { /* file is given on stdin */ sprintf(tmpfile, "/tmp/eperl.tmp.%d", (int)getpid()); if ((fp = fopen(tmpfile, "w")) == NULL) { ePerl_SetError("Cannot open temporary source file %s for writing", tmpfile); CU(NULL); } nBuf = 0; while ((c = fgetc(stdin)) != EOF) { fprintf(fp, "%c", c); } fclose(fp); fp = NULL; filename = tmpfile; usetmp = 1; } if ((fp = fopen(filename, "r")) == NULL) { ePerl_SetError("Cannot open source file %s for reading", filename); CU(NULL); } fseek(fp, 0, SEEK_END); nBuf = ftell(fp); if (nBuf == 0) { cpBuf = (char *)malloc(sizeof(char) * 1); *cpBuf = NUL; } else { if ((cpBuf = (char *)malloc(sizeof(char) * nBuf+1)) == NULL) { ePerl_SetError("Cannot allocate %d bytes of memory", nBuf); CU(NULL); } fseek(fp, 0, SEEK_SET); if (fread(cpBuf, nBuf, 1, fp) == 0) { ePerl_SetError("Cannot read from file %s", filename); CU(NULL); } cpBuf[nBuf] = '\0'; } *cpBufC = cpBuf; *nBufC = nBuf; RETURN_WVAL(cpBuf); CUS: if (cpBuf) free(cpBuf); if (fp) fclose(fp); if (usetmp) unlink(tmpfile); RETURN_EXRC; } /* ** ** read an error file to internal buffer and substitute the filename ** */ char *ePerl_ReadErrorFile(char *filename, char *scriptfile, char *scripturl) { char *rc; FILE *fp = NULL; char *cpBuf = NULL; int nBuf; char *cp; if ((fp = fopen(filename, "r")) == NULL) { ePerl_SetError("Cannot open error file %s for reading", filename); CU(NULL); } fseek(fp, 0, SEEK_END); nBuf = ftell(fp); if ((cpBuf = (char *)malloc(sizeof(char) * nBuf * 2)) == NULL) { ePerl_SetError("Cannot allocate %d bytes of memory", nBuf * 2); CU(NULL); } fseek(fp, 0, SEEK_SET); if (fread(cpBuf, nBuf, 1, fp) == 0) { ePerl_SetError("Cannot read from file %s", filename); CU(NULL); } cpBuf[nBuf] = '\0'; for (cp = cpBuf; cp < cpBuf+nBuf; ) { if ((cp = strstr(cp, scriptfile)) != NULL) { #ifdef HAVE_MEMMOVE (void)memmove(cp+strlen(scripturl), cp+strlen(scriptfile), strlen(cp+strlen(scriptfile))+1); #else (void)bcopy(cp+strlen(scriptfile), cp+strlen(scripturl), strlen(cp+strlen(scriptfile))+1); #endif (void)memcpy(cp, scripturl, strlen(scripturl)); cp += strlen(scripturl); continue; } break; } RETURN_WVAL(cpBuf); CUS: if (cpBuf) free(cpBuf); if (fp) fclose(fp); RETURN_EXRC; } /* ** ** path support ** */ char *filename(char *path) { static char file[MAXPATHLEN]; char *cp; if (path[strlen(path)-1] == '/') return ""; else { for (cp = path+strlen(path); cp > path && *(cp-1) != '/'; cp--) ; if (cp == path+1) cp--; strcpy(file, cp); return file; } } char *dirname(char *path) { static char dir[MAXPATHLEN]; char *cp; if (path[strlen(path)-1] == '/') return path; else { strcpy(dir, path); for (cp = dir+strlen(dir); cp > dir && *(cp-1) != '/'; cp--) ; *cp = NUL; return dir; } } char *abspath(char *path) { static char apath[MAXPATHLEN]; static char cwd[MAXPATHLEN]; char *cp; if (path[0] == '/') return path; else { /* remember current working dir */ getcwd(cwd, MAXPATHLEN); /* determine dir of path */ cp = dirname(path); chdir(cp); getcwd(apath, MAXPATHLEN); /* restore cwd */ chdir(cwd); /* add file part again */ if (apath[strlen(apath)-1] != '/') strcpy(apath+strlen(apath), "/"); strcpy(apath+strlen(apath), path); return apath; } } /*EOF*/ eperl-2.2.14/eperl_version.c100664 1750 1750 1243 6561064017 134340ustar rseen/* !! This file was automatically generated by NEWVERS !! */ /* for logfiles, etc. */ char ePerl_Version[] = "2.2.14 (02-08-1998)"; /* interactive 'hello' string to identify us to the user */ char ePerl_Hello[] = "This is ePerl Version 2.2.14 (02-08-1998)"; /* a GNU --version output */ char ePerl_GNUVersion[] = "ePerl Version 2.2.14"; /* a UNIX what(1) id string */ char ePerl_WhatID[] = "@(#)ePerl Version 2.2.14 (02-08-1998)"; /* a RCS ident(1) id string */ char ePerl_RCSIdentID[] = "$Id: ePerl 2.2.14 02-08-1998 $"; /* a WWW id string */ char ePerl_WebID[] = "ePerl/2.2.14"; /* a plain id string */ char ePerl_PlainID[] = "2.2.14"; eperl-2.2.14/etc/ 40775 1750 1750 0 6561070533 110725ustar rseeneperl-2.2.14/etc/asc2c100775 1750 1750 2142 6264450561 121120ustar rseen#!/sw/bin/perl ## ## asc2c -- convert an ASCII file into a statically initialised ## C array of characters ## ## Copyright (c) Ralf S. Engelschall, All Rights Reserved. ## $filein = $ARGV[0]; $fileout = $ARGV[1]; $name = $ARGV[2]; if ($#ARGV ne 2) { printf(STDERR "Usage: $0 ascii-file c-file buffer-name\n"); exit(1); } open(IN, "<$filein"); #open(OUTH, ">$fileout.h"); open(OUTC, ">$fileout.c"); print OUTC "/* $filein.c -- automatically generated by asc2c */\n"; print OUTC "\n"; print OUTC "char *$name = \\\n"; while () { #next if m|^[ \t]*$|; #next if m|^[ \t]*#.*$|; s|\n$||; s|\\|\\\\|g; s|\"|\\\"|g; s|^|\"|; s|$|\\n\"\\|; printf(OUTC "%s\n", $_); } print OUTC ";\n"; print OUTC "\n"; print OUTC "/*EOF*/\n"; $filename = "$fileout.h"; $filename =~ tr|a-z.|A-Z_|; #print OUTH "/* $fileout.h -- automatically generated by asc2c */\n"; #print OUTH "#ifndef __$filename\n"; #print OUTH "#define __$filename\n"; #print OUTH "\n"; #print OUTH "extern char *$name;\n"; #print OUTH "\n"; #print OUTH "#endif /* __$filename */\n"; close(IN); #close(OUTH); close(OUTC); ##EOF## eperl-2.2.14/etc/bin2c100775 1750 1750 2422 6264455646 121260ustar rseen#!/sw/bin/perl ## ## bin2c -- convert an binary file into a statically initialised ## C array of characters ## ## Copyright (c) Ralf S. Engelschall, All Rights Reserved. ## $filein = $ARGV[0]; $fileout = $ARGV[1]; $name = $ARGV[2]; if ($#ARGV ne 2) { printf(STDERR "Usage: $0 binary-file c-file buffer-name\n"); exit(1); } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filein); open(IN, "<$filein"); #open(OUTH, ">$fileout.h"); open(OUTC, ">$fileout.c"); print OUTC "/* $filein.c -- automatically generated by bin2c */\n"; print OUTC "\n"; print OUTC "int ${name}_size = " . $size . ";\n"; print OUTC "char ${name}_data[] = {\n"; $i = 1; while (read(IN, $c, 1)) { printf(OUTC "0x%02x", ord($c)); printf(OUTC ",") if ($i < $size); printf(OUTC "\n") if ($i % 15 == 0 && $i < $size); $i++; } print OUTC " };\n"; print OUTC "\n"; print OUTC "/*EOF*/\n"; $filename = "$fileout.h"; $filename =~ tr|a-z.|A-Z_|; #print OUTH "/* $fileout.h -- automatically generated by bin2c */\n"; #print OUTH "#ifndef __$filename\n"; #print OUTH "#define __$filename\n"; #print OUTH "\n"; #print OUTH "extern char *$name;\n"; #print OUTH "\n"; #print OUTH "#endif /* __$filename */\n"; close(IN); #close(OUTH); close(OUTC); ##EOF## eperl-2.2.14/etc/buildinfo100775 1750 1750 10413 6561070320 131010ustar rseen#!/bin/sh ## ## buildinfo -- Determine Build Information ## Copyright (c) 1998 Ralf S. Engelschall, All Rights Reserved. ## # # argument line handling # error=no if [ $# -ne 1 -a $# -ne 2 ]; then error=yes fi if [ $# -eq 2 -a ".$1" != ".-n" ]; then error=yes fi if [ $error = yes ]; then echo "$0:Error: invalid argument line" echo "$0:Usage: $0 [-n] " echo "Where can contain:" echo " %u ...... substituted by determined username (foo)" echo " %h ...... substituted by determined hostname (bar)" echo " %d ...... substituted by determined domainname (.com)" echo " %D ...... substituted by determined day (DD)" echo " %M ...... substituted by determined month (MM)" echo " %Y ...... substituted by determined year (YYYYY)" echo " %m ...... substituted by determined monthname (Jan)" exit 1 fi if [ $# -eq 2 ]; then newline=no format_string="$2" else newline=yes format_string="$1" fi # # initialization # username='' hostname='' domainname='' time_day='' time_month='' time_year='' time_monthname='' # # determine username # username="$LOGNAME" if [ ".$username" = . ]; then username="$USER" if [ ".$username" = . ]; then username="`whoami 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$username" = . ]; then username="`who am i 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$username" = . ]; then username='unknown' fi fi fi fi # # determine hostname and domainname # hostname="`uname -n 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$hostname" = . ]; then hostname="`hostname 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$hostname" = . ]; then hostname='unknown' fi fi case $hostname in *.* ) domainname=".`echo $hostname | cut -d. -f2-`" hostname="`echo $hostname | cut -d. -f1`" ;; esac if [ ".$domainname" = . ]; then if [ -f /etc/resolv.conf ]; then domainname="`egrep '^[ ]*domain' /etc/resolv.conf | head -1 |\ sed -e 's/.*domain//' \ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \ -e 's/^\.//' -e 's/^/./' |\ awk '{ printf("%s", $1); }'`" if [ ".$domainname" = . ]; then domainname="`egrep '^[ ]*search' /etc/resolv.conf | head -1 |\ sed -e 's/.*search//' \ -e 's/^[[ ]]*//' -e 's/^ *//' -e 's/^ *//' \ -e 's/ .*//' -e 's/ .*//' \ -e 's/^\.//' -e 's/^/./' |\ awk '{ printf("%s", $1); }'`" fi fi fi # # determine current time # time_day="`date '+%d' | awk '{ printf("%s", $1); }'`" time_month="`date '+%m' | awk '{ printf("%s", $1); }'`" time_year="`date '+%Y' 2>/dev/null | awk '{ printf("%s", $1); }'`" if test ".$time_year" = .; then time_year="`date '+%y' | awk '{ printf("%s", $1); }'`" case $time_year in 9[0-9]*) time_year="19$time_year" ;; *) time_year="20$time_year" ;; esac fi case $time_month in 1|01) time_monthname='Jan' ;; 2|02) time_monthname='Feb' ;; 3|03) time_monthname='Mar' ;; 4|04) time_monthname='Apr' ;; 5|05) time_monthname='May' ;; 6|06) time_monthname='Jun' ;; 7|07) time_monthname='Jul' ;; 8|08) time_monthname='Aug' ;; 9|09) time_monthname='Sep' ;; 10) time_monthname='Oct' ;; 11) time_monthname='Nov' ;; 12) time_monthname='Dec' ;; esac # # create result string # if [ ".$newline" = .yes ]; then echo $format_string |\ sed -e "s;%u;$username;g" \ -e "s;%h;$hostname;g" \ -e "s;%d;$domainname;g" \ -e "s;%D;$time_day;g" \ -e "s;%M;$time_month;g" \ -e "s;%Y;$time_year;g" \ -e "s;%m;$time_monthname;g" else echo "${format_string}&" |\ sed -e "s;%u;$username;g" \ -e "s;%h;$hostname;g" \ -e "s;%d;$domainname;g" \ -e "s;%D;$time_day;g" \ -e "s;%M;$time_month;g" \ -e "s;%Y;$time_year;g" \ -e "s;%m;$time_monthname;g" |\ awk '-F&' '{ printf("%s", $1); }' fi eperl-2.2.14/etc/fixconfigure100775 1750 1750 1227 6214036613 136030ustar rseen: eval 'exec perl -S $0 ${1+"$@"}' if $running_under_some_shell; ## ## add BASH bootstrap hack to a configure script ## Copyright (c) Ralf S. Engelschall, All Rights Reserved. ## open(FPI, "<$ARGV[0]"); open(FPO, ">$ARGV[0].n"); while () { if (m|#! /bin/sh\n|) { print FPO "#! /bin/sh\n"; print FPO <<'EOF' # if we can run at the top, why should we stay at the bottom any longer? if [ ".$BASH" = . ]; then BASH=`which bash`; if [ ".$BASH" != . ]; then exec $BASH $0 $*; fi; fi EOF ; } else { print FPO $_; } } close(FPO); close(FPI); unlink("$ARGV[0]"); link("$ARGV[0].n", "$ARGV[0]"); unlink("$ARGV[0].n"); ##EOF## eperl-2.2.14/etc/fixperm100775 1750 1750 1227 6305534565 125770ustar rseen#!/bin/sh ## ## fixperm -- Fix File Permission inside Sourcetree ## Copyright (c) Ralf S. Engelschall, All Rights Reserved. ## for p in $*; do for file in `find $p -depth -print`; do if [ -f $file ]; then if [ -x $file ]; then echo " $file (FILE/EXEC)" chmod 775 $file chown rse.users $file else echo " $file (FILE/REGULAR)" chmod 664 $file chown rse.users $file fi continue fi if [ -d $file ]; then echo " $file (DIR)" chmod 775 $file chown rse.users $file continue fi echo " $file (UNKNOWN)" done done ##EOF## eperl-2.2.14/etc/install.sh100775 1750 1750 4320 6561070542 131730ustar rseen#!/bin/sh ## ## install.sh -- install a program, script or datafile ## ## Based on `install-sh' from the X Consortium's X11R5 distribution ## as of 89/12/18 which is freely available. ## Cleaned up for Apache's Autoconf-style Interface (APACI) ## by Ralf S. Engelschall ## # # put in absolute paths if you don't have them in your path; # or use env. vars. # mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" # # parse argument line # instcmd="$mvprog" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" while [ ".$1" != . ]; do case $1 in -c) instcmd="$cpprog" shift; continue ;; -m) chmodcmd="$chmodprog $2" shift; shift; continue ;; -o) chowncmd="$chownprog $2" shift; shift; continue ;; -g) chgrpcmd="$chgrpprog $2" shift; shift; continue ;; -s) stripcmd="$stripprog" shift; continue;; *) if [ ".$src" = . ]; then src=$1 else dst=$1 fi shift; continue ;; esac done if [ ".$src" = . ]; then echo "install.sh: no input file specified" exit 1 fi if [ ".$dst" = . ]; then echo "install.sh: no destination specified" exit 1 fi # # If destination is a directory, append the input filename; if # your system does not like double slashes in filenames, you may # need to add some logic # if [ -d $dst ]; then dst="$dst/`basename $src`" fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $instcmd $src $dsttmp # And set any options; do chmod last to preserve setuid bits if [ ".$chowncmd" != . ]; then $chowncmd $dsttmp; fi if [ ".$chgrpcmd" != . ]; then $chgrpcmd $dsttmp; fi if [ ".$stripcmd" != . ]; then $stripcmd $dsttmp; fi if [ ".$chmodcmd" != . ]; then $chmodcmd $dsttmp; fi # Now rename the file to the real destination. $rmcmd $dst $mvcmd $dsttmp $dst exit 0 eperl-2.2.14/etc/mkdir.sh100775 1750 1750 1465 6561070526 126440ustar rseen#!/bin/sh ## ## mkdir.sh -- make directory hierarchy ## ## Based on `mkinstalldirs' from Noah Friedman ## as of 1994-03-25, which was placed in the Public Domain. ## Cleaned up for Apache's Autoconf-style Interface (APACI) ## by Ralf S. Engelschall ## umask 022 errstatus=0 for file in ${1+"$@"} ; do set fnord `echo ":$file" |\ sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'` shift pathcomp= for d in ${1+"$@"}; do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || errstatus=$? fi pathcomp="$pathcomp/" done done exit $errstatus eperl-2.2.14/etc/mkproto100775 1750 1750 1070 6362457001 126040ustar rseen#!/sw/bin/perl $header = $ARGV[0]; shift @ARGV; $sources = join(" ", @ARGV); open(IN, "<$header"); open(OUT, ">$header.n"); while () { if (m|^/\*_BEGIN_PROTO_\*/|) { while () { last if (m|^/\*_END_PROTO_\*/|); } print OUT "/*_BEGIN_PROTO_*/\n"; open(CP, "cproto -DMKPROTO -e -f3 -v $sources 2>/dev/null|"); while () { if (m|^/\* .+\.c \*/|) { print OUT "\n"; } print OUT $_; } close(CP); print OUT "/*_END_PROTO_*/\n"; next; } print OUT $_; } close(OUT); close(IN); system("mv $header.n $header"); eperl-2.2.14/etc/newvers100775 1750 1750 21416 6511424040 126210ustar rseen#!/bin/sh - ## ## NEWVERS -- setup new program version file ## Copyright (c) 1994-1997 Ralf S. Engelschall, ## ## NOTICE: This intentionally written in Bourne-Shell instead ## of my preferred language Perl because this is also ## used as a version display tool in "./configire" steps... ## VERSION="2.2.2" DATE="02-06-1997" # print version information line print_version () { echo "This is NEWVERS, Version $VERSION ($DATE)" } # give general help information print_help () { cat <<'EOT' NEWVERS -- generate/maintain a version information file Copyright (c) 1994-1997 Ralf S. Engelschall, NEWVERS will create and update a version information file, which can be setup in either plain text or the C or Perl language. Examples: $ newvers -m txt -p TestProg version.txt $ newvers -m c -p TestProg version.c $ newvers -m perl -p TestProg version.pl EOT } # give usage information print_usage () { cat <<'EOT' Usage: newvers [options] versionfile Options are: -l set language to one of "txt", "c" or "perl" -p set program name -r.[.pb]

set release version string -i{v|r|P|p|b|a|s} increase version, revision or {alpha,batch,patch,snap}level -d display current version only -D display current version only (incl. date) -V print NEWVERS version -h print help page EOT } # process the argument line LANGUAGE=unknown PROGNAME="-UNKNOWN-" VERSION=unknown REPORT=NO REPORTFULL=NO INCREASE=P # fallback if "getopt" is not available on system getopt=getopt eval "$getopt" >/dev/null 2>&1 if [ $? -ne 0 ]; then rm -f /tmp/getopt.c >/dev/null 2>&1 cat >/tmp/getopt.c < main(argc, argv) int argc; char *argv[]; { extern int optind; extern char *optarg; int c; int status = 0; optind = 2; /* Past the program name and the option letters. */ while ((c = getopt(argc, argv, argv[1])) != EOF) switch (c) { case '?': status = 1; /* getopt routine gave message */ break; default: if (optarg != NULL) printf(" -%c %s", c, optarg); else printf(" -%c", c); break; } printf(" --"); for (; optind < argc; optind++) printf(" %s", argv[optind]); printf("\n"); exit(status); } EOT cc="" for p in `echo $PATH | sed -e 's/:/ /g'`; do if [ -f "$p/gcc" ]; then cc="$p/gcc" fi done if [ ".$cc" = . ]; then cc="cc" fi $cc -o /tmp/getopt /tmp/getopt.c getopt=/tmp/getopt fi set -- `$getopt l:p:r:i:dDVh $*` if [ $? != 0 ]; then print_usage exit 2 fi rm -f /tmp/getopt /tmp/getopt.c >/dev/null 2>&1 for opt in $*; do case $opt in -l) LANGUAGE=$2; shift; shift ;; -p) PROGNAME=$2; shift; shift ;; -r) VERSION=$2; shift; shift ;; -i) INCREASE=$2; shift; shift ;; -d) REPORT=YES; shift ;; -D) REPORT=YES; REPORTFULL=YES; shift ;; -V) print_version; exit 0 ;; -h) print_help; print_usage; exit 0 ;; --) shift; break ;; esac done case $# in 1) VERSIONFILE=$1 ;; *) print_usage; exit 1 ;; esac # determine language if [ "$LANGUAGE" = "unknown" ]; then case $VERSIONFILE in *.txt ) LANGUAGE=txt ;; *.c ) LANGUAGE=c ;; *.pl | *.pm ) LANGUAGE=perl ;; * ) echo "Unkown language type"; exit 1 ;; esac fi # determine version if [ "$VERSION" = "unknown" ]; then if [ -r "$VERSIONFILE" ]; then # grep out current information id=`grep 'Version [0-9]*.[0-9]*[.abps][0-9]* ([0-9]*-[0-9]*-[0-9]*)' $VERSIONFILE | \ head -1 | \ sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([.abps]\)\([0-9]*\) (\([0-9]*-[0-9]*-[0-9]*\)).*%\1:\2:\3:\4:\5%'` version=`echo $id | awk -F: '{ print $1 }'` revision=`echo $id | awk -F: '{ print $2 }'` bptype=`echo $id | awk -F: '{ print $3 }'` bplevel=`echo $id | awk -F: '{ print $4 }'` date=`echo $id | awk -F: '{ print $5 }'` if [ $REPORT = NO ]; then case $INCREASE in b ) bplevel=`expr $bplevel + 1` bptype=b ;; a ) bplevel=`expr $bplevel + 1` bptype=a ;; s ) bplevel=`expr $bplevel + 1` bptype=s ;; P ) bplevel=`expr $bplevel + 1` bptype=. ;; p ) bplevel=`expr $bplevel + 1` bptype=p ;; r ) revision=`expr $revision + 1` bplevel=0 ;; v ) version=`expr $version + 1` revision=0 bplevel=0 ;; esac date=`date '+%d-%m-19%y'` fi else # intialise to first version version=0 revision=5 bptype=b bplevel=0 date=`date '+%d-%m-19%y'` fi else # take given version VERSION=`echo $VERSION | sed -e 's%\([0-9]*\)\.\([0-9]*\)\([.abps]\)\([0-9]*\).*%\1:\2:\3:\4%'` version=`echo $VERSION | awk -F: '{ print $1 }'` revision=`echo $VERSION | awk -F: '{ print $2 }'` bptype=`echo $VERSION | awk -F: '{ print $3 }'` bplevel=`echo $VERSION | awk -F: '{ print $4 }'` date=`date '+%d-%m-19%y'` fi if [ $REPORT = YES ]; then if [ $REPORTFULL = YES ]; then echo "$version.$revision$bptype$bplevel ($date)" else echo "$version.$revision$bptype$bplevel" fi exit 0; else echo "new version: $version.$revision$bptype$bplevel ($date)" fi # create date string year=`date '+19%y'` month=`date '+%m'` day=`date '+%d'` # create the version file according the the selected language tmpfile="/tmp/newvers.tmp.$$" rm -f $tmpfile case $LANGUAGE in txt ) cat >$tmpfile <<'EOF' This is @PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@) EOF ;; c ) cat >$tmpfile <<'EOF' /* !! This file was automatically generated by NEWVERS !! */ /* for logfiles, etc. */ char @PROGNAME@_Version[] = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; /* interactive 'hello' string to identify us to the user */ char @PROGNAME@_Hello[] = "This is @PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; /* a GNU --version output */ char @PROGNAME@_GNUVersion[] = "@PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; /* a UNIX what(1) id string */ char @PROGNAME@_WhatID[] = "@(#)@PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; /* a RCS ident(1) id string */ char @PROGNAME@_RCSIdentID[] = "$Id: @PROGNAME@ @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ @DAY@-@MONTH@-@YEAR@ $"; /* a WWW id string */ char @PROGNAME@_WebID[] = "@PROGNAME@/@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; /* a plain id string */ char @PROGNAME@_PlainID[] = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; EOF ;; perl ) cat >$tmpfile <<'EOF' # !! This file was automatically generated by NEWVERS !! package Vers; # for logfiles, etc. $@PROGNAME@_Version = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; # interactive 'hello' string to identify us to the user $@PROGNAME@_Hello = "This is @PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; # a GNU --version output $@PROGNAME@_GNUVersion = "@PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; # a UNIX what(1) id string $@PROGNAME@_WhatID = "@(#)@PROGNAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; # a RCS ident(1) id string $@PROGNAME@_RCSIdentID = "\$Id: @PROGNAME@ @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ @DAY@-@MONTH@-@YEAR@ \$"; # a WWW id string $@PROGNAME@_WebID = "@PROGNAME@/@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; # a plain id string $@PROGNAME@_PlainID = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; 1; EOF ;; * ) print_usage; exit 1 ;; esac rm -f $VERSIONFILE # now create the version file sed \ -e "s|@PROGNAME@|$PROGNAME|g" \ -e "s|@VERSION@|$version|g" \ -e "s|@REVISION@|$revision|g" \ -e "s|@BPTYPE@|$bptype|g" \ -e "s|@BPLEVEL@|$bplevel|g" \ -e "s|@YEAR@|$year|g" \ -e "s|@MONTH@|$month|g" \ -e "s|@DAY@|$day|g" <$tmpfile >$VERSIONFILE rm -f $tmpfile ##EOF## eperl-2.2.14/mod/ 40775 1750 1750 0 6561074505 111015ustar rseeneperl-2.2.14/mod/Apache/ 40775 1750 1750 0 6561074505 122625ustar rseeneperl-2.2.14/mod/Apache/MANIFEST100664 1750 1750 45 6405743526 134520ustar rseenMANIFEST Makefile.PL README ePerl.pm eperl-2.2.14/mod/Apache/Makefile.PL100664 1750 1750 256 6334033253 143050ustar rseen## ## Makefile.PL -- MakeMaker config file ## use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'Apache::ePerl', 'VERSION_FROM' => 'ePerl.pm', ); ##EOF## eperl-2.2.14/mod/Apache/README100664 1750 1750 742 6405745464 132300ustar rseen Apache::ePerl ============= This module is the Apache/mod_perl handler which provides a fast webserver-internal ePerl facility by emulating the external ePerl CGI-program by the use of its Parse::ePerl package. CPAN Module List Entry: Name DSLI Description Info ------------- ---- -------------------------------------------- ----- Apache:: ::ePerl Rdpr Fast emulated Embedded Perl (ePerl) facility RSE eperl-2.2.14/mod/Apache/ePerl.pm100664 1750 1750 41122 6561064024 137770ustar rseen## ____ _ ## ___| _ \ ___ _ __| | ## / _ \ |_) / _ \ '__| | ## | __/ __/ __/ | | | ## \___|_| \___|_| |_| ## ## ePerl -- Embedded Perl 5 Language ## ## ePerl interprets an ASCII file bristled with Perl 5 program statements ## by evaluating the Perl 5 code while passing through the plain ASCII ## data. It can operate both as a standard Unix filter for general file ## generation tasks and as a powerful Webserver scripting language for ## dynamic HTML page programming. ## ## ====================================================================== ## ## Copyright (c) 1996,1997 Ralf S. Engelschall, All rights reserved. ## ## This program is free software; it may be redistributed and/or modified ## only under the terms of either the Artistic License or the GNU General ## Public License, which may be found in the ePerl source distribution. ## Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ## a built-in copy of both license files. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ## Artistic License or the GNU General Public License for more details. ## ## ====================================================================== ## ## ePerl.pm -- Fast emulated Embedded Perl (ePerl) facility ## package Apache::ePerl; # requirements and runtime behaviour require 5.00325; use strict; use vars qw($VERSION); use vars qw($nDone $nOk $nFail $Cache $Config); # imports use Carp; use Apache (); use Apache::Debug; use Apache::Constants qw(:common OPT_EXECCGI); use FileHandle (); use File::Basename qw(dirname); use Parse::ePerl; # private version number $VERSION = do { my @v=("2.2.14"=~/\d+/g); sprintf "%d."."%02d"x$#v,@v }; # globals $nDone = 0; $nOk = 0; $nFail = 0; $Cache = {}; # configuration $Config = { 'BeginDelimiter' => ' '!>', 'CaseDelimiters' => 0, 'ConvertEntities' => 1 }; # # send HTML error page # sub send_errorpage { my ($r, $e, $stderr) = @_; $r->content_type('text/html'); $r->send_http_header; $r->print( "\n" . "\n" . "Apache::ePerl: Error\n" . "\n" . "\n" . "

\n" . "

Apache::ePerl

\n" . "Version $VERSION\n" . "

\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "
\n" . "ERROR:\n" . "
\n" . "

$e

\n" . "
\n" . "

\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "
\n" . "Contents of STDERR channel:\n" . "
\n" . "
$stderr
\n" . "
\n" . "

\n" . "\n" . "\n" ); $r->log_reason("Apache::ePerl: $e", $r->filename); } # # helping functions to create time strings # sub ctime { my ($time) = @_; my @dow = ( 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ); my @moy = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); my ($str) = sprintf("%s %s %2d %02d:%02d:%02d 19%s%s", $dow[$wday], $moy[$mon], $mday, $hour, $min, $sec, $year, $isdst ? " DST" : ""); return $str; } sub isotime { my ($time) = @_; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); my ($str) = sprintf("%02d-%02d-19%02d %02d:%02d", $mday, $mon+1, $year, $hour, $min); return $str; } # # the mod_perl handler # sub handler { my ($r) = @_; my ($filename, $data, $error, $fh); my (%env, $rc, $mtime, $owner, $size, $header, $key, $value, $path, $dir, $file, @S); # statistic $nDone++; # create an request object for Apache::Registory-based # scripts like newer CGI.pm versions Apache->request($r); # import filename from Apache API $filename = $r->filename; # check for invalid filename if (-d $filename) { $r->log_reason("Apache::ePerl: Attempt to invoke directory as ePerl script", $filename); return FORBIDDEN; } if (not (-f _ and -s _)) { $r->log_reason("Apache::ePerl: File not exists, not readable or empty", $filename); return NOT_FOUND; } # check if we are allowed to use ePerl if (not ($r->allow_options & OPT_EXECCGI)) { $r->log_reason("Apache::ePerl: Option ExecCGI is off in this directory", $filename); return FORBIDDEN; } # determine script file information @S = stat(_); $size = $S[7]; $mtime = $S[9]; $owner = (getpwuid($S[4]))[0] || 'UNKNOWN'; # check cache for existing P-code if (not ( $Cache->{$filename} and $Cache->{$filename}->{CODE} and $Cache->{$filename}->{SIZE} == $size and $Cache->{$filename}->{MTIME} == $mtime and $Cache->{$filename}->{OWNER} eq $owner)) { # read script local ($/) = undef; $fh = new FileHandle $filename; $data = <$fh>; $fh->close; # run the preprocessor over the script if (not Parse::ePerl::Preprocess({ Script => $data, Cwd => dirname($filename), Result => \$data })) { &send_errorpage($r, 'Error on preprocessing script', ''); $nFail++; return OK; } # translate the script from bristled # ePerl format to plain Perl format if (not Parse::ePerl::Translate({ Script => $data, BeginDelimiter => $Config->{'BeginDelimiter'}, EndDelimiter => $Config->{'EndDelimiter'}, CaseDelimiters => $Config->{'CaseDelimiters'}, ConvertEntities => $Config->{'ConvertEntities'}, Result => \$data })) { &send_errorpage($r, 'Error on translating script from bristled to plain format', ''); $nFail++; return OK; } # precompile the source into P-code $error = ''; if (not Parse::ePerl::Precompile({ Script => $data, Name => $filename, Cwd => dirname($filename), Result => \$data, Error => \$error })) { &send_errorpage($r, 'Error on precompiling script from plain format to P-code', $error); $nFail++; return OK; } # set the new results $Cache->{$filename} = {}; $Cache->{$filename}->{CODE} = $data; $Cache->{$filename}->{SIZE} = $size; $Cache->{$filename}->{MTIME} = $mtime; $Cache->{$filename}->{OWNER} = $owner; } # retrieve precompiled script from cache $data = $Cache->{$filename}->{CODE}; # create runtime environment %env = $r->cgi_env; $env{'VERSION_LANGUAGE'} = "Perl/$]"; $env{'VERSION_INTERPRETER'} = "ePerl/$VERSION"; $path = 'http://'; $path .= $r->server->server_hostname; $path .= sprintf(':%d', $r->server->port) if ($r->server->port != 80); $path .= $r->uri; ($dir, $file) = ($path =~ m|^(.*/)([^/]*)$|); $env{'SCRIPT_SRC_URL'} = $path; $env{'SCRIPT_SRC_URL_DIR'} = $dir; $env{'SCRIPT_SRC_URL_FILE'} = $file; $path = $filename; ($dir, $file) = ($path =~ m|^(.*/)([^/]*)$|); $env{'SCRIPT_SRC_PATH'} = $path; $env{'SCRIPT_SRC_PATH_DIR'} = $dir; $env{'SCRIPT_SRC_PATH_FILE'} = $file; $env{'SCRIPT_SRC_MODIFIED'} = sprintf("%d", $mtime); $env{'SCRIPT_SRC_MODIFIED_CTIME'} = &ctime($mtime); $env{'SCRIPT_SRC_MODIFIED_ISOTIME'} = &isotime($mtime); $env{'SCRIPT_SRC_SIZE'} = sprintf("%d", $size); $env{'SCRIPT_SRC_OWNER'} = $owner; # evaluate script if (not Parse::ePerl::Evaluate({ Script => $data, Name => $filename, Cwd => dirname($filename), ENV => \%env, Result => \$data, Error => \$error })) { &send_errorpage($r, 'Error on evaluating script from P-code', $error); $nFail++; return OK; } # generate headers if ($data =~ m|^([A-Za-z0-9-]+:\s.+?\n\n)(.*)$|s) { ($header, $data) = ($1, $2); $r->content_type('text/html'); $r->cgi_header_out('Content-Length', sprintf("%d", length($data))); while ($header =~ m|^([A-Za-z0-9-]+):\s+(.+?)\n(.*)$|s) { ($key, $value, $header) = ($1, $2, $3); if ($key =~ m|^Content-Type$|i) { $r->content_type($value); } else { $r->cgi_header_out($key, $value); } } } else { $r->content_type('text/html'); $r->cgi_header_out('Content-Length', sprintf("%d", length($data))); } # send resulting page $r->send_http_header; $r->print($data) if (not $r->header_only); # statistic $nOk++; # make Apache API happy ;_) return OK; } # # optional Apache::Status information # Apache::Status->menu_item( 'ePerl' => 'Apache::ePerl status', sub { my ($r, $q) = @_; my (@s, $cs, $cn, $e); push(@s, "Status Information about Apache::ePerl
"); push(@s, "Versions: Apache::ePerl $VERSION, Parse::ePerl $Parse::ePerl::VERSION"); push(@s, "

\n"); push(@s, "\n"); push(@s, "\n"); push(@s, ""); push(@s, "\n"); push(@s, "\n"); push(@s, ""); push(@s, "\n"); $cs = 0; $cn = 0; foreach $e (keys(%{$Cache})) { $cn += 1; $cs += $Cache->{$e}->{SIZE}; } push(@s, "\n"); push(@s, "\n"); push(@s, "\n"); push(@s, "
Runtime Statistic
Interpreted Documents: $nDone ($nOk ok, $nFail failed)
Cached Documents: $cn ($cs bytes)
\n"); return \@s; } ) if Apache->module('Apache::Status'); # sometimes Perl wants it... sub DESTROY { }; 1; ##EOF## __END__ =head1 NAME Apache::ePerl - Fast emulated Embedded Perl (ePerl) facility =head1 SYNOPSIS # Apache's httpd.conf file # mandatory: activation of Apache::ePerl PerlModule Apache::ePerl Options +ExecCGI SetHandler perl-script PerlHandler Apache::ePerl # optional: configuration of Apache::ePerl $Apache::ePerl::Config->{'BeginDelimiter'} = '{'EndDelimiter'} = '!>'; $Apache::ePerl::Config->{'CaseDelimiters'} = 0; $Apache::ePerl::Config->{'ConvertEntities'} = 1; # optional: activation of Apache::Status for Apache::ePerl Options +ExecCGI SetHandler perl-script PerlHandler Apache::Status =head1 DESCRIPTION This packages provides a handler function for Apache/mod_perl which can be used to emulate the stand-alone Server-Side-Scripting-Language I (see eperl(3) for more details) in a very fast way. This is not a real 100% replacement for F because of reduced functionality under some special cases, principal runtime restrictions and speedup decisions. For instance this variant does not (and cannot) provide the SetUID feature of ePerl nor does it check for allowed filename extensions (speedup!), etc. Instead it uses further features like object caching which ePerl does not use. But the accepted bristled source file format is exactly the same as with the regular ePerl facility, because Apache::ePerl uses the Parse::ePerl package which provides the original ePerl parser and translator. So, any valid ePerl which works under F can also be used under Apache::ePerl. The intent is to use this special variant of ePerl for scripts which are directly under control of the webmaster. In this situation no real security problems exists for him, because all risk is at his own hands. For the average user you should B use Apache::ePerl. Instead additionally install the regular stand-alone ePerl facility (F) for those users. So, the advantage of Apache::ePerl against the regular F is better performance and nothing else. Actually scripts executed under Apache::ePerl are at least twice as fast as under F. The reason its not that ePerl itself is faster. The reason is the runtime in-core environment of Apache/mod_perl which does not have any forking overhead. =head2 Installation and Configuration First you have to install Apache::ePerl so that Apache/mod_perl can find it. This is usually done via configuring the ePerl distribution via the same Perl interpreter as was used when building Apache/mod_perl. Second, you have to add the following config snippet to Apache's F file: PerlModule Apache::ePerl Options +ExecCGI SetHandler perl-script PerlHandler Apache::ePerl This forces all files under the directory /root/of/webmaster/area/ with extension .iphtml to be processed by the Apache::ePerl::handler function which emulates the runtime behavior of the stand-alone "eperl" program (when run as a SSSL) up to 90%. If you're not paranoid about security (for instance driving a stand-alone webserver without user accounts) you can also just use PerlModule Apache::ePerl SetHandler perl-script PerlHandler Apache::ePerl which enables .iphtml files everywhere. Third, when you want to change the defaults of the ePerl parser, you also can add something like this to the end of the snippet above. $Apache::ePerl::Config->{'BeginDelimiter'} = '{'EndDelimiter'} = '!>'; $Apache::ePerl::Config->{'CaseDelimiters'} = 0; $Apache::ePerl::Config->{'ConvertEntities'} = 1; Fourth, you can additionally enable the mod_perl runtime status which then automatically enables an Apache::ePerl status handler: Options +ExecCGI SetHandler perl-script PerlHandler Apache::Status This enables the URL C in general and the URL C in special. Use it to see how much scripts where run and how much are still cached. =head1 AUTHOR Ralf S. Engelschall rse@engelschall.com www.engelschall.com =head1 HISTORY Apache::ePerl was first implemented by Mark Imbriaco Emark@itribe.netE in December 1996 as a plain Perl module after he has seen the original ePerl from Ralf S. Engelschall. It implemented the ePerl idea, but was not compatible to the original ePerl. In May 1997 Hanno Mueller Ehmueller@kabel.deE has taken over the maintainance from Mark I. and enhanced Apache::ePerl by adding caching for P-Code, adding the missing C stuff, etc. Nearly at the same time Ralf S. Engelschall was unhappy of the old Apache::ePerl from Mark I. and already started to write this version (the one you are current reading its POD). He has rewritten the complete module from scratch, but incorporated the P-Code caching idea and the Apache::Status usage from Hanno M.'s version. The big difference between this one and Mark I.'s or Hanno M.'s versions are that this version makes use of the new Parse::ePerl module which itself incorporates the original ePerl parser. So this version is more compliant to the original ePerl facility. =head1 SEE ALSO Parse::ePerl(3) Web-References: Perl: perl(1), http://www.perl.com/ ePerl: eperl(1), http://www.engelschall.com/sw/eperl/ mod_perl: mod_perl(1), http://perl.apache.org/ Apache: httpd(7), http://www.apache.org/ =cut ##EOF## eperl-2.2.14/mod/MANIFEST100664 1750 1750 503 6405743477 123150ustar rseenMANIFEST README Makefile.PL Apache/MANIFEST Apache/README Apache/Makefile.PL Apache/ePerl.pm Parse/MANIFEST Parse/Makefile.PL Parse/README Parse/ePerl.pm Parse/ePerl.xs Parse/t/01_load.t Parse/t/02_preprocess.t Parse/t/03_translate.t Parse/t/04_precompile.t Parse/t/05_evaluate.t Parse/t/06_expand.t Parse/t/07_delimiter.t eperl-2.2.14/mod/Makefile.PL100664 1750 1750 250 6405171343 131200ustar rseen## ## Makefile.PL -- MakeMaker config file ## use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'Parse::ePerl', 'DIR' => ['Parse', 'Apache'], ); ##EOF## eperl-2.2.14/mod/Parse/ 40775 1750 1750 0 6561074505 121535ustar rseeneperl-2.2.14/mod/Parse/MANIFEST100664 1750 1750 236 6343567645 133740ustar rseenMANIFEST Makefile.PL README ePerl.pm ePerl.xs t/01_load.t t/02_preprocess.t t/03_translate.t t/04_precompile.t t/05_evaluate.t t/06_expand.t t/07_delimiter.t eperl-2.2.14/mod/Parse/Makefile.PL100664 1750 1750 617 6337310065 142010ustar rseen## ## Makefile.PL -- MakeMaker config file ## use ExtUtils::MakeMaker; # avoid implicit conversion by MakeMaker # which is introduced by a not very nice Warning... use Cwd; ($root = cwd()) =~ s|/[^/]+/[^/]+/?$||; WriteMakefile( 'NAME' => 'Parse::ePerl', 'VERSION_FROM' => 'ePerl.pm', 'INC' => "-I$root", 'LIBS' => ["-L$root -leperl"], ); ##EOF## eperl-2.2.14/mod/Parse/README100664 1750 1750 1005 6405746003 131200ustar rseen Parse::ePerl ============ This module is the Perl 5 glue code which makes the ePerl parser available as an integrated Perl module named Parse::ePerl which can be used to transform a bristled source code buffer into an expanded source code buffer. CPAN Module List Entry: Name DSLI Description Info ------------- ---- -------------------------------------------- ----- Parse:: ::ePerl Rdcr Embedded Perl (ePerl) parser RSE eperl-2.2.14/mod/Parse/ePerl.pm100664 1750 1750 33411 6561064024 136720ustar rseen## ____ _ ## ___| _ \ ___ _ __| | ## / _ \ |_) / _ \ '__| | ## | __/ __/ __/ | | | ## \___|_| \___|_| |_| ## ## ePerl -- Embedded Perl 5 Language ## ## ePerl interprets an ASCII file bristled with Perl 5 program statements ## by evaluating the Perl 5 code while passing through the plain ASCII ## data. It can operate both as a standard Unix filter for general file ## generation tasks and as a powerful Webserver scripting language for ## dynamic HTML page programming. ## ## ====================================================================== ## ## Copyright (c) 1996,1997 Ralf S. Engelschall, All rights reserved. ## ## This program is free software; it may be redistributed and/or modified ## only under the terms of either the Artistic License or the GNU General ## Public License, which may be found in the ePerl source distribution. ## Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive ## a built-in copy of both license files. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the ## Artistic License or the GNU General Public License for more details. ## ## ====================================================================== ## ## ePerl.pm -- Perl interface to the ePerl parser (Perl part) ## package Parse::ePerl; # requirements and runtime behaviour require 5.00325; use strict; use vars qw($VERSION @ISA @EXPORT $AUTOLOAD); # imports require Exporter; require DynaLoader; require AutoLoader; use Carp; use Cwd qw(fastcwd); #use Safe; # interface @ISA = qw(Exporter DynaLoader); @EXPORT = qw(); # private version number $VERSION = do { my @v=("2.2.14"=~/\d+/g); sprintf "%d."."%02d"x$#v,@v }; # dynaloader bootstrapping bootstrap Parse::ePerl $VERSION; # untainting a variable: for restricted environments like # Apache/mod_perl under which our caller Apache::ePerl could run sub Untaint { my ($var) = @_; # see perlsec(1) ${$var} =~ m|^(.*)$|s; ${$var} = $1; } ## ## Preprocess -- run the ePerl preprocessor over the script ## which expands #include directives ## sub Preprocess ($) { my ($p) = @_; my ($result, $ocwd); # error if no input or no output if ( not $p->{Script} || not $p->{Result}) { return 0; } # set defaults $p->{INC} ||= [ '.' ]; # switch to directory of file if ($p->{Cwd}) { Untaint(\$p->{Cwd}); $ocwd = fastcwd(); chdir($p->{Cwd}); } # use XS part: PP (preprocessor) $result = PP( $p->{Script}, $p->{INC} ); # restore Cwd chdir($ocwd) if ($p->{Cwd}); if ($result eq '') { return 0; } else { ${$p->{Result}} = $result; return 1; } } ## ## Translate -- translate a plain Perl script from ## bristled code to plain Perl code ## sub Translate ($) { my ($p) = @_; my ($result); # error if no input or no output if ( not $p->{Script} || not $p->{Result}) { return 0; } # set defaults $p->{BeginDelimiter} ||= '<:'; $p->{EndDelimiter} ||= ':>'; $p->{CaseDelimiters} ||= 0; $p->{ConvertEntities} ||= 0; # use XS part: Bristled2Plain $result = Bristled2Plain( $p->{Script}, $p->{BeginDelimiter}, $p->{EndDelimiter}, $p->{CaseDelimiters}, $p->{ConvertEntities} ); if ($result eq '') { return 0; } else { ${$p->{Result}} = $result; return 1; } } ## ## Precompile -- precompile a plain Perl script to ## internal Perl code (P-code) by storing ## the script into a subroutine ## sub Precompile ($) { my ($p) = @_; my ($error, $func, $ocwd); # error if no input or no output if ( not $p->{Script} || not $p->{Result}) { return 0; } # capture the warning messages which # usually are send to STDERR and # disable the die of the interpreter $error = ''; local $SIG{'__WARN__'} = sub { $error .= $_[0]; }; local $SIG{'__DIE__'}; # switch to directory of file if ($p->{Cwd}) { Untaint(\$p->{Cwd}); $ocwd = fastcwd(); chdir($p->{Cwd}); } # precompile the source into P-code #my $cp = new Safe("Safe::ePerl"); #$func = $cp->reval('$func = sub {'.$p->{Script}.'};'); Untaint(\$p->{Script}); eval("\$func = sub {" . $p->{Script} . "};"); $error = "$@" if ($@); # restore Cwd chdir($ocwd) if ($p->{Cwd}); # return the result if ($error) { $error =~ s|\(eval \d+\)|$p->{Name}| if ($p->{Name}); ${$p->{Error}} = $error if ($p->{Error}); $@ = $error; return 0; } else { ${$p->{Result}} = $func; $@ = ''; return 1; } } ## ## Evaluate -- evaluate a script which is either ## give as a P-code reference or as ## a plain Perl script sub Evaluate ($) { my ($p) = @_; my ($stdout, $stderr, %OENV, $ocwd); my ($result, $error); # error if no input or no output if ( not $p->{Script} || not $p->{Result}) { return 0; } # capture STDOUT and STDERR $stdout = tie(*STDOUT, 'Parse::ePerl'); $stderr = tie(*STDERR, 'Parse::ePerl'); # setup the environment if ($p->{ENV}) { %OENV = %ENV; %ENV = %{$p->{ENV}}; } # switch to directory of file if ($p->{Cwd}) { $ocwd = fastcwd(); chdir($p->{Cwd}); } # capture the warning messages which # usually are send to STDERR (and which # cannot be captured by our tie!) plus # disable the die of the interpreter $error = ''; local $SIG{'__WARN__'} = sub { $error .= $_[0]; }; local $SIG{'__DIE__'} = sub { $error .= $_[0]; }; # now evaluate the script which # produces content on STDOUT and perhaps # additionally on STDERR if (ref($p->{Script})) { # a P-code reference &{$p->{Script}}; } else { # a plain code string eval $p->{Script}; } # retrieve captured data from STDOUT $result = ${$stdout}; # retrieve either the error message # (on syntax errors) or the generated data # on STDERR (when generated by the script) $error ||= ${$stderr}; $error =~ s|\(eval \d+\)|$p->{Name}| if (defined($error) && $p->{Name}); # restore Cwd chdir($ocwd) if ($p->{Cwd}); # restore environment %ENV = %OENV if ($p->{ENV}); # remove capturing mode from STDOUT/STDERR undef($stdout); undef($stderr); untie(*STDOUT); untie(*STDERR); # set the result ${$p->{Result}} = $result; ${$p->{Error}} = $error if ($p->{Error}); # return the result codes if ($error) { $@ = $error; return 0; } else { $@ = ''; return 1; } } ## ## Expand -- the steps Translate & Evaluate ## just combined into one step ## sub Expand ($) { my ($p) = @_; my ($rc, $script); # error if no input or no output if ( not $p->{Script} || not $p->{Result}) { return 0; } if (not Translate($p)) { return 0; } $script = $p->{Script}; $p->{Script} = ${$p->{Result}}; $rc = Evaluate($p); $p->{Script} = $script; return $rc; } ## ## Capture -- methods for capturing a filehandle ## (used by Evaluate) via this class ## sub TIEHANDLE { my ($class, $c) = @_; return bless(\$c,$class); } sub PRINT { my ($self) = shift; ${$self} .= join('', @_); } sub PRINTF { my ($self) = shift; my ($fmt) = shift; ${$self} .= sprintf($fmt, @_); } # sometimes Perl wants it... sub DESTROY { }; 1; ##EOF## __END__ =head1 NAME Parse::ePerl - Perl interface to the ePerl parser =head1 SYNOPSIS use Parse::ePerl; $rc = Parse::ePerl::Preprocess($p); $rc = Parse::ePerl::Translate($p); $rc = Parse::ePerl::Precompile($p); $rc = Parse::ePerl::Evaluate($p); $rc = Parse::ePerl::Expand($p); =head1 DESCRIPTION Parse::ePerl is the Perl 5 interface package to the functionality of the ePerl parser (see eperl(1) for more details about the stand-alone program). It directly uses the parser code from ePerl to translate a bristled script into a plain Perl script and additionally provides functions to precompile such scripts into P-code and evaluate those scripts to a buffer. All functions are parameterized via a hash reference C<$p> which provide the necessary parameters. The result is a return code C<$rc> which indicates success (1) or failure (0). =head2 B This is the ePerl preprocessor which expands C<#include> directives. See eperl(1) for more details. Possible parameters for C<$p>: =over 4 =item I