pax_global_header00006660000000000000000000000064123376752620014527gustar00rootroot0000000000000052 comment=3637f5a4f5e3b3200b05fb35cc5d7e309405e618 liblucy-perl-0.3.3/000077500000000000000000000000001233767526200141355ustar00rootroot00000000000000liblucy-perl-0.3.3/Build.PL000066400000000000000000000035651233767526200154420ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use 5.008003; use strict; use warnings; use lib 'buildlib'; use Lucy::Build; my $builder = Lucy::Build->new( module_name => 'Lucy', license => 'apache', dist_author => 'The Apache Lucy Project ', dist_version => '0.3.3', requires => { 'perl' => '5.8.3', }, configure_requires => { 'Module::Build' => 0.280801 }, build_requires => { 'Module::Build' => 0.280801, 'ExtUtils::CBuilder' => 0.21, 'ExtUtils::ParseXS' => 2.18, 'Devel::PPPort' => 3.13, }, meta_merge => { keywords => [qw( search lucy lucene )], }, meta_add => { resources => { homepage => 'http://lucy.apache.org', repository => 'http://git-wip-us.apache.org/repos/asf/lucy.git', bugtracker => 'https://issues.apache.org/jira/browse/LUCY', }, }, add_to_cleanup => [ qw( Lucy-* MANIFEST.bak perltidy.ERR *.pdb *.manifest ), ], ); $builder->create_build_script(); __END__ liblucy-perl-0.3.3/CHANGES000066400000000000000000000120631233767526200151320ustar00rootroot00000000000000Revision history for Lucy 0.3.3 2013-07-22 Bugfixes: * [LUCY-239] - Simplify JSON Parser Y File * [LUCY-243] - Trap remove errno and warn * [LUCY-245] - Charmonizer fails to detect syntax for 64-bit integer literals * [LUCY-259] - Compensate for Perl export flakiness of to_utf8_lower 0.3.2 2012-07-05 Bugfixes: * [LUCY-238] - Improve reliability of loading from JSON 0.3.1 2012-05-04 Bugfixes: * [LUCY-213] - Explicit version number for each Perl module * [LUCY-216] - t/152-inversion.t failure * [LUCY-235] - Don't ship dev-only tests with CPAN tarball Tasks: * [LUCY-218] - Adapt codebase for TLP status 0.3.0 2012-01-15 New features: * [LUCY-173] - Bundle Lemon parser generator * [LUCY-189] - Bundle utf8proc * [LUCY-191] - Unicode normalization The new analyzer Lucy::Analysis::Normalizer provides Unicode normalization, case folding and stripping of accents. * [LUCY-196] - UAX #29 tokenizer The new analyzer Lucy::Analysis::StandardTokenizer tokenizes according to the UAX #29 word break rules. * [LUCY-203] - Implement EasyAnalyzer EasyAnalyzer is simple analysis chain using the StandardTokenizer, the Normalizer, and the SnowballStemmer. Bugfixes: * [LUCY-175] - Missing stdarg.h breaks build * [LUCY-176] - More INCREF/DECREF symbol collisions under Windows * [LUCY-178] - Discriminate between stdio and POSIX in large file support probing. * [LUCY-180] - ORQuery, ANDQuery, RequiredOptionalQuery optimizations affect scoring * [LUCY-181] - Perl Documentation fix - Remove links to classes within docs, that are not exposed to Perl * [LUCY-182] - highlighter bug when searching for duplicate terms [wordX wordX] * [LUCY-183] - Eliminate spurious "extra" query normalization * [LUCY-185] - Improve error handling when required params not supplied * [LUCY-186] - Terminate connection from SearchClient properly * [LUCY-187] - Adapt to GC changes in Perl 5.15 * [LUCY-188] - Highlighter should accept weighted Queries (Compilers) * [LUCY-193] - Occasional schema file name collision under 'truncate' * [LUCY-195] - Revisit pthreads linking on OpenBSD. * [LUCY-206] - Work around broken export in Perl 5.15.6 Improvements: * [LUCY-142] - Port Clownfish compiler to C * [LUCY-143] - Convert Clownfish::Parser to Lemon * [LUCY-179] - Tighten UTF-8 validity checks. * [LUCY-197] - Clean whitespace for 0.3.0 * [LUCY-204] - Process ClusterSearcher RPCs in parallel * [LUCY-205] - Parallel processing for SearchServer This introduces an incompatible API change: The port argument has moved from the constructor to the serve method and the password argument has been removed. Tasks: * [LUCY-133] - Eliminate JSON::XS dependency * [LUCY-134] - Eliminate Parse::RecDescent dependency * [LUCY-137] - Dependency licensing in grant code 0.2.2 2011-10-19 Bugfixes: * [LUCY-175] - Missing stdarg.h breaks build * [LUCY-176] - More INCREF/DECREF symbol collisions under Windows * [LUCY-180] - ORQuery, ANDQuery, RequiredOptionalQuery optimizations affect scoring * [LUCY-181] - Perl Documentation fix - Remove links to classes within docs, that are not exposed to Perl * [LUCY-182] - highlighter bug when searching for duplicate terms [wordX wordX] * [LUCY-183] - Eliminate spurious "extra" query normalization 0.2.1 2011-08-14 Bugfixes: * [LUCY-174] - Filepath naming glitch breaks CPAN build process 0.2.0 2011-07-24 Bugfixes: * [LUCY-152] - Bad prototype for MAKE_MESS when no variadic macros available * [LUCY-153] - XSLoader version string mismatch * [LUCY-154] - Double-quote all #error directives * [LUCY-155] - TestFSFileHandle's Close() test on Windows fails to clean up * [LUCY-157] - Add -pthread linker flag on OpenBSD * [LUCY-158] - Disable LockFreeRegistry test by default * [LUCY-160] - Always disable symlink tests on Windows * [LUCY-161] - Always use CreateHardLink() on Windows * [LUCY-162] - Use shell to redirect Charmonizer stderr on Windows * [LUCY-164] - Skip forking tests under Cygwin * [LUCY-165] - Line-ending-agnostic parsing of sample docs * [LUCY-166] - Prefer POSIX over windows.h for process ID * [LUCY-167] - INCREF/DECREF symbol collisions under Windows in FSDirHandle.c * [LUCY-168] - Directory handling under Cygwin * [LUCY-172] - Clownfish should slurp files in text mode Improvements: * [LUCY-156] - Address GCC warnings for Charmonizer code * [LUCY-163] - Target Windows XP * [LUCY-169] - Improve cleanup after MSVC * [LUCY-170] - Charmonizer test compiles should use obj rather than exe when possible * [LUCY-171] - Turn off stupid MSVC warnings 0.1.0 2011-05-20 Initial release, adapted from a software grant for the KinoSearch codebase. liblucy-perl-0.3.3/CONTRIBUTING000066400000000000000000000054551233767526200160000ustar00rootroot00000000000000=========================== Contributing to Apache Lucy =========================== MAKE A PLAN: If you're looking for something to work on, see the STATUS file for a list of development priorities that the Lucy community has already built consensus around. If you propose to make non-trivial changes to Lucy, especially changes to the public API, send a note to the Lucy developer's list describing your plans: http://lucy.apache.org/mailing_lists.html GET THE CODE: Lucy's codebase is available via Git from git.apache.org. Start by creating a clone of the repository: # Non Committers git clone http://git-wip-us.apache.org/repos/asf/lucy.git # Committers git clone https://git-wip-us.apache.org/repos/asf/lucy.git There is also a mirror on Github. https://github.com/apache/lucy MAKE CHANGES: Edit the source code as you see fit, then follow the instructions in INSTALL to build Lucy and run its test suite. Please bear the following in mind: * All code will eventually need to be portable to multiple operating systems and compilers. (This is a complex requirement and it should not block your contribution.) * All public APIs must be documented. * Code should be formatted according to the style guidelines at . * All unit tests must pass. * New code needs to be accompanied by new unit tests. * Simplicity, both in terms of API and implementation, is highly valued within the Lucy development community; the simpler the contribution, the more quickly it can be reviewed and integrated. GENERATE A PATCH: The easiest way to create a patch with Git is to capture the output of `git diff`: git diff > my_changes.patch More experienced Git users may wish to generate patch sequences using `git format-patch`. CONTRIBUTE YOUR PATCH Lucy's issue-tracker/bug-tracker installation runs Atlassian JIRA and we generally use the term "issue" rather than "bug" because not every contribution fixes a "bug". https://issues.apache.org/jira/browse/LUCY 1. Create a JIRA account for yourself and sign in. 2. Once you have signed in, the "create new issue" link will appear. Either use it to open a new issue or navigate to an existing one as appropriate. 3. Attach your patch to the issue using the menu command 'More Actions > Attach Files'. Attaching a file to an issue causes an email notification to be sent to the lucy-issues list signalling that a patch has arrived. Please be patient but persistent while engaging with the Lucy committers who review and apply such patches. GITHUB PULL REQUESTS At this time, we have no way to accept pull requests for the Github read-only mirror, so please use the JIRA patch submission process. liblucy-perl-0.3.3/INSTALL000066400000000000000000000006351233767526200151720ustar00rootroot00000000000000Installing Apache Lucy with Perl bindings ========================================= To install Apache Lucy as a suite of Perl modules, run the following commands: perl Build.PL perl Build perl Build test perl Build install Module::Build is required. Since Perl 5.10.0, Module::Build has been bundled with the Perl core, but on older systems it may be necessary to install it from CPAN first. liblucy-perl-0.3.3/LICENSE000066400000000000000000000436561233767526200151600ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Portions of the Snowball stemming library are bundled with this distribution under modules/analysis/snowstem and modules/analysis/snowstop. Here is the license for those materials: Copyright (c) 2001, Dr Martin Porter Copyright (c) 2002, Richard Boulton All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Portions of the utf8proc library are bundled with this distribution under modules/unicode/utf8proc. The utf8proc library also contains materials derived from files licensed by the Unicode consortium. Here are the licenses for all bundled materials associated with utf8proc: Copyright (c) 2009 Public Software Group e. V., Berlin, Germany Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This software distribution contains derived data from a modified version of the Unicode data files. The following license applies to that data: COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1991-2007 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that (a) the above copyright notice(s) and this permission notice appear with all copies of the Data Files or Software, (b) both the above copyright notice(s) and this permission notice appear in associated documentation, and (c) there is clear notice in each modified Data File or in the Software as well as in the documentation associated with the Data File(s) or Software that the data or software has been modified. THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be registered in some jurisdictions. All other trademarks and registered trademarks mentioned herein are the property of their respective owners. This product bundles the Lemon parser generator from the SQLite project, which has been released into the public domain by its authors as explained at . This product bundles the text of the Constitution of the United States of America, which is in the public domain. This product bundles the install-sh script from the GNU autotools project, which is released under an MIT/X11 license. install - install a program, script, or datafile This comes from X11R5 (mit/util/scripts/install.sh). Copyright 1991 by the Massachusetts Institute of Technology Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. liblucy-perl-0.3.3/MANIFEST000066400000000000000000001135041233767526200152720ustar00rootroot00000000000000Build.PL buildlib/Lucy/Build.pm buildlib/Lucy/Redacted.pm buildlib/Lucy/Test/TestUtils.pm CHANGES charmonizer/charmonize.c charmonizer/Makefile charmonizer/Makefile.MinGW charmonizer/Makefile.MSVC charmonizer/README charmonizer/src/Charmonizer/Core/Compiler.c charmonizer/src/Charmonizer/Core/Compiler.h charmonizer/src/Charmonizer/Core/ConfWriter.c charmonizer/src/Charmonizer/Core/ConfWriter.h charmonizer/src/Charmonizer/Core/Defines.h charmonizer/src/Charmonizer/Core/HeaderChecker.c charmonizer/src/Charmonizer/Core/HeaderChecker.h charmonizer/src/Charmonizer/Core/OperatingSystem.c charmonizer/src/Charmonizer/Core/OperatingSystem.h charmonizer/src/Charmonizer/Core/Util.c charmonizer/src/Charmonizer/Core/Util.h charmonizer/src/Charmonizer/Probe.c charmonizer/src/Charmonizer/Probe.h charmonizer/src/Charmonizer/Probe/AtomicOps.c charmonizer/src/Charmonizer/Probe/AtomicOps.h charmonizer/src/Charmonizer/Probe/DirManip.c charmonizer/src/Charmonizer/Probe/DirManip.h charmonizer/src/Charmonizer/Probe/Floats.c charmonizer/src/Charmonizer/Probe/Floats.h charmonizer/src/Charmonizer/Probe/FuncMacro.c charmonizer/src/Charmonizer/Probe/FuncMacro.h charmonizer/src/Charmonizer/Probe/Headers.c charmonizer/src/Charmonizer/Probe/Headers.h charmonizer/src/Charmonizer/Probe/Integers.c charmonizer/src/Charmonizer/Probe/Integers.h charmonizer/src/Charmonizer/Probe/LargeFiles.c charmonizer/src/Charmonizer/Probe/LargeFiles.h charmonizer/src/Charmonizer/Probe/Memory.c charmonizer/src/Charmonizer/Probe/Memory.h charmonizer/src/Charmonizer/Probe/UnusedVars.c charmonizer/src/Charmonizer/Probe/UnusedVars.h charmonizer/src/Charmonizer/Probe/VariadicMacros.c charmonizer/src/Charmonizer/Probe/VariadicMacros.h charmonizer/src/Charmonizer/Test.c charmonizer/src/Charmonizer/Test.h charmonizer/src/Charmonizer/Test/TestDirManip.c charmonizer/src/Charmonizer/Test/TestFuncMacro.c charmonizer/src/Charmonizer/Test/TestHeaders.c charmonizer/src/Charmonizer/Test/TestIntegers.c charmonizer/src/Charmonizer/Test/TestLargeFiles.c charmonizer/src/Charmonizer/Test/TestUnusedVars.c charmonizer/src/Charmonizer/Test/TestVariadicMacros.c clownfish/include/CFC.h clownfish/perl/Build.PL clownfish/perl/buildlib/Clownfish/CFC/Build.pm clownfish/perl/lib/Clownfish.pod clownfish/perl/lib/Clownfish/CFC.pm clownfish/perl/lib/Clownfish/CFC.xs clownfish/perl/lib/Clownfish/CFC/Base.pm clownfish/perl/lib/Clownfish/CFC/Binding/Core.pm clownfish/perl/lib/Clownfish/CFC/Binding/Core/Aliases.pm clownfish/perl/lib/Clownfish/CFC/Binding/Core/Class.pm clownfish/perl/lib/Clownfish/CFC/Binding/Core/File.pm clownfish/perl/lib/Clownfish/CFC/Binding/Core/Function.pm clownfish/perl/lib/Clownfish/CFC/Binding/Core/Method.pm clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Class.pm clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Constructor.pm clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Method.pm clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Subroutine.pm clownfish/perl/lib/Clownfish/CFC/Binding/Perl/TypeMap.pm clownfish/perl/lib/Clownfish/CFC/CBlock.pm clownfish/perl/lib/Clownfish/CFC/Class.pm clownfish/perl/lib/Clownfish/CFC/DocuComment.pm clownfish/perl/lib/Clownfish/CFC/Dumpable.pm clownfish/perl/lib/Clownfish/CFC/File.pm clownfish/perl/lib/Clownfish/CFC/Function.pm clownfish/perl/lib/Clownfish/CFC/Hierarchy.pm clownfish/perl/lib/Clownfish/CFC/Method.pm clownfish/perl/lib/Clownfish/CFC/ParamList.pm clownfish/perl/lib/Clownfish/CFC/Parcel.pm clownfish/perl/lib/Clownfish/CFC/Parser.pm clownfish/perl/lib/Clownfish/CFC/Symbol.pm clownfish/perl/lib/Clownfish/CFC/Type.pm clownfish/perl/lib/Clownfish/CFC/Util.pm clownfish/perl/lib/Clownfish/CFC/Variable.pm clownfish/perl/MANIFEST clownfish/perl/t/000-load.t clownfish/perl/t/001-util.t clownfish/perl/t/050-docucomment.t clownfish/perl/t/051-symbol.t clownfish/perl/t/100-type.t clownfish/perl/t/101-primitive_type.t clownfish/perl/t/102-integer_type.t clownfish/perl/t/103-float_type.t clownfish/perl/t/104-void_type.t clownfish/perl/t/105-object_type.t clownfish/perl/t/106-va_list_type.t clownfish/perl/t/107-arbitrary_type.t clownfish/perl/t/108-composite_type.t clownfish/perl/t/200-function.t clownfish/perl/t/201-method.t clownfish/perl/t/202-overridden_method.t clownfish/perl/t/203-final_method.t clownfish/perl/t/300-variable.t clownfish/perl/t/301-param_list.t clownfish/perl/t/400-class.t clownfish/perl/t/401-c_block.t clownfish/perl/t/402-parcel.t clownfish/perl/t/403-file.t clownfish/perl/t/500-hierarchy.t clownfish/perl/t/600-parser.t clownfish/perl/t/cfsource/Animal.cfh clownfish/perl/t/cfsource/Animal/Dog.cfh clownfish/perl/t/cfsource/Animal/Util.cfh clownfish/perl/typemap clownfish/ruby/Rakefile clownfish/src/CFCBase.c clownfish/src/CFCBase.h clownfish/src/CFCBindAliases.c clownfish/src/CFCBindAliases.h clownfish/src/CFCBindClass.c clownfish/src/CFCBindClass.h clownfish/src/CFCBindCore.c clownfish/src/CFCBindCore.h clownfish/src/CFCBindFile.c clownfish/src/CFCBindFile.h clownfish/src/CFCBindFunction.c clownfish/src/CFCBindFunction.h clownfish/src/CFCBindMethod.c clownfish/src/CFCBindMethod.h clownfish/src/CFCCBlock.c clownfish/src/CFCCBlock.h clownfish/src/CFCClass.c clownfish/src/CFCClass.h clownfish/src/CFCDocuComment.c clownfish/src/CFCDocuComment.h clownfish/src/CFCDumpable.c clownfish/src/CFCDumpable.h clownfish/src/CFCFile.c clownfish/src/CFCFile.h clownfish/src/CFCFunction.c clownfish/src/CFCFunction.h clownfish/src/CFCHierarchy.c clownfish/src/CFCHierarchy.h clownfish/src/CFCLexHeader.c clownfish/src/CFCLexHeader.h clownfish/src/CFCLexHeader.l clownfish/src/CFCMemPool.c clownfish/src/CFCMemPool.h clownfish/src/CFCMethod.c clownfish/src/CFCMethod.h clownfish/src/CFCParamList.c clownfish/src/CFCParamList.h clownfish/src/CFCParcel.c clownfish/src/CFCParcel.h clownfish/src/CFCParseHeader.y clownfish/src/CFCParser.c clownfish/src/CFCParser.h clownfish/src/CFCSymbol.c clownfish/src/CFCSymbol.h clownfish/src/CFCType.c clownfish/src/CFCType.h clownfish/src/CFCUtil.c clownfish/src/CFCUtil.h clownfish/src/CFCVariable.c clownfish/src/CFCVariable.h CONTRIBUTING core/Lucy/Analysis/Analyzer.c core/Lucy/Analysis/Analyzer.cfh core/Lucy/Analysis/CaseFolder.c core/Lucy/Analysis/CaseFolder.cfh core/Lucy/Analysis/EasyAnalyzer.c core/Lucy/Analysis/EasyAnalyzer.cfh core/Lucy/Analysis/Inversion.c core/Lucy/Analysis/Inversion.cfh core/Lucy/Analysis/Normalizer.c core/Lucy/Analysis/Normalizer.cfh core/Lucy/Analysis/PolyAnalyzer.c core/Lucy/Analysis/PolyAnalyzer.cfh core/Lucy/Analysis/RegexTokenizer.c core/Lucy/Analysis/RegexTokenizer.cfh core/Lucy/Analysis/SnowballStemmer.c core/Lucy/Analysis/SnowballStemmer.cfh core/Lucy/Analysis/SnowballStopFilter.c core/Lucy/Analysis/SnowballStopFilter.cfh core/Lucy/Analysis/StandardTokenizer.c core/Lucy/Analysis/StandardTokenizer.cfh core/Lucy/Analysis/Token.c core/Lucy/Analysis/Token.cfh core/Lucy/Docs/DevGuide.cfh core/Lucy/Docs/FileLocking.cfh core/Lucy/Document/Doc.c core/Lucy/Document/Doc.cfh core/Lucy/Document/HitDoc.c core/Lucy/Document/HitDoc.cfh core/Lucy/Highlight/HeatMap.c core/Lucy/Highlight/HeatMap.cfh core/Lucy/Highlight/Highlighter.c core/Lucy/Highlight/Highlighter.cfh core/Lucy/Index/BackgroundMerger.c core/Lucy/Index/BackgroundMerger.cfh core/Lucy/Index/BitVecDelDocs.c core/Lucy/Index/BitVecDelDocs.cfh core/Lucy/Index/DataReader.c core/Lucy/Index/DataReader.cfh core/Lucy/Index/DataWriter.c core/Lucy/Index/DataWriter.cfh core/Lucy/Index/DeletionsReader.c core/Lucy/Index/DeletionsReader.cfh core/Lucy/Index/DeletionsWriter.c core/Lucy/Index/DeletionsWriter.cfh core/Lucy/Index/DocReader.c core/Lucy/Index/DocReader.cfh core/Lucy/Index/DocVector.c core/Lucy/Index/DocVector.cfh core/Lucy/Index/DocWriter.c core/Lucy/Index/DocWriter.cfh core/Lucy/Index/FilePurger.c core/Lucy/Index/FilePurger.cfh core/Lucy/Index/HighlightReader.c core/Lucy/Index/HighlightReader.cfh core/Lucy/Index/HighlightWriter.c core/Lucy/Index/HighlightWriter.cfh core/Lucy/Index/Indexer.c core/Lucy/Index/Indexer.cfh core/Lucy/Index/IndexManager.c core/Lucy/Index/IndexManager.cfh core/Lucy/Index/IndexReader.c core/Lucy/Index/IndexReader.cfh core/Lucy/Index/Inverter.c core/Lucy/Index/Inverter.cfh core/Lucy/Index/Lexicon.c core/Lucy/Index/Lexicon.cfh core/Lucy/Index/LexiconReader.c core/Lucy/Index/LexiconReader.cfh core/Lucy/Index/LexiconWriter.c core/Lucy/Index/LexiconWriter.cfh core/Lucy/Index/LexIndex.c core/Lucy/Index/LexIndex.cfh core/Lucy/Index/PolyLexicon.c core/Lucy/Index/PolyLexicon.cfh core/Lucy/Index/PolyReader.c core/Lucy/Index/PolyReader.cfh core/Lucy/Index/Posting.c core/Lucy/Index/Posting.cfh core/Lucy/Index/Posting/MatchPosting.c core/Lucy/Index/Posting/MatchPosting.cfh core/Lucy/Index/Posting/RawPosting.c core/Lucy/Index/Posting/RawPosting.cfh core/Lucy/Index/Posting/RichPosting.c core/Lucy/Index/Posting/RichPosting.cfh core/Lucy/Index/Posting/ScorePosting.c core/Lucy/Index/Posting/ScorePosting.cfh core/Lucy/Index/PostingList.c core/Lucy/Index/PostingList.cfh core/Lucy/Index/PostingListReader.c core/Lucy/Index/PostingListReader.cfh core/Lucy/Index/PostingListWriter.c core/Lucy/Index/PostingListWriter.cfh core/Lucy/Index/PostingPool.c core/Lucy/Index/PostingPool.cfh core/Lucy/Index/RawLexicon.c core/Lucy/Index/RawLexicon.cfh core/Lucy/Index/RawPostingList.c core/Lucy/Index/RawPostingList.cfh core/Lucy/Index/SegLexicon.c core/Lucy/Index/SegLexicon.cfh core/Lucy/Index/Segment.c core/Lucy/Index/Segment.cfh core/Lucy/Index/SegPostingList.c core/Lucy/Index/SegPostingList.cfh core/Lucy/Index/SegReader.c core/Lucy/Index/SegReader.cfh core/Lucy/Index/SegWriter.c core/Lucy/Index/SegWriter.cfh core/Lucy/Index/Similarity.c core/Lucy/Index/Similarity.cfh core/Lucy/Index/SkipStepper.c core/Lucy/Index/SkipStepper.cfh core/Lucy/Index/Snapshot.c core/Lucy/Index/Snapshot.cfh core/Lucy/Index/SortCache.c core/Lucy/Index/SortCache.cfh core/Lucy/Index/SortCache/NumericSortCache.c core/Lucy/Index/SortCache/NumericSortCache.cfh core/Lucy/Index/SortCache/TextSortCache.c core/Lucy/Index/SortCache/TextSortCache.cfh core/Lucy/Index/SortFieldWriter.c core/Lucy/Index/SortFieldWriter.cfh core/Lucy/Index/SortReader.c core/Lucy/Index/SortReader.cfh core/Lucy/Index/SortWriter.c core/Lucy/Index/SortWriter.cfh core/Lucy/Index/TermInfo.c core/Lucy/Index/TermInfo.cfh core/Lucy/Index/TermStepper.c core/Lucy/Index/TermStepper.cfh core/Lucy/Index/TermVector.c core/Lucy/Index/TermVector.cfh core/Lucy/Index/ZombieKeyedHash.c core/Lucy/Index/ZombieKeyedHash.cfh core/Lucy/Object/BitVector.c core/Lucy/Object/BitVector.cfh core/Lucy/Object/ByteBuf.c core/Lucy/Object/ByteBuf.cfh core/Lucy/Object/CharBuf.c core/Lucy/Object/CharBuf.cfh core/Lucy/Object/Err.c core/Lucy/Object/Err.cfh core/Lucy/Object/Hash.c core/Lucy/Object/Hash.cfh core/Lucy/Object/Host.cfh core/Lucy/Object/I32Array.c core/Lucy/Object/I32Array.cfh core/Lucy/Object/LockFreeRegistry.c core/Lucy/Object/LockFreeRegistry.cfh core/Lucy/Object/Num.c core/Lucy/Object/Num.cfh core/Lucy/Object/Obj.c core/Lucy/Object/Obj.cfh core/Lucy/Object/VArray.c core/Lucy/Object/VArray.cfh core/Lucy/Object/VTable.c core/Lucy/Object/VTable.cfh core/Lucy/Plan/Architecture.c core/Lucy/Plan/Architecture.cfh core/Lucy/Plan/BlobType.c core/Lucy/Plan/BlobType.cfh core/Lucy/Plan/FieldType.c core/Lucy/Plan/FieldType.cfh core/Lucy/Plan/FullTextType.c core/Lucy/Plan/FullTextType.cfh core/Lucy/Plan/NumericType.c core/Lucy/Plan/NumericType.cfh core/Lucy/Plan/Schema.c core/Lucy/Plan/Schema.cfh core/Lucy/Plan/StringType.c core/Lucy/Plan/StringType.cfh core/Lucy/Plan/TextType.c core/Lucy/Plan/TextType.cfh core/Lucy/Search/ANDMatcher.c core/Lucy/Search/ANDMatcher.cfh core/Lucy/Search/ANDQuery.c core/Lucy/Search/ANDQuery.cfh core/Lucy/Search/BitVecMatcher.c core/Lucy/Search/BitVecMatcher.cfh core/Lucy/Search/Collector.c core/Lucy/Search/Collector.cfh core/Lucy/Search/Collector/SortCollector.c core/Lucy/Search/Collector/SortCollector.cfh core/Lucy/Search/Compiler.c core/Lucy/Search/Compiler.cfh core/Lucy/Search/HitQueue.c core/Lucy/Search/HitQueue.cfh core/Lucy/Search/Hits.c core/Lucy/Search/Hits.cfh core/Lucy/Search/IndexSearcher.c core/Lucy/Search/IndexSearcher.cfh core/Lucy/Search/LeafQuery.c core/Lucy/Search/LeafQuery.cfh core/Lucy/Search/MatchAllMatcher.c core/Lucy/Search/MatchAllMatcher.cfh core/Lucy/Search/MatchAllQuery.c core/Lucy/Search/MatchAllQuery.cfh core/Lucy/Search/MatchDoc.c core/Lucy/Search/MatchDoc.cfh core/Lucy/Search/Matcher.c core/Lucy/Search/Matcher.cfh core/Lucy/Search/NoMatchMatcher.c core/Lucy/Search/NoMatchMatcher.cfh core/Lucy/Search/NoMatchQuery.c core/Lucy/Search/NoMatchQuery.cfh core/Lucy/Search/NOTMatcher.c core/Lucy/Search/NOTMatcher.cfh core/Lucy/Search/NOTQuery.c core/Lucy/Search/NOTQuery.cfh core/Lucy/Search/ORMatcher.c core/Lucy/Search/ORMatcher.cfh core/Lucy/Search/ORQuery.c core/Lucy/Search/ORQuery.cfh core/Lucy/Search/PhraseMatcher.c core/Lucy/Search/PhraseMatcher.cfh core/Lucy/Search/PhraseQuery.c core/Lucy/Search/PhraseQuery.cfh core/Lucy/Search/PolyMatcher.c core/Lucy/Search/PolyMatcher.cfh core/Lucy/Search/PolyQuery.c core/Lucy/Search/PolyQuery.cfh core/Lucy/Search/PolySearcher.c core/Lucy/Search/PolySearcher.cfh core/Lucy/Search/Query.c core/Lucy/Search/Query.cfh core/Lucy/Search/QueryParser.c core/Lucy/Search/QueryParser.cfh core/Lucy/Search/RangeMatcher.c core/Lucy/Search/RangeMatcher.cfh core/Lucy/Search/RangeQuery.c core/Lucy/Search/RangeQuery.cfh core/Lucy/Search/RequiredOptionalMatcher.c core/Lucy/Search/RequiredOptionalMatcher.cfh core/Lucy/Search/RequiredOptionalQuery.c core/Lucy/Search/RequiredOptionalQuery.cfh core/Lucy/Search/Searcher.c core/Lucy/Search/Searcher.cfh core/Lucy/Search/SeriesMatcher.c core/Lucy/Search/SeriesMatcher.cfh core/Lucy/Search/SortRule.c core/Lucy/Search/SortRule.cfh core/Lucy/Search/SortSpec.c core/Lucy/Search/SortSpec.cfh core/Lucy/Search/Span.c core/Lucy/Search/Span.cfh core/Lucy/Search/TermMatcher.c core/Lucy/Search/TermMatcher.cfh core/Lucy/Search/TermQuery.c core/Lucy/Search/TermQuery.cfh core/Lucy/Search/TopDocs.c core/Lucy/Search/TopDocs.cfh core/Lucy/Store/CompoundFileReader.c core/Lucy/Store/CompoundFileReader.cfh core/Lucy/Store/CompoundFileWriter.c core/Lucy/Store/CompoundFileWriter.cfh core/Lucy/Store/DirHandle.c core/Lucy/Store/DirHandle.cfh core/Lucy/Store/FileHandle.c core/Lucy/Store/FileHandle.cfh core/Lucy/Store/FileWindow.c core/Lucy/Store/FileWindow.cfh core/Lucy/Store/Folder.c core/Lucy/Store/Folder.cfh core/Lucy/Store/FSDirHandle.c core/Lucy/Store/FSDirHandle.cfh core/Lucy/Store/FSFileHandle.c core/Lucy/Store/FSFileHandle.cfh core/Lucy/Store/FSFolder.c core/Lucy/Store/FSFolder.cfh core/Lucy/Store/InStream.c core/Lucy/Store/InStream.cfh core/Lucy/Store/Lock.c core/Lucy/Store/Lock.cfh core/Lucy/Store/LockFactory.c core/Lucy/Store/LockFactory.cfh core/Lucy/Store/OutStream.c core/Lucy/Store/OutStream.cfh core/Lucy/Store/RAMDirHandle.c core/Lucy/Store/RAMDirHandle.cfh core/Lucy/Store/RAMFile.c core/Lucy/Store/RAMFile.cfh core/Lucy/Store/RAMFileHandle.c core/Lucy/Store/RAMFileHandle.cfh core/Lucy/Store/RAMFolder.c core/Lucy/Store/RAMFolder.cfh core/Lucy/Store/SharedLock.c core/Lucy/Store/SharedLock.cfh core/Lucy/Test.c core/Lucy/Test.cfh core/Lucy/Test/Analysis/TestAnalyzer.c core/Lucy/Test/Analysis/TestAnalyzer.cfh core/Lucy/Test/Analysis/TestCaseFolder.c core/Lucy/Test/Analysis/TestCaseFolder.cfh core/Lucy/Test/Analysis/TestNormalizer.c core/Lucy/Test/Analysis/TestNormalizer.cfh core/Lucy/Test/Analysis/TestPolyAnalyzer.c core/Lucy/Test/Analysis/TestPolyAnalyzer.cfh core/Lucy/Test/Analysis/TestRegexTokenizer.c core/Lucy/Test/Analysis/TestRegexTokenizer.cfh core/Lucy/Test/Analysis/TestSnowballStemmer.c core/Lucy/Test/Analysis/TestSnowballStemmer.cfh core/Lucy/Test/Analysis/TestSnowballStopFilter.c core/Lucy/Test/Analysis/TestSnowballStopFilter.cfh core/Lucy/Test/Analysis/TestStandardTokenizer.c core/Lucy/Test/Analysis/TestStandardTokenizer.cfh core/Lucy/Test/Highlight/TestHighlighter.c core/Lucy/Test/Highlight/TestHighlighter.cfh core/Lucy/Test/Index/TestDocWriter.c core/Lucy/Test/Index/TestDocWriter.cfh core/Lucy/Test/Index/TestHighlightWriter.c core/Lucy/Test/Index/TestHighlightWriter.cfh core/Lucy/Test/Index/TestIndexManager.c core/Lucy/Test/Index/TestIndexManager.cfh core/Lucy/Test/Index/TestPolyReader.c core/Lucy/Test/Index/TestPolyReader.cfh core/Lucy/Test/Index/TestPostingListWriter.c core/Lucy/Test/Index/TestPostingListWriter.cfh core/Lucy/Test/Index/TestSegment.c core/Lucy/Test/Index/TestSegment.cfh core/Lucy/Test/Index/TestSegWriter.c core/Lucy/Test/Index/TestSegWriter.cfh core/Lucy/Test/Index/TestSnapshot.c core/Lucy/Test/Index/TestSnapshot.cfh core/Lucy/Test/Object/TestBitVector.c core/Lucy/Test/Object/TestBitVector.cfh core/Lucy/Test/Object/TestByteBuf.c core/Lucy/Test/Object/TestByteBuf.cfh core/Lucy/Test/Object/TestCharBuf.c core/Lucy/Test/Object/TestCharBuf.cfh core/Lucy/Test/Object/TestHash.c core/Lucy/Test/Object/TestHash.cfh core/Lucy/Test/Object/TestI32Array.c core/Lucy/Test/Object/TestI32Array.cfh core/Lucy/Test/Object/TestLockFreeRegistry.c core/Lucy/Test/Object/TestLockFreeRegistry.cfh core/Lucy/Test/Object/TestNum.c core/Lucy/Test/Object/TestNum.cfh core/Lucy/Test/Object/TestObj.c core/Lucy/Test/Object/TestObj.cfh core/Lucy/Test/Object/TestVArray.c core/Lucy/Test/Object/TestVArray.cfh core/Lucy/Test/Plan/TestArchitecture.c core/Lucy/Test/Plan/TestArchitecture.cfh core/Lucy/Test/Plan/TestBlobType.c core/Lucy/Test/Plan/TestBlobType.cfh core/Lucy/Test/Plan/TestFieldType.c core/Lucy/Test/Plan/TestFieldType.cfh core/Lucy/Test/Plan/TestFullTextType.c core/Lucy/Test/Plan/TestFullTextType.cfh core/Lucy/Test/Plan/TestNumericType.c core/Lucy/Test/Plan/TestNumericType.cfh core/Lucy/Test/Search/TestLeafQuery.c core/Lucy/Test/Search/TestLeafQuery.cfh core/Lucy/Test/Search/TestMatchAllQuery.c core/Lucy/Test/Search/TestMatchAllQuery.cfh core/Lucy/Test/Search/TestNoMatchQuery.c core/Lucy/Test/Search/TestNoMatchQuery.cfh core/Lucy/Test/Search/TestNOTQuery.c core/Lucy/Test/Search/TestNOTQuery.cfh core/Lucy/Test/Search/TestPhraseQuery.c core/Lucy/Test/Search/TestPhraseQuery.cfh core/Lucy/Test/Search/TestPolyQuery.c core/Lucy/Test/Search/TestPolyQuery.cfh core/Lucy/Test/Search/TestQueryParser.c core/Lucy/Test/Search/TestQueryParser.cfh core/Lucy/Test/Search/TestQueryParserLogic.c core/Lucy/Test/Search/TestQueryParserLogic.cfh core/Lucy/Test/Search/TestQueryParserSyntax.c core/Lucy/Test/Search/TestQueryParserSyntax.cfh core/Lucy/Test/Search/TestRangeQuery.c core/Lucy/Test/Search/TestRangeQuery.cfh core/Lucy/Test/Search/TestReqOptQuery.c core/Lucy/Test/Search/TestReqOptQuery.cfh core/Lucy/Test/Search/TestSeriesMatcher.c core/Lucy/Test/Search/TestSeriesMatcher.cfh core/Lucy/Test/Search/TestTermQuery.c core/Lucy/Test/Search/TestTermQuery.cfh core/Lucy/Test/Store/MockFileHandle.c core/Lucy/Test/Store/MockFileHandle.cfh core/Lucy/Test/Store/TestCompoundFileReader.c core/Lucy/Test/Store/TestCompoundFileReader.cfh core/Lucy/Test/Store/TestCompoundFileWriter.c core/Lucy/Test/Store/TestCompoundFileWriter.cfh core/Lucy/Test/Store/TestFileHandle.c core/Lucy/Test/Store/TestFileHandle.cfh core/Lucy/Test/Store/TestFolder.c core/Lucy/Test/Store/TestFolder.cfh core/Lucy/Test/Store/TestFolderCommon.c core/Lucy/Test/Store/TestFolderCommon.cfh core/Lucy/Test/Store/TestFSDirHandle.c core/Lucy/Test/Store/TestFSDirHandle.cfh core/Lucy/Test/Store/TestFSFileHandle.c core/Lucy/Test/Store/TestFSFileHandle.cfh core/Lucy/Test/Store/TestFSFolder.c core/Lucy/Test/Store/TestFSFolder.cfh core/Lucy/Test/Store/TestInStream.c core/Lucy/Test/Store/TestInStream.cfh core/Lucy/Test/Store/TestIOChunks.c core/Lucy/Test/Store/TestIOChunks.cfh core/Lucy/Test/Store/TestIOPrimitives.c core/Lucy/Test/Store/TestIOPrimitives.cfh core/Lucy/Test/Store/TestRAMDirHandle.c core/Lucy/Test/Store/TestRAMDirHandle.cfh core/Lucy/Test/Store/TestRAMFileHandle.c core/Lucy/Test/Store/TestRAMFileHandle.cfh core/Lucy/Test/Store/TestRAMFolder.c core/Lucy/Test/Store/TestRAMFolder.cfh core/Lucy/Test/TestSchema.c core/Lucy/Test/TestSchema.cfh core/Lucy/Test/TestUtils.c core/Lucy/Test/TestUtils.cfh core/Lucy/Test/Util/BBSortEx.c core/Lucy/Test/Util/BBSortEx.cfh core/Lucy/Test/Util/TestAtomic.c core/Lucy/Test/Util/TestAtomic.cfh core/Lucy/Test/Util/TestIndexFileNames.c core/Lucy/Test/Util/TestIndexFileNames.cfh core/Lucy/Test/Util/TestJson.c core/Lucy/Test/Util/TestJson.cfh core/Lucy/Test/Util/TestMemory.c core/Lucy/Test/Util/TestMemory.cfh core/Lucy/Test/Util/TestMemoryPool.c core/Lucy/Test/Util/TestMemoryPool.cfh core/Lucy/Test/Util/TestNumberUtils.c core/Lucy/Test/Util/TestNumberUtils.cfh core/Lucy/Test/Util/TestPriorityQueue.c core/Lucy/Test/Util/TestPriorityQueue.cfh core/Lucy/Test/Util/TestStringHelper.c core/Lucy/Test/Util/TestStringHelper.cfh core/Lucy/Util/Atomic.c core/Lucy/Util/Atomic.cfh core/Lucy/Util/Debug.c core/Lucy/Util/Debug.cfh core/Lucy/Util/Freezer.c core/Lucy/Util/Freezer.cfh core/Lucy/Util/IndexFileNames.c core/Lucy/Util/IndexFileNames.cfh core/Lucy/Util/Json.c core/Lucy/Util/Json.cfh core/Lucy/Util/Json/JsonParser.y core/Lucy/Util/Memory.c core/Lucy/Util/Memory.cfh core/Lucy/Util/MemoryPool.c core/Lucy/Util/MemoryPool.cfh core/Lucy/Util/NumberUtils.c core/Lucy/Util/NumberUtils.cfh core/Lucy/Util/PriorityQueue.c core/Lucy/Util/PriorityQueue.cfh core/Lucy/Util/ProcessID.c core/Lucy/Util/ProcessID.cfh core/Lucy/Util/Sleep.c core/Lucy/Util/Sleep.cfh core/Lucy/Util/SortExternal.c core/Lucy/Util/SortExternal.cfh core/Lucy/Util/SortUtils.c core/Lucy/Util/SortUtils.cfh core/Lucy/Util/Stepper.c core/Lucy/Util/Stepper.cfh core/Lucy/Util/StringHelper.c core/Lucy/Util/StringHelper.cfh core/Lucy/Util/ToolSet.h core/LucyX/Search/FilterMatcher.c core/LucyX/Search/FilterMatcher.cfh core/LucyX/Search/MockMatcher.c core/LucyX/Search/MockMatcher.cfh core/LucyX/Search/ProximityMatcher.c core/LucyX/Search/ProximityMatcher.cfh core/LucyX/Search/ProximityQuery.c core/LucyX/Search/ProximityQuery.cfh devel/benchmarks/extract_reuters.plx devel/benchmarks/indexers/BenchmarkingIndexer.pm devel/benchmarks/indexers/LuceneIndexer.java devel/benchmarks/indexers/lucy_indexer.plx devel/benchmarks/README.txt devel/bin/format_changes_entry.pl devel/bin/gen_charmonizer_makefiles.pl devel/bin/gen_word_break_data.pl devel/bin/lucytidy.pl devel/bin/release_commands.pl devel/bin/smoke.pl devel/bin/UnicodeTable.pm devel/bin/update_version devel/bin/valgrind_triggers.pl devel/conf/astylerc devel/conf/lucyperl.supp devel/conf/perltidyrc devel/conf/rat-excludes INSTALL lemon/lemon.c lemon/lempar.c lemon/Makefile lemon/Makefile.MinGW lemon/Makefile.MSVC lemon/README lib/Lucy.pm lib/Lucy.pod lib/Lucy/Analysis/Analyzer.pm lib/Lucy/Analysis/Analyzer.pod lib/Lucy/Analysis/CaseFolder.pm lib/Lucy/Analysis/CaseFolder.pod lib/Lucy/Analysis/EasyAnalyzer.pm lib/Lucy/Analysis/EasyAnalyzer.pod lib/Lucy/Analysis/Inversion.pm lib/Lucy/Analysis/Normalizer.pm lib/Lucy/Analysis/Normalizer.pod lib/Lucy/Analysis/PolyAnalyzer.pm lib/Lucy/Analysis/PolyAnalyzer.pod lib/Lucy/Analysis/RegexTokenizer.pm lib/Lucy/Analysis/RegexTokenizer.pod lib/Lucy/Analysis/SnowballStemmer.pm lib/Lucy/Analysis/SnowballStemmer.pod lib/Lucy/Analysis/SnowballStopFilter.pm lib/Lucy/Analysis/SnowballStopFilter.pod lib/Lucy/Analysis/StandardTokenizer.pm lib/Lucy/Analysis/StandardTokenizer.pod lib/Lucy/Analysis/Token.pm lib/Lucy/Docs/Cookbook.pod lib/Lucy/Docs/Cookbook/CustomQuery.pod lib/Lucy/Docs/Cookbook/CustomQueryParser.pod lib/Lucy/Docs/Cookbook/FastUpdates.pod lib/Lucy/Docs/DevGuide.pm lib/Lucy/Docs/DevGuide.pod lib/Lucy/Docs/DocIDs.pod lib/Lucy/Docs/FileFormat.pod lib/Lucy/Docs/FileLocking.pm lib/Lucy/Docs/FileLocking.pod lib/Lucy/Docs/IRTheory.pod lib/Lucy/Docs/Tutorial.pod lib/Lucy/Docs/Tutorial/Analysis.pod lib/Lucy/Docs/Tutorial/BeyondSimple.pod lib/Lucy/Docs/Tutorial/FieldType.pod lib/Lucy/Docs/Tutorial/Highlighter.pod lib/Lucy/Docs/Tutorial/QueryObjects.pod lib/Lucy/Docs/Tutorial/Simple.pod lib/Lucy/Document/Doc.pm lib/Lucy/Document/Doc.pod lib/Lucy/Document/HitDoc.pm lib/Lucy/Document/HitDoc.pod lib/Lucy/Highlight/HeatMap.pm lib/Lucy/Highlight/Highlighter.pm lib/Lucy/Highlight/Highlighter.pod lib/Lucy/Index/BackgroundMerger.pm lib/Lucy/Index/BackgroundMerger.pod lib/Lucy/Index/DataReader.pm lib/Lucy/Index/DataReader.pod lib/Lucy/Index/DataWriter.pm lib/Lucy/Index/DataWriter.pod lib/Lucy/Index/DeletionsReader.pm lib/Lucy/Index/DeletionsWriter.pm lib/Lucy/Index/DeletionsWriter.pod lib/Lucy/Index/DocReader.pm lib/Lucy/Index/DocReader.pod lib/Lucy/Index/DocVector.pm lib/Lucy/Index/DocWriter.pm lib/Lucy/Index/FilePurger.pm lib/Lucy/Index/HighlightReader.pm lib/Lucy/Index/HighlightWriter.pm lib/Lucy/Index/Indexer.pm lib/Lucy/Index/Indexer.pod lib/Lucy/Index/IndexManager.pm lib/Lucy/Index/IndexManager.pod lib/Lucy/Index/IndexReader.pm lib/Lucy/Index/IndexReader.pod lib/Lucy/Index/Inverter.pm lib/Lucy/Index/Lexicon.pm lib/Lucy/Index/Lexicon.pod lib/Lucy/Index/LexiconReader.pm lib/Lucy/Index/LexiconReader.pod lib/Lucy/Index/LexiconWriter.pm lib/Lucy/Index/PolyLexicon.pm lib/Lucy/Index/PolyReader.pm lib/Lucy/Index/PolyReader.pod lib/Lucy/Index/Posting.pm lib/Lucy/Index/Posting/MatchPosting.pm lib/Lucy/Index/Posting/RichPosting.pm lib/Lucy/Index/Posting/ScorePosting.pm lib/Lucy/Index/PostingList.pm lib/Lucy/Index/PostingList.pod lib/Lucy/Index/PostingListReader.pm lib/Lucy/Index/PostingListReader.pod lib/Lucy/Index/PostingListWriter.pm lib/Lucy/Index/SegLexicon.pm lib/Lucy/Index/Segment.pm lib/Lucy/Index/Segment.pod lib/Lucy/Index/SegPostingList.pm lib/Lucy/Index/SegReader.pm lib/Lucy/Index/SegReader.pod lib/Lucy/Index/SegWriter.pm lib/Lucy/Index/SegWriter.pod lib/Lucy/Index/Similarity.pm lib/Lucy/Index/Similarity.pod lib/Lucy/Index/Snapshot.pm lib/Lucy/Index/Snapshot.pod lib/Lucy/Index/SortCache.pm lib/Lucy/Index/SortReader.pm lib/Lucy/Index/SortWriter.pm lib/Lucy/Index/TermInfo.pm lib/Lucy/Index/TermVector.pm lib/Lucy/Object/BitVector.pm lib/Lucy/Object/BitVector.pod lib/Lucy/Object/ByteBuf.pm lib/Lucy/Object/CharBuf.pm lib/Lucy/Object/Err.pm lib/Lucy/Object/Err.pod lib/Lucy/Object/Hash.pm lib/Lucy/Object/Host.pm lib/Lucy/Object/I32Array.pm lib/Lucy/Object/LockFreeRegistry.pm lib/Lucy/Object/Num.pm lib/Lucy/Object/Obj.pm lib/Lucy/Object/Obj.pod lib/Lucy/Object/VArray.pm lib/Lucy/Object/VTable.pm lib/Lucy/Plan/Architecture.pm lib/Lucy/Plan/Architecture.pod lib/Lucy/Plan/BlobType.pm lib/Lucy/Plan/BlobType.pod lib/Lucy/Plan/FieldType.pm lib/Lucy/Plan/FieldType.pod lib/Lucy/Plan/Float32Type.pm lib/Lucy/Plan/Float64Type.pm lib/Lucy/Plan/FullTextType.pm lib/Lucy/Plan/FullTextType.pod lib/Lucy/Plan/Int32Type.pm lib/Lucy/Plan/Int64Type.pm lib/Lucy/Plan/Schema.pm lib/Lucy/Plan/Schema.pod lib/Lucy/Plan/StringType.pm lib/Lucy/Plan/StringType.pod lib/Lucy/Search/ANDMatcher.pm lib/Lucy/Search/ANDQuery.pm lib/Lucy/Search/ANDQuery.pod lib/Lucy/Search/BitVecMatcher.pm lib/Lucy/Search/Collector.pm lib/Lucy/Search/Collector.pod lib/Lucy/Search/Collector/BitCollector.pm lib/Lucy/Search/Collector/BitCollector.pod lib/Lucy/Search/Collector/SortCollector.pm lib/Lucy/Search/Compiler.pm lib/Lucy/Search/Compiler.pod lib/Lucy/Search/HitQueue.pm lib/Lucy/Search/Hits.pm lib/Lucy/Search/Hits.pod lib/Lucy/Search/IndexSearcher.pm lib/Lucy/Search/IndexSearcher.pod lib/Lucy/Search/LeafQuery.pm lib/Lucy/Search/LeafQuery.pod lib/Lucy/Search/MatchAllQuery.pm lib/Lucy/Search/MatchAllQuery.pod lib/Lucy/Search/MatchDoc.pm lib/Lucy/Search/Matcher.pm lib/Lucy/Search/Matcher.pod lib/Lucy/Search/NoMatchQuery.pm lib/Lucy/Search/NoMatchQuery.pod lib/Lucy/Search/NOTMatcher.pm lib/Lucy/Search/NOTQuery.pm lib/Lucy/Search/NOTQuery.pod lib/Lucy/Search/ORQuery.pm lib/Lucy/Search/ORQuery.pod lib/Lucy/Search/ORScorer.pm lib/Lucy/Search/PhraseQuery.pm lib/Lucy/Search/PhraseQuery.pod lib/Lucy/Search/PolyCompiler.pm lib/Lucy/Search/PolyQuery.pm lib/Lucy/Search/PolyQuery.pod lib/Lucy/Search/PolySearcher.pm lib/Lucy/Search/PolySearcher.pod lib/Lucy/Search/Query.pm lib/Lucy/Search/Query.pod lib/Lucy/Search/QueryParser.pm lib/Lucy/Search/QueryParser.pod lib/Lucy/Search/RangeQuery.pm lib/Lucy/Search/RangeQuery.pod lib/Lucy/Search/RequiredOptionalMatcher.pm lib/Lucy/Search/RequiredOptionalQuery.pm lib/Lucy/Search/RequiredOptionalQuery.pod lib/Lucy/Search/Searcher.pm lib/Lucy/Search/Searcher.pod lib/Lucy/Search/SortRule.pm lib/Lucy/Search/SortRule.pod lib/Lucy/Search/SortSpec.pm lib/Lucy/Search/SortSpec.pod lib/Lucy/Search/Span.pm lib/Lucy/Search/Span.pod lib/Lucy/Search/TermQuery.pm lib/Lucy/Search/TermQuery.pod lib/Lucy/Search/TopDocs.pm lib/Lucy/Simple.pm lib/Lucy/Store/FileHandle.pm lib/Lucy/Store/Folder.pm lib/Lucy/Store/Folder.pod lib/Lucy/Store/FSFileHandle.pm lib/Lucy/Store/FSFolder.pm lib/Lucy/Store/FSFolder.pod lib/Lucy/Store/InStream.pm lib/Lucy/Store/Lock.pm lib/Lucy/Store/Lock.pod lib/Lucy/Store/LockErr.pm lib/Lucy/Store/LockErr.pod lib/Lucy/Store/LockFactory.pm lib/Lucy/Store/LockFactory.pod lib/Lucy/Store/OutStream.pm lib/Lucy/Store/RAMFile.pm lib/Lucy/Store/RAMFileHandle.pm lib/Lucy/Store/RAMFolder.pm lib/Lucy/Store/RAMFolder.pod lib/Lucy/Test.pm lib/Lucy/Test/Util/BBSortEx.pm lib/Lucy/Util/Debug.pm lib/Lucy/Util/IndexFileNames.pm lib/Lucy/Util/Json.pm lib/Lucy/Util/MemoryPool.pm lib/Lucy/Util/PriorityQueue.pm lib/Lucy/Util/SortExternal.pm lib/Lucy/Util/Stepper.pm lib/Lucy/Util/StringHelper.pm lib/LucyX/Index/ByteBufDocReader.pm lib/LucyX/Index/ByteBufDocWriter.pm lib/LucyX/Index/LongFieldSim.pm lib/LucyX/Index/ZlibDocReader.pm lib/LucyX/Index/ZlibDocWriter.pm lib/LucyX/Remote/ClusterSearcher.pm lib/LucyX/Remote/SearchClient.pm lib/LucyX/Remote/SearchServer.pm lib/LucyX/Search/Filter.pm lib/LucyX/Search/MockMatcher.pm lib/LucyX/Search/ProximityQuery.pm lib/LucyX/Search/ProximityQuery.pod LICENSE MANIFEST This list of files modules/analysis/snowstem/devel/update_snowstem.pl modules/analysis/snowstem/source/include/libstemmer.h modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c modules/analysis/snowstem/source/libstemmer/modules_utf8.h modules/analysis/snowstem/source/README modules/analysis/snowstem/source/runtime/api.c modules/analysis/snowstem/source/runtime/api.h modules/analysis/snowstem/source/runtime/header.h modules/analysis/snowstem/source/runtime/utilities.c modules/analysis/snowstem/source/src_c/stem_UTF_8_danish.c modules/analysis/snowstem/source/src_c/stem_UTF_8_danish.h modules/analysis/snowstem/source/src_c/stem_UTF_8_dutch.c modules/analysis/snowstem/source/src_c/stem_UTF_8_dutch.h modules/analysis/snowstem/source/src_c/stem_UTF_8_english.c modules/analysis/snowstem/source/src_c/stem_UTF_8_english.h modules/analysis/snowstem/source/src_c/stem_UTF_8_finnish.c modules/analysis/snowstem/source/src_c/stem_UTF_8_finnish.h modules/analysis/snowstem/source/src_c/stem_UTF_8_french.c modules/analysis/snowstem/source/src_c/stem_UTF_8_french.h modules/analysis/snowstem/source/src_c/stem_UTF_8_german.c modules/analysis/snowstem/source/src_c/stem_UTF_8_german.h modules/analysis/snowstem/source/src_c/stem_UTF_8_hungarian.c modules/analysis/snowstem/source/src_c/stem_UTF_8_hungarian.h modules/analysis/snowstem/source/src_c/stem_UTF_8_italian.c modules/analysis/snowstem/source/src_c/stem_UTF_8_italian.h modules/analysis/snowstem/source/src_c/stem_UTF_8_norwegian.c modules/analysis/snowstem/source/src_c/stem_UTF_8_norwegian.h modules/analysis/snowstem/source/src_c/stem_UTF_8_porter.c modules/analysis/snowstem/source/src_c/stem_UTF_8_porter.h modules/analysis/snowstem/source/src_c/stem_UTF_8_portuguese.c modules/analysis/snowstem/source/src_c/stem_UTF_8_portuguese.h modules/analysis/snowstem/source/src_c/stem_UTF_8_romanian.c modules/analysis/snowstem/source/src_c/stem_UTF_8_romanian.h modules/analysis/snowstem/source/src_c/stem_UTF_8_russian.c modules/analysis/snowstem/source/src_c/stem_UTF_8_russian.h modules/analysis/snowstem/source/src_c/stem_UTF_8_spanish.c modules/analysis/snowstem/source/src_c/stem_UTF_8_spanish.h modules/analysis/snowstem/source/src_c/stem_UTF_8_swedish.c modules/analysis/snowstem/source/src_c/stem_UTF_8_swedish.h modules/analysis/snowstem/source/src_c/stem_UTF_8_turkish.c modules/analysis/snowstem/source/src_c/stem_UTF_8_turkish.h modules/analysis/snowstem/source/test/README modules/analysis/snowstem/source/test/tests.json modules/analysis/snowstop/devel/update_snowstop.pl modules/analysis/snowstop/source/snowball_stoplists.c modules/unicode/ucd/WordBreak.tab modules/unicode/ucd/WordBreakTest.json modules/unicode/utf8proc/tests.json modules/unicode/utf8proc/utf8proc.c modules/unicode/utf8proc/utf8proc.h modules/unicode/utf8proc/utf8proc_data.c NOTICE README sample/FlatQueryParser.pm sample/indexer.pl sample/PrefixQuery.pm sample/README.txt sample/search.cgi sample/us_constitution/amend1.txt sample/us_constitution/amend10.txt sample/us_constitution/amend11.txt sample/us_constitution/amend12.txt sample/us_constitution/amend13.txt sample/us_constitution/amend14.txt sample/us_constitution/amend15.txt sample/us_constitution/amend16.txt sample/us_constitution/amend17.txt sample/us_constitution/amend18.txt sample/us_constitution/amend19.txt sample/us_constitution/amend2.txt sample/us_constitution/amend20.txt sample/us_constitution/amend21.txt sample/us_constitution/amend22.txt sample/us_constitution/amend23.txt sample/us_constitution/amend24.txt sample/us_constitution/amend25.txt sample/us_constitution/amend26.txt sample/us_constitution/amend27.txt sample/us_constitution/amend3.txt sample/us_constitution/amend4.txt sample/us_constitution/amend5.txt sample/us_constitution/amend6.txt sample/us_constitution/amend7.txt sample/us_constitution/amend8.txt sample/us_constitution/amend9.txt sample/us_constitution/art1sec1.txt sample/us_constitution/art1sec10.txt sample/us_constitution/art1sec2.txt sample/us_constitution/art1sec3.txt sample/us_constitution/art1sec4.txt sample/us_constitution/art1sec5.txt sample/us_constitution/art1sec6.txt sample/us_constitution/art1sec7.txt sample/us_constitution/art1sec8.txt sample/us_constitution/art1sec9.txt sample/us_constitution/art2sec1.txt sample/us_constitution/art2sec2.txt sample/us_constitution/art2sec3.txt sample/us_constitution/art2sec4.txt sample/us_constitution/art3sec1.txt sample/us_constitution/art3sec2.txt sample/us_constitution/art3sec3.txt sample/us_constitution/art4sec1.txt sample/us_constitution/art4sec2.txt sample/us_constitution/art4sec3.txt sample/us_constitution/art4sec4.txt sample/us_constitution/art5.txt sample/us_constitution/art6.txt sample/us_constitution/art7.txt sample/us_constitution/index.html sample/us_constitution/preamble.txt sample/us_constitution/uscon.css t/001-build_indexes.t t/002-lucy.t t/015-sort_external.t t/018-host.t t/021-vtable.t t/023-stepper.t t/025-debug.t t/026-serialization.t t/028-sortexrun.t t/050-ramfile.t t/051-fsfile.t t/102-strings_io.t t/105-folder.t t/106-locking.t t/109-read_locking.t t/110-shared_lock.t t/111-index_manager.t t/152-inversion.t t/154-regex_tokenizer.t t/200-doc.t t/201-hit_doc.t t/204-doc_reader.t t/205-seg_reader.t t/207-seg_lexicon.t t/208-terminfo.t t/209-seg_lexicon_heavy.t t/210-deldocs.t t/211-seg_posting_list.t t/213-segment_merging.t t/214-spec_field.t t/215-term_vectors.t t/216-schema.t t/217-poly_lexicon.t t/218-del_merging.t t/219-byte_buf_doc.t t/220-zlib_doc.t t/221-sort_writer.t t/224-lex_reader.t t/233-background_merger.t t/302-many_fields.t t/304-verify_utf8.t t/305-indexer.t t/306-dynamic_schema.t t/308-simple.t t/309-span.t t/310-heat_map.t t/311-hl_selection.t t/400-match_posting.t t/501-termquery.t t/502-phrasequery.t t/504-similarity.t t/505-hit_queue.t t/506-collector.t t/507-filter.t t/508-hits.t t/509-poly_searcher.t t/510-remote_search.t t/511-sort_spec.t t/513-matcher.t t/514-and_matcher.t t/515-range_query.t t/518-or_scorer.t t/519-req_opt_matcher.t t/520-match_doc.t t/523-and_query.t t/524-poly_query.t t/525-match_all_query.t t/526-not_query.t t/527-req_opt_query.t t/528-leaf_query.t t/529-no_match_query.t t/532-sort_collector.t t/550-cluster_searcher.t t/601-queryparser.t t/602-boosts.t t/603-query_boosts.t t/604-simple_search.t t/605-store_pos_boost.t t/607-queryparser_multi_field.t t/610-queryparser_logic.t t/611-queryparser_syntax.t t/613-proximityquery.t t/701-uscon.t t/999-remove_indexes.t t/binding/016-varray.t t/binding/017-hash.t t/binding/019-obj.t t/binding/022-bytebuf.t t/binding/029-charbuf.t t/binding/034-err.t t/binding/101-simple_io.t t/binding/150-polyanalyzer.t t/binding/151-analyzer.t t/binding/153-case_folder.t t/binding/155-snowball_stop_filter.t t/binding/156-snowball_stemmer.t t/binding/157-normalizer.t t/binding/158-standard_tokenizer.t t/binding/159-easyanalyzer.t t/binding/206-snapshot.t t/binding/303-highlighter.t t/binding/506-collector.t t/binding/702-sample.t t/binding/800-stack.t t/charmonizer/001-integers.t t/charmonizer/002-func_macro.t t/charmonizer/003-headers.t t/charmonizer/004-large_files.t t/charmonizer/005-unused_vars.t t/charmonizer/006-variadic_macros.t t/charmonizer/007-dirmanip.t t/core/012-priority_queue.t t/core/013-bit_vector.t t/core/016-varray.t t/core/017-hash.t t/core/019-obj.t t/core/022-bytebuf.t t/core/024-memory_pool.t t/core/029-charbuf.t t/core/030-number_utils.t t/core/031-num.t t/core/032-string_helper.t t/core/033-index_file_names.t t/core/035-json.t t/core/036-i32_array.t t/core/037-atomic.t t/core/039-memory.t t/core/050-ram_file_handle.t t/core/051-fs_file_handle.t t/core/052-instream.t t/core/053-file_handle.t t/core/054-io_primitives.t t/core/055-io_chunks.t t/core/061-ram_dir_handle.t t/core/062-fs_dir_handle.t t/core/103-fs_folder.t t/core/104-ram_folder.t t/core/105-folder.t t/core/111-index_manager.t t/core/112-cf_writer.t t/core/113-cf_reader.t t/core/150-analyzer.t t/core/150-polyanalyzer.t t/core/153-case_folder.t t/core/154-regex_tokenizer.t t/core/155-snowball_stop_filter.t t/core/156-snowball_stemmer.t t/core/157-normalizer.t t/core/158-standard_tokenizer.t t/core/206-snapshot.t t/core/216-schema.t t/core/220-doc_writer.t t/core/221-highlight_writer.t t/core/222-posting_list_writer.t t/core/223-seg_writer.t t/core/225-polyreader.t t/core/230-full_text_type.t t/core/231-blob_type.t t/core/232-numeric_type.t t/core/234-field_type.t t/core/301-segment.t t/core/303-highlighter.t t/core/501-termquery.t t/core/502-phrasequery.t t/core/515-range_query.t t/core/523-and_query.t t/core/525-match_all_query.t t/core/526-not_query.t t/core/527-req_opt_query.t t/core/528-leaf_query.t t/core/529-no_match_query.t t/core/530-series_matcher.t t/core/531-or_query.t xs/Lucy/Analysis/CaseFolder.c xs/Lucy/Analysis/RegexTokenizer.c xs/Lucy/Document/Doc.c xs/Lucy/Index/DocReader.c xs/Lucy/Index/Inverter.c xs/Lucy/Index/PolyReader.c xs/Lucy/Index/SegReader.c xs/Lucy/Object/Err.c xs/Lucy/Object/Host.c xs/Lucy/Object/LockFreeRegistry.c xs/Lucy/Object/Obj.c xs/Lucy/Object/VTable.c xs/Lucy/Store/FSFolder.c xs/XSBind.c xs/XSBind.h META.yml META.json liblucy-perl-0.3.3/META.json000066400000000000000000002104551233767526200155650ustar00rootroot00000000000000{ "abstract" : "Apache Lucy search engine library.", "author" : [ "The Apache Lucy Project " ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921", "keywords" : [ "search", "lucy", "lucene" ], "license" : [ "apache_2_0" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Lucy", "no_index" : { "file" : [ "Build.PL", "CHANGES", "CONTRIBUTING", "INSTALL", "LICENSE", "MANIFEST\t\t\tThis list of files", "NOTICE", "buildlib/Lucy/Build.pm", "buildlib/Lucy/Redacted.pm", "buildlib/Lucy/Test/TestUtils.pm", "charmonizer/Makefile", "charmonizer/Makefile.MSVC", "charmonizer/Makefile.MinGW", "charmonizer/README", "charmonizer/charmonize.c", "charmonizer/src/Charmonizer/Core/Compiler.c", "charmonizer/src/Charmonizer/Core/Compiler.h", "charmonizer/src/Charmonizer/Core/ConfWriter.c", "charmonizer/src/Charmonizer/Core/ConfWriter.h", "charmonizer/src/Charmonizer/Core/Defines.h", "charmonizer/src/Charmonizer/Core/HeaderChecker.c", "charmonizer/src/Charmonizer/Core/HeaderChecker.h", "charmonizer/src/Charmonizer/Core/OperatingSystem.c", "charmonizer/src/Charmonizer/Core/OperatingSystem.h", "charmonizer/src/Charmonizer/Core/Util.c", "charmonizer/src/Charmonizer/Core/Util.h", "charmonizer/src/Charmonizer/Probe.c", "charmonizer/src/Charmonizer/Probe.h", "charmonizer/src/Charmonizer/Probe/AtomicOps.c", "charmonizer/src/Charmonizer/Probe/AtomicOps.h", "charmonizer/src/Charmonizer/Probe/DirManip.c", "charmonizer/src/Charmonizer/Probe/DirManip.h", "charmonizer/src/Charmonizer/Probe/Floats.c", "charmonizer/src/Charmonizer/Probe/Floats.h", "charmonizer/src/Charmonizer/Probe/FuncMacro.c", "charmonizer/src/Charmonizer/Probe/FuncMacro.h", "charmonizer/src/Charmonizer/Probe/Headers.c", "charmonizer/src/Charmonizer/Probe/Headers.h", "charmonizer/src/Charmonizer/Probe/Integers.c", "charmonizer/src/Charmonizer/Probe/Integers.h", "charmonizer/src/Charmonizer/Probe/LargeFiles.c", "charmonizer/src/Charmonizer/Probe/LargeFiles.h", "charmonizer/src/Charmonizer/Probe/Memory.c", "charmonizer/src/Charmonizer/Probe/Memory.h", "charmonizer/src/Charmonizer/Probe/UnusedVars.c", "charmonizer/src/Charmonizer/Probe/UnusedVars.h", "charmonizer/src/Charmonizer/Probe/VariadicMacros.c", "charmonizer/src/Charmonizer/Probe/VariadicMacros.h", "charmonizer/src/Charmonizer/Test.c", "charmonizer/src/Charmonizer/Test.h", "charmonizer/src/Charmonizer/Test/TestDirManip.c", "charmonizer/src/Charmonizer/Test/TestFuncMacro.c", "charmonizer/src/Charmonizer/Test/TestHeaders.c", "charmonizer/src/Charmonizer/Test/TestIntegers.c", "charmonizer/src/Charmonizer/Test/TestLargeFiles.c", "charmonizer/src/Charmonizer/Test/TestUnusedVars.c", "charmonizer/src/Charmonizer/Test/TestVariadicMacros.c", "clownfish/include/CFC.h", "clownfish/perl/Build.PL", "clownfish/perl/MANIFEST", "clownfish/perl/buildlib/Clownfish/CFC/Build.pm", "clownfish/perl/lib/Clownfish.pod", "clownfish/perl/lib/Clownfish/CFC.pm", "clownfish/perl/lib/Clownfish/CFC.xs", "clownfish/perl/lib/Clownfish/CFC/Base.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Core.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Core/Aliases.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Core/Class.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Core/File.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Core/Function.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Core/Method.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Class.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Constructor.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Method.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Subroutine.pm", "clownfish/perl/lib/Clownfish/CFC/Binding/Perl/TypeMap.pm", "clownfish/perl/lib/Clownfish/CFC/CBlock.pm", "clownfish/perl/lib/Clownfish/CFC/Class.pm", "clownfish/perl/lib/Clownfish/CFC/DocuComment.pm", "clownfish/perl/lib/Clownfish/CFC/Dumpable.pm", "clownfish/perl/lib/Clownfish/CFC/File.pm", "clownfish/perl/lib/Clownfish/CFC/Function.pm", "clownfish/perl/lib/Clownfish/CFC/Hierarchy.pm", "clownfish/perl/lib/Clownfish/CFC/Method.pm", "clownfish/perl/lib/Clownfish/CFC/ParamList.pm", "clownfish/perl/lib/Clownfish/CFC/Parcel.pm", "clownfish/perl/lib/Clownfish/CFC/Parser.pm", "clownfish/perl/lib/Clownfish/CFC/Symbol.pm", "clownfish/perl/lib/Clownfish/CFC/Type.pm", "clownfish/perl/lib/Clownfish/CFC/Util.pm", "clownfish/perl/lib/Clownfish/CFC/Variable.pm", "clownfish/perl/t/000-load.t", "clownfish/perl/t/001-util.t", "clownfish/perl/t/050-docucomment.t", "clownfish/perl/t/051-symbol.t", "clownfish/perl/t/100-type.t", "clownfish/perl/t/101-primitive_type.t", "clownfish/perl/t/102-integer_type.t", "clownfish/perl/t/103-float_type.t", "clownfish/perl/t/104-void_type.t", "clownfish/perl/t/105-object_type.t", "clownfish/perl/t/106-va_list_type.t", "clownfish/perl/t/107-arbitrary_type.t", "clownfish/perl/t/108-composite_type.t", "clownfish/perl/t/200-function.t", "clownfish/perl/t/201-method.t", "clownfish/perl/t/202-overridden_method.t", "clownfish/perl/t/203-final_method.t", "clownfish/perl/t/300-variable.t", "clownfish/perl/t/301-param_list.t", "clownfish/perl/t/400-class.t", "clownfish/perl/t/401-c_block.t", "clownfish/perl/t/402-parcel.t", "clownfish/perl/t/403-file.t", "clownfish/perl/t/500-hierarchy.t", "clownfish/perl/t/600-parser.t", "clownfish/perl/t/cfsource/Animal.cfh", "clownfish/perl/t/cfsource/Animal/Dog.cfh", "clownfish/perl/t/cfsource/Animal/Util.cfh", "clownfish/perl/typemap", "clownfish/ruby/Rakefile", "clownfish/src/CFCBase.c", "clownfish/src/CFCBase.h", "clownfish/src/CFCBindAliases.c", "clownfish/src/CFCBindAliases.h", "clownfish/src/CFCBindClass.c", "clownfish/src/CFCBindClass.h", "clownfish/src/CFCBindCore.c", "clownfish/src/CFCBindCore.h", "clownfish/src/CFCBindFile.c", "clownfish/src/CFCBindFile.h", "clownfish/src/CFCBindFunction.c", "clownfish/src/CFCBindFunction.h", "clownfish/src/CFCBindMethod.c", "clownfish/src/CFCBindMethod.h", "clownfish/src/CFCCBlock.c", "clownfish/src/CFCCBlock.h", "clownfish/src/CFCClass.c", "clownfish/src/CFCClass.h", "clownfish/src/CFCDocuComment.c", "clownfish/src/CFCDocuComment.h", "clownfish/src/CFCDumpable.c", "clownfish/src/CFCDumpable.h", "clownfish/src/CFCFile.c", "clownfish/src/CFCFile.h", "clownfish/src/CFCFunction.c", "clownfish/src/CFCFunction.h", "clownfish/src/CFCHierarchy.c", "clownfish/src/CFCHierarchy.h", "clownfish/src/CFCLexHeader.c", "clownfish/src/CFCLexHeader.h", "clownfish/src/CFCLexHeader.l", "clownfish/src/CFCMemPool.c", "clownfish/src/CFCMemPool.h", "clownfish/src/CFCMethod.c", "clownfish/src/CFCMethod.h", "clownfish/src/CFCParamList.c", "clownfish/src/CFCParamList.h", "clownfish/src/CFCParcel.c", "clownfish/src/CFCParcel.h", "clownfish/src/CFCParseHeader.y", "clownfish/src/CFCParser.c", "clownfish/src/CFCParser.h", "clownfish/src/CFCSymbol.c", "clownfish/src/CFCSymbol.h", "clownfish/src/CFCType.c", "clownfish/src/CFCType.h", "clownfish/src/CFCUtil.c", "clownfish/src/CFCUtil.h", "clownfish/src/CFCVariable.c", "clownfish/src/CFCVariable.h", "core/Lucy/Analysis/Analyzer.c", "core/Lucy/Analysis/Analyzer.cfh", "core/Lucy/Analysis/CaseFolder.c", "core/Lucy/Analysis/CaseFolder.cfh", "core/Lucy/Analysis/EasyAnalyzer.c", "core/Lucy/Analysis/EasyAnalyzer.cfh", "core/Lucy/Analysis/Inversion.c", "core/Lucy/Analysis/Inversion.cfh", "core/Lucy/Analysis/Normalizer.c", "core/Lucy/Analysis/Normalizer.cfh", "core/Lucy/Analysis/PolyAnalyzer.c", "core/Lucy/Analysis/PolyAnalyzer.cfh", "core/Lucy/Analysis/RegexTokenizer.c", "core/Lucy/Analysis/RegexTokenizer.cfh", "core/Lucy/Analysis/SnowballStemmer.c", "core/Lucy/Analysis/SnowballStemmer.cfh", "core/Lucy/Analysis/SnowballStopFilter.c", "core/Lucy/Analysis/SnowballStopFilter.cfh", "core/Lucy/Analysis/StandardTokenizer.c", "core/Lucy/Analysis/StandardTokenizer.cfh", "core/Lucy/Analysis/Token.c", "core/Lucy/Analysis/Token.cfh", "core/Lucy/Docs/DevGuide.cfh", "core/Lucy/Docs/FileLocking.cfh", "core/Lucy/Document/Doc.c", "core/Lucy/Document/Doc.cfh", "core/Lucy/Document/HitDoc.c", "core/Lucy/Document/HitDoc.cfh", "core/Lucy/Highlight/HeatMap.c", "core/Lucy/Highlight/HeatMap.cfh", "core/Lucy/Highlight/Highlighter.c", "core/Lucy/Highlight/Highlighter.cfh", "core/Lucy/Index/BackgroundMerger.c", "core/Lucy/Index/BackgroundMerger.cfh", "core/Lucy/Index/BitVecDelDocs.c", "core/Lucy/Index/BitVecDelDocs.cfh", "core/Lucy/Index/DataReader.c", "core/Lucy/Index/DataReader.cfh", "core/Lucy/Index/DataWriter.c", "core/Lucy/Index/DataWriter.cfh", "core/Lucy/Index/DeletionsReader.c", "core/Lucy/Index/DeletionsReader.cfh", "core/Lucy/Index/DeletionsWriter.c", "core/Lucy/Index/DeletionsWriter.cfh", "core/Lucy/Index/DocReader.c", "core/Lucy/Index/DocReader.cfh", "core/Lucy/Index/DocVector.c", "core/Lucy/Index/DocVector.cfh", "core/Lucy/Index/DocWriter.c", "core/Lucy/Index/DocWriter.cfh", "core/Lucy/Index/FilePurger.c", "core/Lucy/Index/FilePurger.cfh", "core/Lucy/Index/HighlightReader.c", "core/Lucy/Index/HighlightReader.cfh", "core/Lucy/Index/HighlightWriter.c", "core/Lucy/Index/HighlightWriter.cfh", "core/Lucy/Index/IndexManager.c", "core/Lucy/Index/IndexManager.cfh", "core/Lucy/Index/IndexReader.c", "core/Lucy/Index/IndexReader.cfh", "core/Lucy/Index/Indexer.c", "core/Lucy/Index/Indexer.cfh", "core/Lucy/Index/Inverter.c", "core/Lucy/Index/Inverter.cfh", "core/Lucy/Index/LexIndex.c", "core/Lucy/Index/LexIndex.cfh", "core/Lucy/Index/Lexicon.c", "core/Lucy/Index/Lexicon.cfh", "core/Lucy/Index/LexiconReader.c", "core/Lucy/Index/LexiconReader.cfh", "core/Lucy/Index/LexiconWriter.c", "core/Lucy/Index/LexiconWriter.cfh", "core/Lucy/Index/PolyLexicon.c", "core/Lucy/Index/PolyLexicon.cfh", "core/Lucy/Index/PolyReader.c", "core/Lucy/Index/PolyReader.cfh", "core/Lucy/Index/Posting.c", "core/Lucy/Index/Posting.cfh", "core/Lucy/Index/Posting/MatchPosting.c", "core/Lucy/Index/Posting/MatchPosting.cfh", "core/Lucy/Index/Posting/RawPosting.c", "core/Lucy/Index/Posting/RawPosting.cfh", "core/Lucy/Index/Posting/RichPosting.c", "core/Lucy/Index/Posting/RichPosting.cfh", "core/Lucy/Index/Posting/ScorePosting.c", "core/Lucy/Index/Posting/ScorePosting.cfh", "core/Lucy/Index/PostingList.c", "core/Lucy/Index/PostingList.cfh", "core/Lucy/Index/PostingListReader.c", "core/Lucy/Index/PostingListReader.cfh", "core/Lucy/Index/PostingListWriter.c", "core/Lucy/Index/PostingListWriter.cfh", "core/Lucy/Index/PostingPool.c", "core/Lucy/Index/PostingPool.cfh", "core/Lucy/Index/RawLexicon.c", "core/Lucy/Index/RawLexicon.cfh", "core/Lucy/Index/RawPostingList.c", "core/Lucy/Index/RawPostingList.cfh", "core/Lucy/Index/SegLexicon.c", "core/Lucy/Index/SegLexicon.cfh", "core/Lucy/Index/SegPostingList.c", "core/Lucy/Index/SegPostingList.cfh", "core/Lucy/Index/SegReader.c", "core/Lucy/Index/SegReader.cfh", "core/Lucy/Index/SegWriter.c", "core/Lucy/Index/SegWriter.cfh", "core/Lucy/Index/Segment.c", "core/Lucy/Index/Segment.cfh", "core/Lucy/Index/Similarity.c", "core/Lucy/Index/Similarity.cfh", "core/Lucy/Index/SkipStepper.c", "core/Lucy/Index/SkipStepper.cfh", "core/Lucy/Index/Snapshot.c", "core/Lucy/Index/Snapshot.cfh", "core/Lucy/Index/SortCache.c", "core/Lucy/Index/SortCache.cfh", "core/Lucy/Index/SortCache/NumericSortCache.c", "core/Lucy/Index/SortCache/NumericSortCache.cfh", "core/Lucy/Index/SortCache/TextSortCache.c", "core/Lucy/Index/SortCache/TextSortCache.cfh", "core/Lucy/Index/SortFieldWriter.c", "core/Lucy/Index/SortFieldWriter.cfh", "core/Lucy/Index/SortReader.c", "core/Lucy/Index/SortReader.cfh", "core/Lucy/Index/SortWriter.c", "core/Lucy/Index/SortWriter.cfh", "core/Lucy/Index/TermInfo.c", "core/Lucy/Index/TermInfo.cfh", "core/Lucy/Index/TermStepper.c", "core/Lucy/Index/TermStepper.cfh", "core/Lucy/Index/TermVector.c", "core/Lucy/Index/TermVector.cfh", "core/Lucy/Index/ZombieKeyedHash.c", "core/Lucy/Index/ZombieKeyedHash.cfh", "core/Lucy/Object/BitVector.c", "core/Lucy/Object/BitVector.cfh", "core/Lucy/Object/ByteBuf.c", "core/Lucy/Object/ByteBuf.cfh", "core/Lucy/Object/CharBuf.c", "core/Lucy/Object/CharBuf.cfh", "core/Lucy/Object/Err.c", "core/Lucy/Object/Err.cfh", "core/Lucy/Object/Hash.c", "core/Lucy/Object/Hash.cfh", "core/Lucy/Object/Host.cfh", "core/Lucy/Object/I32Array.c", "core/Lucy/Object/I32Array.cfh", "core/Lucy/Object/LockFreeRegistry.c", "core/Lucy/Object/LockFreeRegistry.cfh", "core/Lucy/Object/Num.c", "core/Lucy/Object/Num.cfh", "core/Lucy/Object/Obj.c", "core/Lucy/Object/Obj.cfh", "core/Lucy/Object/VArray.c", "core/Lucy/Object/VArray.cfh", "core/Lucy/Object/VTable.c", "core/Lucy/Object/VTable.cfh", "core/Lucy/Plan/Architecture.c", "core/Lucy/Plan/Architecture.cfh", "core/Lucy/Plan/BlobType.c", "core/Lucy/Plan/BlobType.cfh", "core/Lucy/Plan/FieldType.c", "core/Lucy/Plan/FieldType.cfh", "core/Lucy/Plan/FullTextType.c", "core/Lucy/Plan/FullTextType.cfh", "core/Lucy/Plan/NumericType.c", "core/Lucy/Plan/NumericType.cfh", "core/Lucy/Plan/Schema.c", "core/Lucy/Plan/Schema.cfh", "core/Lucy/Plan/StringType.c", "core/Lucy/Plan/StringType.cfh", "core/Lucy/Plan/TextType.c", "core/Lucy/Plan/TextType.cfh", "core/Lucy/Search/ANDMatcher.c", "core/Lucy/Search/ANDMatcher.cfh", "core/Lucy/Search/ANDQuery.c", "core/Lucy/Search/ANDQuery.cfh", "core/Lucy/Search/BitVecMatcher.c", "core/Lucy/Search/BitVecMatcher.cfh", "core/Lucy/Search/Collector.c", "core/Lucy/Search/Collector.cfh", "core/Lucy/Search/Collector/SortCollector.c", "core/Lucy/Search/Collector/SortCollector.cfh", "core/Lucy/Search/Compiler.c", "core/Lucy/Search/Compiler.cfh", "core/Lucy/Search/HitQueue.c", "core/Lucy/Search/HitQueue.cfh", "core/Lucy/Search/Hits.c", "core/Lucy/Search/Hits.cfh", "core/Lucy/Search/IndexSearcher.c", "core/Lucy/Search/IndexSearcher.cfh", "core/Lucy/Search/LeafQuery.c", "core/Lucy/Search/LeafQuery.cfh", "core/Lucy/Search/MatchAllMatcher.c", "core/Lucy/Search/MatchAllMatcher.cfh", "core/Lucy/Search/MatchAllQuery.c", "core/Lucy/Search/MatchAllQuery.cfh", "core/Lucy/Search/MatchDoc.c", "core/Lucy/Search/MatchDoc.cfh", "core/Lucy/Search/Matcher.c", "core/Lucy/Search/Matcher.cfh", "core/Lucy/Search/NOTMatcher.c", "core/Lucy/Search/NOTMatcher.cfh", "core/Lucy/Search/NOTQuery.c", "core/Lucy/Search/NOTQuery.cfh", "core/Lucy/Search/NoMatchMatcher.c", "core/Lucy/Search/NoMatchMatcher.cfh", "core/Lucy/Search/NoMatchQuery.c", "core/Lucy/Search/NoMatchQuery.cfh", "core/Lucy/Search/ORMatcher.c", "core/Lucy/Search/ORMatcher.cfh", "core/Lucy/Search/ORQuery.c", "core/Lucy/Search/ORQuery.cfh", "core/Lucy/Search/PhraseMatcher.c", "core/Lucy/Search/PhraseMatcher.cfh", "core/Lucy/Search/PhraseQuery.c", "core/Lucy/Search/PhraseQuery.cfh", "core/Lucy/Search/PolyMatcher.c", "core/Lucy/Search/PolyMatcher.cfh", "core/Lucy/Search/PolyQuery.c", "core/Lucy/Search/PolyQuery.cfh", "core/Lucy/Search/PolySearcher.c", "core/Lucy/Search/PolySearcher.cfh", "core/Lucy/Search/Query.c", "core/Lucy/Search/Query.cfh", "core/Lucy/Search/QueryParser.c", "core/Lucy/Search/QueryParser.cfh", "core/Lucy/Search/RangeMatcher.c", "core/Lucy/Search/RangeMatcher.cfh", "core/Lucy/Search/RangeQuery.c", "core/Lucy/Search/RangeQuery.cfh", "core/Lucy/Search/RequiredOptionalMatcher.c", "core/Lucy/Search/RequiredOptionalMatcher.cfh", "core/Lucy/Search/RequiredOptionalQuery.c", "core/Lucy/Search/RequiredOptionalQuery.cfh", "core/Lucy/Search/Searcher.c", "core/Lucy/Search/Searcher.cfh", "core/Lucy/Search/SeriesMatcher.c", "core/Lucy/Search/SeriesMatcher.cfh", "core/Lucy/Search/SortRule.c", "core/Lucy/Search/SortRule.cfh", "core/Lucy/Search/SortSpec.c", "core/Lucy/Search/SortSpec.cfh", "core/Lucy/Search/Span.c", "core/Lucy/Search/Span.cfh", "core/Lucy/Search/TermMatcher.c", "core/Lucy/Search/TermMatcher.cfh", "core/Lucy/Search/TermQuery.c", "core/Lucy/Search/TermQuery.cfh", "core/Lucy/Search/TopDocs.c", "core/Lucy/Search/TopDocs.cfh", "core/Lucy/Store/CompoundFileReader.c", "core/Lucy/Store/CompoundFileReader.cfh", "core/Lucy/Store/CompoundFileWriter.c", "core/Lucy/Store/CompoundFileWriter.cfh", "core/Lucy/Store/DirHandle.c", "core/Lucy/Store/DirHandle.cfh", "core/Lucy/Store/FSDirHandle.c", "core/Lucy/Store/FSDirHandle.cfh", "core/Lucy/Store/FSFileHandle.c", "core/Lucy/Store/FSFileHandle.cfh", "core/Lucy/Store/FSFolder.c", "core/Lucy/Store/FSFolder.cfh", "core/Lucy/Store/FileHandle.c", "core/Lucy/Store/FileHandle.cfh", "core/Lucy/Store/FileWindow.c", "core/Lucy/Store/FileWindow.cfh", "core/Lucy/Store/Folder.c", "core/Lucy/Store/Folder.cfh", "core/Lucy/Store/InStream.c", "core/Lucy/Store/InStream.cfh", "core/Lucy/Store/Lock.c", "core/Lucy/Store/Lock.cfh", "core/Lucy/Store/LockFactory.c", "core/Lucy/Store/LockFactory.cfh", "core/Lucy/Store/OutStream.c", "core/Lucy/Store/OutStream.cfh", "core/Lucy/Store/RAMDirHandle.c", "core/Lucy/Store/RAMDirHandle.cfh", "core/Lucy/Store/RAMFile.c", "core/Lucy/Store/RAMFile.cfh", "core/Lucy/Store/RAMFileHandle.c", "core/Lucy/Store/RAMFileHandle.cfh", "core/Lucy/Store/RAMFolder.c", "core/Lucy/Store/RAMFolder.cfh", "core/Lucy/Store/SharedLock.c", "core/Lucy/Store/SharedLock.cfh", "core/Lucy/Test.c", "core/Lucy/Test.cfh", "core/Lucy/Test/Analysis/TestAnalyzer.c", "core/Lucy/Test/Analysis/TestAnalyzer.cfh", "core/Lucy/Test/Analysis/TestCaseFolder.c", "core/Lucy/Test/Analysis/TestCaseFolder.cfh", "core/Lucy/Test/Analysis/TestNormalizer.c", "core/Lucy/Test/Analysis/TestNormalizer.cfh", "core/Lucy/Test/Analysis/TestPolyAnalyzer.c", "core/Lucy/Test/Analysis/TestPolyAnalyzer.cfh", "core/Lucy/Test/Analysis/TestRegexTokenizer.c", "core/Lucy/Test/Analysis/TestRegexTokenizer.cfh", "core/Lucy/Test/Analysis/TestSnowballStemmer.c", "core/Lucy/Test/Analysis/TestSnowballStemmer.cfh", "core/Lucy/Test/Analysis/TestSnowballStopFilter.c", "core/Lucy/Test/Analysis/TestSnowballStopFilter.cfh", "core/Lucy/Test/Analysis/TestStandardTokenizer.c", "core/Lucy/Test/Analysis/TestStandardTokenizer.cfh", "core/Lucy/Test/Highlight/TestHighlighter.c", "core/Lucy/Test/Highlight/TestHighlighter.cfh", "core/Lucy/Test/Index/TestDocWriter.c", "core/Lucy/Test/Index/TestDocWriter.cfh", "core/Lucy/Test/Index/TestHighlightWriter.c", "core/Lucy/Test/Index/TestHighlightWriter.cfh", "core/Lucy/Test/Index/TestIndexManager.c", "core/Lucy/Test/Index/TestIndexManager.cfh", "core/Lucy/Test/Index/TestPolyReader.c", "core/Lucy/Test/Index/TestPolyReader.cfh", "core/Lucy/Test/Index/TestPostingListWriter.c", "core/Lucy/Test/Index/TestPostingListWriter.cfh", "core/Lucy/Test/Index/TestSegWriter.c", "core/Lucy/Test/Index/TestSegWriter.cfh", "core/Lucy/Test/Index/TestSegment.c", "core/Lucy/Test/Index/TestSegment.cfh", "core/Lucy/Test/Index/TestSnapshot.c", "core/Lucy/Test/Index/TestSnapshot.cfh", "core/Lucy/Test/Object/TestBitVector.c", "core/Lucy/Test/Object/TestBitVector.cfh", "core/Lucy/Test/Object/TestByteBuf.c", "core/Lucy/Test/Object/TestByteBuf.cfh", "core/Lucy/Test/Object/TestCharBuf.c", "core/Lucy/Test/Object/TestCharBuf.cfh", "core/Lucy/Test/Object/TestHash.c", "core/Lucy/Test/Object/TestHash.cfh", "core/Lucy/Test/Object/TestI32Array.c", "core/Lucy/Test/Object/TestI32Array.cfh", "core/Lucy/Test/Object/TestLockFreeRegistry.c", "core/Lucy/Test/Object/TestLockFreeRegistry.cfh", "core/Lucy/Test/Object/TestNum.c", "core/Lucy/Test/Object/TestNum.cfh", "core/Lucy/Test/Object/TestObj.c", "core/Lucy/Test/Object/TestObj.cfh", "core/Lucy/Test/Object/TestVArray.c", "core/Lucy/Test/Object/TestVArray.cfh", "core/Lucy/Test/Plan/TestArchitecture.c", "core/Lucy/Test/Plan/TestArchitecture.cfh", "core/Lucy/Test/Plan/TestBlobType.c", "core/Lucy/Test/Plan/TestBlobType.cfh", "core/Lucy/Test/Plan/TestFieldType.c", "core/Lucy/Test/Plan/TestFieldType.cfh", "core/Lucy/Test/Plan/TestFullTextType.c", "core/Lucy/Test/Plan/TestFullTextType.cfh", "core/Lucy/Test/Plan/TestNumericType.c", "core/Lucy/Test/Plan/TestNumericType.cfh", "core/Lucy/Test/Search/TestLeafQuery.c", "core/Lucy/Test/Search/TestLeafQuery.cfh", "core/Lucy/Test/Search/TestMatchAllQuery.c", "core/Lucy/Test/Search/TestMatchAllQuery.cfh", "core/Lucy/Test/Search/TestNOTQuery.c", "core/Lucy/Test/Search/TestNOTQuery.cfh", "core/Lucy/Test/Search/TestNoMatchQuery.c", "core/Lucy/Test/Search/TestNoMatchQuery.cfh", "core/Lucy/Test/Search/TestPhraseQuery.c", "core/Lucy/Test/Search/TestPhraseQuery.cfh", "core/Lucy/Test/Search/TestPolyQuery.c", "core/Lucy/Test/Search/TestPolyQuery.cfh", "core/Lucy/Test/Search/TestQueryParser.c", "core/Lucy/Test/Search/TestQueryParser.cfh", "core/Lucy/Test/Search/TestQueryParserLogic.c", "core/Lucy/Test/Search/TestQueryParserLogic.cfh", "core/Lucy/Test/Search/TestQueryParserSyntax.c", "core/Lucy/Test/Search/TestQueryParserSyntax.cfh", "core/Lucy/Test/Search/TestRangeQuery.c", "core/Lucy/Test/Search/TestRangeQuery.cfh", "core/Lucy/Test/Search/TestReqOptQuery.c", "core/Lucy/Test/Search/TestReqOptQuery.cfh", "core/Lucy/Test/Search/TestSeriesMatcher.c", "core/Lucy/Test/Search/TestSeriesMatcher.cfh", "core/Lucy/Test/Search/TestTermQuery.c", "core/Lucy/Test/Search/TestTermQuery.cfh", "core/Lucy/Test/Store/MockFileHandle.c", "core/Lucy/Test/Store/MockFileHandle.cfh", "core/Lucy/Test/Store/TestCompoundFileReader.c", "core/Lucy/Test/Store/TestCompoundFileReader.cfh", "core/Lucy/Test/Store/TestCompoundFileWriter.c", "core/Lucy/Test/Store/TestCompoundFileWriter.cfh", "core/Lucy/Test/Store/TestFSDirHandle.c", "core/Lucy/Test/Store/TestFSDirHandle.cfh", "core/Lucy/Test/Store/TestFSFileHandle.c", "core/Lucy/Test/Store/TestFSFileHandle.cfh", "core/Lucy/Test/Store/TestFSFolder.c", "core/Lucy/Test/Store/TestFSFolder.cfh", "core/Lucy/Test/Store/TestFileHandle.c", "core/Lucy/Test/Store/TestFileHandle.cfh", "core/Lucy/Test/Store/TestFolder.c", "core/Lucy/Test/Store/TestFolder.cfh", "core/Lucy/Test/Store/TestFolderCommon.c", "core/Lucy/Test/Store/TestFolderCommon.cfh", "core/Lucy/Test/Store/TestIOChunks.c", "core/Lucy/Test/Store/TestIOChunks.cfh", "core/Lucy/Test/Store/TestIOPrimitives.c", "core/Lucy/Test/Store/TestIOPrimitives.cfh", "core/Lucy/Test/Store/TestInStream.c", "core/Lucy/Test/Store/TestInStream.cfh", "core/Lucy/Test/Store/TestRAMDirHandle.c", "core/Lucy/Test/Store/TestRAMDirHandle.cfh", "core/Lucy/Test/Store/TestRAMFileHandle.c", "core/Lucy/Test/Store/TestRAMFileHandle.cfh", "core/Lucy/Test/Store/TestRAMFolder.c", "core/Lucy/Test/Store/TestRAMFolder.cfh", "core/Lucy/Test/TestSchema.c", "core/Lucy/Test/TestSchema.cfh", "core/Lucy/Test/TestUtils.c", "core/Lucy/Test/TestUtils.cfh", "core/Lucy/Test/Util/BBSortEx.c", "core/Lucy/Test/Util/BBSortEx.cfh", "core/Lucy/Test/Util/TestAtomic.c", "core/Lucy/Test/Util/TestAtomic.cfh", "core/Lucy/Test/Util/TestIndexFileNames.c", "core/Lucy/Test/Util/TestIndexFileNames.cfh", "core/Lucy/Test/Util/TestJson.c", "core/Lucy/Test/Util/TestJson.cfh", "core/Lucy/Test/Util/TestMemory.c", "core/Lucy/Test/Util/TestMemory.cfh", "core/Lucy/Test/Util/TestMemoryPool.c", "core/Lucy/Test/Util/TestMemoryPool.cfh", "core/Lucy/Test/Util/TestNumberUtils.c", "core/Lucy/Test/Util/TestNumberUtils.cfh", "core/Lucy/Test/Util/TestPriorityQueue.c", "core/Lucy/Test/Util/TestPriorityQueue.cfh", "core/Lucy/Test/Util/TestStringHelper.c", "core/Lucy/Test/Util/TestStringHelper.cfh", "core/Lucy/Util/Atomic.c", "core/Lucy/Util/Atomic.cfh", "core/Lucy/Util/Debug.c", "core/Lucy/Util/Debug.cfh", "core/Lucy/Util/Freezer.c", "core/Lucy/Util/Freezer.cfh", "core/Lucy/Util/IndexFileNames.c", "core/Lucy/Util/IndexFileNames.cfh", "core/Lucy/Util/Json.c", "core/Lucy/Util/Json.cfh", "core/Lucy/Util/Json/JsonParser.y", "core/Lucy/Util/Memory.c", "core/Lucy/Util/Memory.cfh", "core/Lucy/Util/MemoryPool.c", "core/Lucy/Util/MemoryPool.cfh", "core/Lucy/Util/NumberUtils.c", "core/Lucy/Util/NumberUtils.cfh", "core/Lucy/Util/PriorityQueue.c", "core/Lucy/Util/PriorityQueue.cfh", "core/Lucy/Util/ProcessID.c", "core/Lucy/Util/ProcessID.cfh", "core/Lucy/Util/Sleep.c", "core/Lucy/Util/Sleep.cfh", "core/Lucy/Util/SortExternal.c", "core/Lucy/Util/SortExternal.cfh", "core/Lucy/Util/SortUtils.c", "core/Lucy/Util/SortUtils.cfh", "core/Lucy/Util/Stepper.c", "core/Lucy/Util/Stepper.cfh", "core/Lucy/Util/StringHelper.c", "core/Lucy/Util/StringHelper.cfh", "core/Lucy/Util/ToolSet.h", "core/LucyX/Search/FilterMatcher.c", "core/LucyX/Search/FilterMatcher.cfh", "core/LucyX/Search/MockMatcher.c", "core/LucyX/Search/MockMatcher.cfh", "core/LucyX/Search/ProximityMatcher.c", "core/LucyX/Search/ProximityMatcher.cfh", "core/LucyX/Search/ProximityQuery.c", "core/LucyX/Search/ProximityQuery.cfh", "devel/benchmarks/README.txt", "devel/benchmarks/extract_reuters.plx", "devel/benchmarks/indexers/BenchmarkingIndexer.pm", "devel/benchmarks/indexers/LuceneIndexer.java", "devel/benchmarks/indexers/lucy_indexer.plx", "devel/bin/UnicodeTable.pm", "devel/bin/format_changes_entry.pl", "devel/bin/gen_charmonizer_makefiles.pl", "devel/bin/gen_word_break_data.pl", "devel/bin/lucytidy.pl", "devel/bin/release_commands.pl", "devel/bin/smoke.pl", "devel/bin/update_version", "devel/bin/valgrind_triggers.pl", "devel/conf/astylerc", "devel/conf/lucyperl.supp", "devel/conf/perltidyrc", "devel/conf/rat-excludes", "lemon/Makefile", "lemon/Makefile.MSVC", "lemon/Makefile.MinGW", "lemon/README", "lemon/lemon.c", "lemon/lempar.c", "lib/Lucy.pm", "lib/Lucy/Analysis/Analyzer.pm", "lib/Lucy/Analysis/CaseFolder.pm", "lib/Lucy/Analysis/EasyAnalyzer.pm", "lib/Lucy/Analysis/Inversion.pm", "lib/Lucy/Analysis/LCNormalizer.pm", "lib/Lucy/Analysis/Normalizer.pm", "lib/Lucy/Analysis/PolyAnalyzer.pm", "lib/Lucy/Analysis/RegexTokenizer.pm", "lib/Lucy/Analysis/SnowballStemmer.pm", "lib/Lucy/Analysis/SnowballStopFilter.pm", "lib/Lucy/Analysis/StandardTokenizer.pm", "lib/Lucy/Analysis/Token.pm", "lib/Lucy/Analysis/TokenBatch.pm", "lib/Lucy/Docs/DevGuide.pm", "lib/Lucy/Docs/FileLocking.pm", "lib/Lucy/Document/Doc.pm", "lib/Lucy/Document/HitDoc.pm", "lib/Lucy/Highlight/HeatMap.pm", "lib/Lucy/Highlight/Highlighter.pm", "lib/Lucy/Index/BackgroundMerger.pm", "lib/Lucy/Index/DataReader.pm", "lib/Lucy/Index/DataWriter.pm", "lib/Lucy/Index/DeletionsReader.pm", "lib/Lucy/Index/DeletionsWriter.pm", "lib/Lucy/Index/DocReader.pm", "lib/Lucy/Index/DocVector.pm", "lib/Lucy/Index/DocWriter.pm", "lib/Lucy/Index/FilePurger.pm", "lib/Lucy/Index/HighlightReader.pm", "lib/Lucy/Index/HighlightWriter.pm", "lib/Lucy/Index/IndexManager.pm", "lib/Lucy/Index/IndexReader.pm", "lib/Lucy/Index/Indexer.pm", "lib/Lucy/Index/Inverter.pm", "lib/Lucy/Index/Lexicon.pm", "lib/Lucy/Index/LexiconReader.pm", "lib/Lucy/Index/LexiconWriter.pm", "lib/Lucy/Index/PolyLexicon.pm", "lib/Lucy/Index/PolyReader.pm", "lib/Lucy/Index/Posting.pm", "lib/Lucy/Index/Posting/MatchPosting.pm", "lib/Lucy/Index/Posting/RichPosting.pm", "lib/Lucy/Index/Posting/ScorePosting.pm", "lib/Lucy/Index/PostingList.pm", "lib/Lucy/Index/PostingListReader.pm", "lib/Lucy/Index/PostingListWriter.pm", "lib/Lucy/Index/SegLexicon.pm", "lib/Lucy/Index/SegPostingList.pm", "lib/Lucy/Index/SegReader.pm", "lib/Lucy/Index/SegWriter.pm", "lib/Lucy/Index/Segment.pm", "lib/Lucy/Index/Similarity.pm", "lib/Lucy/Index/Snapshot.pm", "lib/Lucy/Index/SortCache.pm", "lib/Lucy/Index/SortReader.pm", "lib/Lucy/Index/SortWriter.pm", "lib/Lucy/Index/Term.pm", "lib/Lucy/Index/TermInfo.pm", "lib/Lucy/Index/TermVector.pm", "lib/Lucy/InvIndex.pm", "lib/Lucy/InvIndexer.pm", "lib/Lucy/Object/BitVector.pm", "lib/Lucy/Object/ByteBuf.pm", "lib/Lucy/Object/CharBuf.pm", "lib/Lucy/Object/Err.pm", "lib/Lucy/Object/Hash.pm", "lib/Lucy/Object/Host.pm", "lib/Lucy/Object/I32Array.pm", "lib/Lucy/Object/LockFreeRegistry.pm", "lib/Lucy/Object/Num.pm", "lib/Lucy/Object/Obj.pm", "lib/Lucy/Object/VArray.pm", "lib/Lucy/Object/VTable.pm", "lib/Lucy/Plan/Architecture.pm", "lib/Lucy/Plan/BlobType.pm", "lib/Lucy/Plan/FieldType.pm", "lib/Lucy/Plan/Float32Type.pm", "lib/Lucy/Plan/Float64Type.pm", "lib/Lucy/Plan/FullTextType.pm", "lib/Lucy/Plan/Int32Type.pm", "lib/Lucy/Plan/Int64Type.pm", "lib/Lucy/Plan/Schema.pm", "lib/Lucy/Plan/StringType.pm", "lib/Lucy/QueryParser/QueryParser.pm", "lib/Lucy/Redacted.pm", "lib/Lucy/Search/ANDMatcher.pm", "lib/Lucy/Search/ANDQuery.pm", "lib/Lucy/Search/BitVecMatcher.pm", "lib/Lucy/Search/BooleanQuery.pm", "lib/Lucy/Search/Collector.pm", "lib/Lucy/Search/Collector/BitCollector.pm", "lib/Lucy/Search/Collector/SortCollector.pm", "lib/Lucy/Search/Compiler.pm", "lib/Lucy/Search/HitQueue.pm", "lib/Lucy/Search/Hits.pm", "lib/Lucy/Search/IndexSearcher.pm", "lib/Lucy/Search/LeafQuery.pm", "lib/Lucy/Search/MatchAllQuery.pm", "lib/Lucy/Search/MatchDoc.pm", "lib/Lucy/Search/Matcher.pm", "lib/Lucy/Search/NOTMatcher.pm", "lib/Lucy/Search/NOTQuery.pm", "lib/Lucy/Search/NoMatchQuery.pm", "lib/Lucy/Search/ORQuery.pm", "lib/Lucy/Search/ORScorer.pm", "lib/Lucy/Search/PhraseQuery.pm", "lib/Lucy/Search/PolyCompiler.pm", "lib/Lucy/Search/PolyQuery.pm", "lib/Lucy/Search/PolySearcher.pm", "lib/Lucy/Search/Query.pm", "lib/Lucy/Search/QueryFilter.pm", "lib/Lucy/Search/QueryParser.pm", "lib/Lucy/Search/RangeQuery.pm", "lib/Lucy/Search/RequiredOptionalMatcher.pm", "lib/Lucy/Search/RequiredOptionalQuery.pm", "lib/Lucy/Search/SearchClient.pm", "lib/Lucy/Search/SearchServer.pm", "lib/Lucy/Search/Searcher.pm", "lib/Lucy/Search/SortRule.pm", "lib/Lucy/Search/SortSpec.pm", "lib/Lucy/Search/Span.pm", "lib/Lucy/Search/TermQuery.pm", "lib/Lucy/Search/TopDocs.pm", "lib/Lucy/Store/FSFileHandle.pm", "lib/Lucy/Store/FSFolder.pm", "lib/Lucy/Store/FileHandle.pm", "lib/Lucy/Store/Folder.pm", "lib/Lucy/Store/InStream.pm", "lib/Lucy/Store/Lock.pm", "lib/Lucy/Store/LockErr.pm", "lib/Lucy/Store/LockFactory.pm", "lib/Lucy/Store/OutStream.pm", "lib/Lucy/Store/RAMFile.pm", "lib/Lucy/Store/RAMFileHandle.pm", "lib/Lucy/Store/RAMFolder.pm", "lib/Lucy/Test.pm", "lib/Lucy/Test/Object/TestCharBuf.pm", "lib/Lucy/Test/TestUtils.pm", "lib/Lucy/Test/Util/BBSortEx.pm", "lib/Lucy/Util/BitVector.pm", "lib/Lucy/Util/Debug.pm", "lib/Lucy/Util/IndexFileNames.pm", "lib/Lucy/Util/Json.pm", "lib/Lucy/Util/MemoryPool.pm", "lib/Lucy/Util/PriorityQueue.pm", "lib/Lucy/Util/SortExternal.pm", "lib/Lucy/Util/Stepper.pm", "lib/Lucy/Util/StringHelper.pm", "lib/LucyX/Search/ProximityQuery.pm", "modules/analysis/snowstem/devel/update_snowstem.pl", "modules/analysis/snowstem/source/README", "modules/analysis/snowstem/source/include/libstemmer.h", "modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c", "modules/analysis/snowstem/source/libstemmer/modules_utf8.h", "modules/analysis/snowstem/source/runtime/api.c", "modules/analysis/snowstem/source/runtime/api.h", "modules/analysis/snowstem/source/runtime/header.h", "modules/analysis/snowstem/source/runtime/utilities.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_danish.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_danish.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_dutch.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_dutch.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_english.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_english.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_finnish.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_finnish.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_french.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_french.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_german.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_german.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_hungarian.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_hungarian.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_italian.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_italian.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_norwegian.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_norwegian.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_porter.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_porter.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_portuguese.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_portuguese.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_romanian.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_romanian.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_russian.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_russian.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_spanish.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_spanish.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_swedish.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_swedish.h", "modules/analysis/snowstem/source/src_c/stem_UTF_8_turkish.c", "modules/analysis/snowstem/source/src_c/stem_UTF_8_turkish.h", "modules/analysis/snowstem/source/test/README", "modules/analysis/snowstem/source/test/tests.json", "modules/analysis/snowstop/devel/update_snowstop.pl", "modules/analysis/snowstop/source/snowball_stoplists.c", "modules/unicode/ucd/WordBreak.tab", "modules/unicode/ucd/WordBreakTest.json", "modules/unicode/utf8proc/tests.json", "modules/unicode/utf8proc/utf8proc.c", "modules/unicode/utf8proc/utf8proc.h", "modules/unicode/utf8proc/utf8proc_data.c", "sample/FlatQueryParser.pm", "sample/PrefixQuery.pm", "sample/README.txt", "sample/indexer.pl", "sample/search.cgi", "sample/us_constitution/amend1.txt", "sample/us_constitution/amend10.txt", "sample/us_constitution/amend11.txt", "sample/us_constitution/amend12.txt", "sample/us_constitution/amend13.txt", "sample/us_constitution/amend14.txt", "sample/us_constitution/amend15.txt", "sample/us_constitution/amend16.txt", "sample/us_constitution/amend17.txt", "sample/us_constitution/amend18.txt", "sample/us_constitution/amend19.txt", "sample/us_constitution/amend2.txt", "sample/us_constitution/amend20.txt", "sample/us_constitution/amend21.txt", "sample/us_constitution/amend22.txt", "sample/us_constitution/amend23.txt", "sample/us_constitution/amend24.txt", "sample/us_constitution/amend25.txt", "sample/us_constitution/amend26.txt", "sample/us_constitution/amend27.txt", "sample/us_constitution/amend3.txt", "sample/us_constitution/amend4.txt", "sample/us_constitution/amend5.txt", "sample/us_constitution/amend6.txt", "sample/us_constitution/amend7.txt", "sample/us_constitution/amend8.txt", "sample/us_constitution/amend9.txt", "sample/us_constitution/art1sec1.txt", "sample/us_constitution/art1sec10.txt", "sample/us_constitution/art1sec2.txt", "sample/us_constitution/art1sec3.txt", "sample/us_constitution/art1sec4.txt", "sample/us_constitution/art1sec5.txt", "sample/us_constitution/art1sec6.txt", "sample/us_constitution/art1sec7.txt", "sample/us_constitution/art1sec8.txt", "sample/us_constitution/art1sec9.txt", "sample/us_constitution/art2sec1.txt", "sample/us_constitution/art2sec2.txt", "sample/us_constitution/art2sec3.txt", "sample/us_constitution/art2sec4.txt", "sample/us_constitution/art3sec1.txt", "sample/us_constitution/art3sec2.txt", "sample/us_constitution/art3sec3.txt", "sample/us_constitution/art4sec1.txt", "sample/us_constitution/art4sec2.txt", "sample/us_constitution/art4sec3.txt", "sample/us_constitution/art4sec4.txt", "sample/us_constitution/art5.txt", "sample/us_constitution/art6.txt", "sample/us_constitution/art7.txt", "sample/us_constitution/index.html", "sample/us_constitution/preamble.txt", "sample/us_constitution/uscon.css", "t/001-build_indexes.t", "t/002-lucy.t", "t/015-sort_external.t", "t/018-host.t", "t/021-vtable.t", "t/023-stepper.t", "t/025-debug.t", "t/026-serialization.t", "t/028-sortexrun.t", "t/050-ramfile.t", "t/051-fsfile.t", "t/102-strings_io.t", "t/105-folder.t", "t/106-locking.t", "t/109-read_locking.t", "t/110-shared_lock.t", "t/111-index_manager.t", "t/152-inversion.t", "t/154-regex_tokenizer.t", "t/200-doc.t", "t/201-hit_doc.t", "t/204-doc_reader.t", "t/205-seg_reader.t", "t/207-seg_lexicon.t", "t/208-terminfo.t", "t/209-seg_lexicon_heavy.t", "t/210-deldocs.t", "t/211-seg_posting_list.t", "t/213-segment_merging.t", "t/214-spec_field.t", "t/215-term_vectors.t", "t/216-schema.t", "t/217-poly_lexicon.t", "t/218-del_merging.t", "t/219-byte_buf_doc.t", "t/220-zlib_doc.t", "t/221-sort_writer.t", "t/224-lex_reader.t", "t/233-background_merger.t", "t/302-many_fields.t", "t/304-verify_utf8.t", "t/305-indexer.t", "t/306-dynamic_schema.t", "t/308-simple.t", "t/309-span.t", "t/310-heat_map.t", "t/311-hl_selection.t", "t/400-match_posting.t", "t/501-termquery.t", "t/502-phrasequery.t", "t/504-similarity.t", "t/505-hit_queue.t", "t/506-collector.t", "t/507-filter.t", "t/508-hits.t", "t/509-poly_searcher.t", "t/510-remote_search.t", "t/511-sort_spec.t", "t/513-matcher.t", "t/514-and_matcher.t", "t/515-range_query.t", "t/518-or_scorer.t", "t/519-req_opt_matcher.t", "t/520-match_doc.t", "t/523-and_query.t", "t/524-poly_query.t", "t/525-match_all_query.t", "t/526-not_query.t", "t/527-req_opt_query.t", "t/528-leaf_query.t", "t/529-no_match_query.t", "t/532-sort_collector.t", "t/550-cluster_searcher.t", "t/601-queryparser.t", "t/602-boosts.t", "t/603-query_boosts.t", "t/604-simple_search.t", "t/605-store_pos_boost.t", "t/607-queryparser_multi_field.t", "t/610-queryparser_logic.t", "t/611-queryparser_syntax.t", "t/613-proximityquery.t", "t/701-uscon.t", "t/999-remove_indexes.t", "t/binding/016-varray.t", "t/binding/017-hash.t", "t/binding/019-obj.t", "t/binding/022-bytebuf.t", "t/binding/029-charbuf.t", "t/binding/034-err.t", "t/binding/101-simple_io.t", "t/binding/150-polyanalyzer.t", "t/binding/151-analyzer.t", "t/binding/153-case_folder.t", "t/binding/155-snowball_stop_filter.t", "t/binding/156-snowball_stemmer.t", "t/binding/157-normalizer.t", "t/binding/158-standard_tokenizer.t", "t/binding/159-easyanalyzer.t", "t/binding/206-snapshot.t", "t/binding/303-highlighter.t", "t/binding/506-collector.t", "t/binding/702-sample.t", "t/binding/800-stack.t", "t/charmonizer/001-integers.t", "t/charmonizer/002-func_macro.t", "t/charmonizer/003-headers.t", "t/charmonizer/004-large_files.t", "t/charmonizer/005-unused_vars.t", "t/charmonizer/006-variadic_macros.t", "t/charmonizer/007-dirmanip.t", "t/core/012-priority_queue.t", "t/core/013-bit_vector.t", "t/core/016-varray.t", "t/core/017-hash.t", "t/core/019-obj.t", "t/core/022-bytebuf.t", "t/core/024-memory_pool.t", "t/core/029-charbuf.t", "t/core/030-number_utils.t", "t/core/031-num.t", "t/core/032-string_helper.t", "t/core/033-index_file_names.t", "t/core/035-json.t", "t/core/036-i32_array.t", "t/core/037-atomic.t", "t/core/039-memory.t", "t/core/050-ram_file_handle.t", "t/core/051-fs_file_handle.t", "t/core/052-instream.t", "t/core/053-file_handle.t", "t/core/054-io_primitives.t", "t/core/055-io_chunks.t", "t/core/061-ram_dir_handle.t", "t/core/062-fs_dir_handle.t", "t/core/103-fs_folder.t", "t/core/104-ram_folder.t", "t/core/105-folder.t", "t/core/111-index_manager.t", "t/core/112-cf_writer.t", "t/core/113-cf_reader.t", "t/core/150-analyzer.t", "t/core/150-polyanalyzer.t", "t/core/153-case_folder.t", "t/core/154-regex_tokenizer.t", "t/core/155-snowball_stop_filter.t", "t/core/156-snowball_stemmer.t", "t/core/157-normalizer.t", "t/core/158-standard_tokenizer.t", "t/core/206-snapshot.t", "t/core/216-schema.t", "t/core/220-doc_writer.t", "t/core/221-highlight_writer.t", "t/core/222-posting_list_writer.t", "t/core/223-seg_writer.t", "t/core/225-polyreader.t", "t/core/230-full_text_type.t", "t/core/231-blob_type.t", "t/core/232-numeric_type.t", "t/core/234-field_type.t", "t/core/301-segment.t", "t/core/303-highlighter.t", "t/core/501-termquery.t", "t/core/502-phrasequery.t", "t/core/515-range_query.t", "t/core/523-and_query.t", "t/core/525-match_all_query.t", "t/core/526-not_query.t", "t/core/527-req_opt_query.t", "t/core/528-leaf_query.t", "t/core/529-no_match_query.t", "t/core/530-series_matcher.t", "t/core/531-or_query.t", "xs/Lucy/Analysis/CaseFolder.c", "xs/Lucy/Analysis/RegexTokenizer.c", "xs/Lucy/Document/Doc.c", "xs/Lucy/Index/DocReader.c", "xs/Lucy/Index/Inverter.c", "xs/Lucy/Index/PolyReader.c", "xs/Lucy/Index/SegReader.c", "xs/Lucy/Object/Err.c", "xs/Lucy/Object/Host.c", "xs/Lucy/Object/LockFreeRegistry.c", "xs/Lucy/Object/Obj.c", "xs/Lucy/Object/VTable.c", "xs/Lucy/Store/FSFolder.c", "xs/XSBind.c", "xs/XSBind.h" ] }, "prereqs" : { "build" : { "requires" : { "Devel::PPPort" : "3.13", "ExtUtils::CBuilder" : "0.21", "ExtUtils::ParseXS" : "2.18", "Module::Build" : "0.280801" } }, "configure" : { "requires" : { "Module::Build" : "0.280801" } }, "runtime" : { "requires" : { "perl" : "v5.8.3" } } }, "provides" : { "Lucy" : { "file" : "lib/Lucy.pm", "version" : "0.003003" }, "Lucy::Analysis::Analyzer" : { "file" : "lib/Lucy/Analysis/Analyzer.pm", "version" : "0.003003" }, "Lucy::Analysis::CaseFolder" : { "file" : "lib/Lucy/Analysis/CaseFolder.pm", "version" : "0.003003" }, "Lucy::Analysis::EasyAnalyzer" : { "file" : "lib/Lucy/Analysis/EasyAnalyzer.pm", "version" : "0.003003" }, "Lucy::Analysis::Inversion" : { "file" : "lib/Lucy/Analysis/Inversion.pm", "version" : "0.003003" }, "Lucy::Analysis::Normalizer" : { "file" : "lib/Lucy/Analysis/Normalizer.pm", "version" : "0.003003" }, "Lucy::Analysis::PolyAnalyzer" : { "file" : "lib/Lucy/Analysis/PolyAnalyzer.pm", "version" : "0.003003" }, "Lucy::Analysis::RegexTokenizer" : { "file" : "lib/Lucy/Analysis/RegexTokenizer.pm", "version" : "0.003003" }, "Lucy::Analysis::SnowballStemmer" : { "file" : "lib/Lucy/Analysis/SnowballStemmer.pm", "version" : "0.003003" }, "Lucy::Analysis::SnowballStopFilter" : { "file" : "lib/Lucy/Analysis/SnowballStopFilter.pm", "version" : "0.003003" }, "Lucy::Analysis::StandardTokenizer" : { "file" : "lib/Lucy/Analysis/StandardTokenizer.pm", "version" : "0.003003" }, "Lucy::Analysis::Token" : { "file" : "lib/Lucy/Analysis/Token.pm", "version" : "0.003003" }, "Lucy::Document::Doc" : { "file" : "lib/Lucy/Document/Doc.pm", "version" : "0.003003" }, "Lucy::Document::HitDoc" : { "file" : "lib/Lucy/Document/HitDoc.pm", "version" : "0.003003" }, "Lucy::Highlight::HeatMap" : { "file" : "lib/Lucy/Highlight/HeatMap.pm", "version" : "0.003003" }, "Lucy::Highlight::Highlighter" : { "file" : "lib/Lucy/Highlight/Highlighter.pm", "version" : "0.003003" }, "Lucy::Index::BackgroundMerger" : { "file" : "lib/Lucy/Index/BackgroundMerger.pm", "version" : "0.003003" }, "Lucy::Index::DataReader" : { "file" : "lib/Lucy/Index/DataReader.pm", "version" : "0.003003" }, "Lucy::Index::DataWriter" : { "file" : "lib/Lucy/Index/DataWriter.pm", "version" : "0.003003" }, "Lucy::Index::DeletionsReader" : { "file" : "lib/Lucy/Index/DeletionsReader.pm", "version" : "0.003003" }, "Lucy::Index::DeletionsWriter" : { "file" : "lib/Lucy/Index/DeletionsWriter.pm", "version" : "0.003003" }, "Lucy::Index::DocReader" : { "file" : "lib/Lucy/Index/DocReader.pm", "version" : "0.003003" }, "Lucy::Index::DocVector" : { "file" : "lib/Lucy/Index/DocVector.pm", "version" : "0.003003" }, "Lucy::Index::DocWriter" : { "file" : "lib/Lucy/Index/DocWriter.pm", "version" : "0.003003" }, "Lucy::Index::FilePurger" : { "file" : "lib/Lucy/Index/FilePurger.pm", "version" : "0.003003" }, "Lucy::Index::HighlightReader" : { "file" : "lib/Lucy/Index/HighlightReader.pm", "version" : "0.003003" }, "Lucy::Index::HighlightWriter" : { "file" : "lib/Lucy/Index/HighlightWriter.pm", "version" : "0.003003" }, "Lucy::Index::IndexManager" : { "file" : "lib/Lucy/Index/IndexManager.pm", "version" : "0.003003" }, "Lucy::Index::IndexReader" : { "file" : "lib/Lucy/Index/IndexReader.pm", "version" : "0.003003" }, "Lucy::Index::Indexer" : { "file" : "lib/Lucy/Index/Indexer.pm", "version" : "0.003003" }, "Lucy::Index::Inverter" : { "file" : "lib/Lucy/Index/Inverter.pm", "version" : "0.003003" }, "Lucy::Index::Lexicon" : { "file" : "lib/Lucy/Index/Lexicon.pm", "version" : "0.003003" }, "Lucy::Index::LexiconReader" : { "file" : "lib/Lucy/Index/LexiconReader.pm", "version" : "0.003003" }, "Lucy::Index::LexiconWriter" : { "file" : "lib/Lucy/Index/LexiconWriter.pm", "version" : "0.003003" }, "Lucy::Index::PolyLexicon" : { "file" : "lib/Lucy/Index/PolyLexicon.pm", "version" : "0.003003" }, "Lucy::Index::PolyReader" : { "file" : "lib/Lucy/Index/PolyReader.pm", "version" : "0.003003" }, "Lucy::Index::Posting" : { "file" : "lib/Lucy/Index/Posting.pm", "version" : "0.003003" }, "Lucy::Index::Posting::MatchPosting" : { "file" : "lib/Lucy/Index/Posting/MatchPosting.pm", "version" : "0.003003" }, "Lucy::Index::Posting::RichPosting" : { "file" : "lib/Lucy/Index/Posting/RichPosting.pm", "version" : "0.003003" }, "Lucy::Index::Posting::ScorePosting" : { "file" : "lib/Lucy/Index/Posting/ScorePosting.pm", "version" : "0.003003" }, "Lucy::Index::PostingList" : { "file" : "lib/Lucy/Index/PostingList.pm", "version" : "0.003003" }, "Lucy::Index::PostingListReader" : { "file" : "lib/Lucy/Index/PostingListReader.pm", "version" : "0.003003" }, "Lucy::Index::PostingListWriter" : { "file" : "lib/Lucy/Index/PostingListWriter.pm", "version" : "0.003003" }, "Lucy::Index::SegLexicon" : { "file" : "lib/Lucy/Index/SegLexicon.pm", "version" : "0.003003" }, "Lucy::Index::SegPostingList" : { "file" : "lib/Lucy/Index/SegPostingList.pm", "version" : "0.003003" }, "Lucy::Index::SegReader" : { "file" : "lib/Lucy/Index/SegReader.pm", "version" : "0.003003" }, "Lucy::Index::SegWriter" : { "file" : "lib/Lucy/Index/SegWriter.pm", "version" : "0.003003" }, "Lucy::Index::Segment" : { "file" : "lib/Lucy/Index/Segment.pm", "version" : "0.003003" }, "Lucy::Index::Similarity" : { "file" : "lib/Lucy/Index/Similarity.pm", "version" : "0.003003" }, "Lucy::Index::Snapshot" : { "file" : "lib/Lucy/Index/Snapshot.pm", "version" : "0.003003" }, "Lucy::Index::SortCache" : { "file" : "lib/Lucy/Index/SortCache.pm", "version" : "0.003003" }, "Lucy::Index::SortReader" : { "file" : "lib/Lucy/Index/SortReader.pm", "version" : "0.003003" }, "Lucy::Index::SortWriter" : { "file" : "lib/Lucy/Index/SortWriter.pm", "version" : "0.003003" }, "Lucy::Index::TermInfo" : { "file" : "lib/Lucy/Index/TermInfo.pm", "version" : "0.003003" }, "Lucy::Index::TermVector" : { "file" : "lib/Lucy/Index/TermVector.pm", "version" : "0.003003" }, "Lucy::Object::BitVector" : { "file" : "lib/Lucy/Object/BitVector.pm", "version" : "0.003003" }, "Lucy::Object::ByteBuf" : { "file" : "lib/Lucy/Object/ByteBuf.pm", "version" : "0.003003" }, "Lucy::Object::CharBuf" : { "file" : "lib/Lucy/Object/CharBuf.pm", "version" : "0.003003" }, "Lucy::Object::Err" : { "file" : "lib/Lucy/Object/Err.pm", "version" : "0.003003" }, "Lucy::Object::Hash" : { "file" : "lib/Lucy/Object/Hash.pm", "version" : "0.003003" }, "Lucy::Object::Host" : { "file" : "lib/Lucy/Object/Host.pm", "version" : "0.003003" }, "Lucy::Object::I32Array" : { "file" : "lib/Lucy/Object/I32Array.pm", "version" : "0.003003" }, "Lucy::Object::LockFreeRegistry" : { "file" : "lib/Lucy/Object/LockFreeRegistry.pm", "version" : "0.003003" }, "Lucy::Object::Num" : { "file" : "lib/Lucy/Object/Num.pm", "version" : "0.003003" }, "Lucy::Object::Obj" : { "file" : "lib/Lucy/Object/Obj.pm", "version" : "0.003003" }, "Lucy::Object::VArray" : { "file" : "lib/Lucy/Object/VArray.pm", "version" : "0.003003" }, "Lucy::Object::VTable" : { "file" : "lib/Lucy/Object/VTable.pm", "version" : "0.003003" }, "Lucy::Object::ViewByteBuf" : { "file" : "lib/Lucy.pm", "version" : "0.003003" }, "Lucy::Object::ViewCharBuf" : { "file" : "lib/Lucy.pm", "version" : "0.003003" }, "Lucy::Object::ZombieCharBuf" : { "file" : "lib/Lucy.pm", "version" : "0.003003" }, "Lucy::Plan::Architecture" : { "file" : "lib/Lucy/Plan/Architecture.pm", "version" : "0.003003" }, "Lucy::Plan::BlobType" : { "file" : "lib/Lucy/Plan/BlobType.pm", "version" : "0.003003" }, "Lucy::Plan::FieldType" : { "file" : "lib/Lucy/Plan/FieldType.pm", "version" : "0.003003" }, "Lucy::Plan::Float32Type" : { "file" : "lib/Lucy/Plan/Float32Type.pm", "version" : "0.003003" }, "Lucy::Plan::Float64Type" : { "file" : "lib/Lucy/Plan/Float64Type.pm", "version" : "0.003003" }, "Lucy::Plan::FullTextType" : { "file" : "lib/Lucy/Plan/FullTextType.pm", "version" : "0.003003" }, "Lucy::Plan::Int32Type" : { "file" : "lib/Lucy/Plan/Int32Type.pm", "version" : "0.003003" }, "Lucy::Plan::Int64Type" : { "file" : "lib/Lucy/Plan/Int64Type.pm", "version" : "0.003003" }, "Lucy::Plan::Schema" : { "file" : "lib/Lucy/Plan/Schema.pm", "version" : "0.003003" }, "Lucy::Plan::StringType" : { "file" : "lib/Lucy/Plan/StringType.pm", "version" : "0.003003" }, "Lucy::Search::ANDMatcher" : { "file" : "lib/Lucy/Search/ANDMatcher.pm", "version" : "0.003003" }, "Lucy::Search::ANDQuery" : { "file" : "lib/Lucy/Search/ANDQuery.pm", "version" : "0.003003" }, "Lucy::Search::BitVecMatcher" : { "file" : "lib/Lucy/Search/BitVecMatcher.pm", "version" : "0.003003" }, "Lucy::Search::Collector" : { "file" : "lib/Lucy/Search/Collector.pm", "version" : "0.003003" }, "Lucy::Search::Collector::BitCollector" : { "file" : "lib/Lucy/Search/Collector/BitCollector.pm", "version" : "0.003003" }, "Lucy::Search::Collector::SortCollector" : { "file" : "lib/Lucy/Search/Collector/SortCollector.pm", "version" : "0.003003" }, "Lucy::Search::Compiler" : { "file" : "lib/Lucy/Search/Compiler.pm", "version" : "0.003003" }, "Lucy::Search::HitQueue" : { "file" : "lib/Lucy/Search/HitQueue.pm", "version" : "0.003003" }, "Lucy::Search::Hits" : { "file" : "lib/Lucy/Search/Hits.pm", "version" : "0.003003" }, "Lucy::Search::IndexSearcher" : { "file" : "lib/Lucy/Search/IndexSearcher.pm", "version" : "0.003003" }, "Lucy::Search::LeafQuery" : { "file" : "lib/Lucy/Search/LeafQuery.pm", "version" : "0.003003" }, "Lucy::Search::MatchAllQuery" : { "file" : "lib/Lucy/Search/MatchAllQuery.pm", "version" : "0.003003" }, "Lucy::Search::MatchDoc" : { "file" : "lib/Lucy/Search/MatchDoc.pm", "version" : "0.003003" }, "Lucy::Search::Matcher" : { "file" : "lib/Lucy/Search/Matcher.pm", "version" : "0.003003" }, "Lucy::Search::NOTMatcher" : { "file" : "lib/Lucy/Search/NOTMatcher.pm", "version" : "0.003003" }, "Lucy::Search::NOTQuery" : { "file" : "lib/Lucy/Search/NOTQuery.pm", "version" : "0.003003" }, "Lucy::Search::NoMatchQuery" : { "file" : "lib/Lucy/Search/NoMatchQuery.pm", "version" : "0.003003" }, "Lucy::Search::ORQuery" : { "file" : "lib/Lucy/Search/ORQuery.pm", "version" : "0.003003" }, "Lucy::Search::ORScorer" : { "file" : "lib/Lucy/Search/ORScorer.pm", "version" : "0.003003" }, "Lucy::Search::PhraseQuery" : { "file" : "lib/Lucy/Search/PhraseQuery.pm", "version" : "0.003003" }, "Lucy::Search::PolyCompiler" : { "file" : "lib/Lucy/Search/PolyCompiler.pm", "version" : "0.003003" }, "Lucy::Search::PolyQuery" : { "file" : "lib/Lucy/Search/PolyQuery.pm", "version" : "0.003003" }, "Lucy::Search::PolySearcher" : { "file" : "lib/Lucy/Search/PolySearcher.pm", "version" : "0.003003" }, "Lucy::Search::Query" : { "file" : "lib/Lucy/Search/Query.pm", "version" : "0.003003" }, "Lucy::Search::QueryParser" : { "file" : "lib/Lucy/Search/QueryParser.pm", "version" : "0.003003" }, "Lucy::Search::RangeQuery" : { "file" : "lib/Lucy/Search/RangeQuery.pm", "version" : "0.003003" }, "Lucy::Search::RequiredOptionalMatcher" : { "file" : "lib/Lucy/Search/RequiredOptionalMatcher.pm", "version" : "0.003003" }, "Lucy::Search::RequiredOptionalQuery" : { "file" : "lib/Lucy/Search/RequiredOptionalQuery.pm", "version" : "0.003003" }, "Lucy::Search::Searcher" : { "file" : "lib/Lucy/Search/Searcher.pm", "version" : "0.003003" }, "Lucy::Search::SortRule" : { "file" : "lib/Lucy/Search/SortRule.pm", "version" : "0.003003" }, "Lucy::Search::SortSpec" : { "file" : "lib/Lucy/Search/SortSpec.pm", "version" : "0.003003" }, "Lucy::Search::Span" : { "file" : "lib/Lucy/Search/Span.pm", "version" : "0.003003" }, "Lucy::Search::TermQuery" : { "file" : "lib/Lucy/Search/TermQuery.pm", "version" : "0.003003" }, "Lucy::Search::TopDocs" : { "file" : "lib/Lucy/Search/TopDocs.pm", "version" : "0.003003" }, "Lucy::Simple" : { "file" : "lib/Lucy/Simple.pm", "version" : "0.003003" }, "Lucy::Store::FSFileHandle" : { "file" : "lib/Lucy/Store/FSFileHandle.pm", "version" : "0.003003" }, "Lucy::Store::FSFolder" : { "file" : "lib/Lucy/Store/FSFolder.pm", "version" : "0.003003" }, "Lucy::Store::FileHandle" : { "file" : "lib/Lucy/Store/FileHandle.pm", "version" : "0.003003" }, "Lucy::Store::Folder" : { "file" : "lib/Lucy/Store/Folder.pm", "version" : "0.003003" }, "Lucy::Store::InStream" : { "file" : "lib/Lucy/Store/InStream.pm", "version" : "0.003003" }, "Lucy::Store::Lock" : { "file" : "lib/Lucy/Store/Lock.pm", "version" : "0.003003" }, "Lucy::Store::LockErr" : { "file" : "lib/Lucy/Store/LockErr.pm", "version" : "0.003003" }, "Lucy::Store::LockFactory" : { "file" : "lib/Lucy/Store/LockFactory.pm", "version" : "0.003003" }, "Lucy::Store::OutStream" : { "file" : "lib/Lucy/Store/OutStream.pm", "version" : "0.003003" }, "Lucy::Store::RAMFile" : { "file" : "lib/Lucy/Store/RAMFile.pm", "version" : "0.003003" }, "Lucy::Store::RAMFileHandle" : { "file" : "lib/Lucy/Store/RAMFileHandle.pm", "version" : "0.003003" }, "Lucy::Store::RAMFolder" : { "file" : "lib/Lucy/Store/RAMFolder.pm", "version" : "0.003003" }, "Lucy::Test" : { "file" : "lib/Lucy/Test.pm", "version" : "0.003003" }, "Lucy::Test::TestCharmonizer" : { "file" : "lib/Lucy/Test.pm", "version" : "0.003003" }, "Lucy::Test::Util::BBSortEx" : { "file" : "lib/Lucy/Test/Util/BBSortEx.pm", "version" : "0.003003" }, "Lucy::Util::Debug" : { "file" : "lib/Lucy/Util/Debug.pm", "version" : "0.003003" }, "Lucy::Util::IndexFileNames" : { "file" : "lib/Lucy/Util/IndexFileNames.pm", "version" : "0.003003" }, "Lucy::Util::Json" : { "file" : "lib/Lucy/Util/Json.pm", "version" : "0.003003" }, "Lucy::Util::MemoryPool" : { "file" : "lib/Lucy/Util/MemoryPool.pm", "version" : "0.003003" }, "Lucy::Util::PriorityQueue" : { "file" : "lib/Lucy/Util/PriorityQueue.pm", "version" : "0.003003" }, "Lucy::Util::SortExternal" : { "file" : "lib/Lucy/Util/SortExternal.pm", "version" : "0.003003" }, "Lucy::Util::Stepper" : { "file" : "lib/Lucy/Util/Stepper.pm", "version" : "0.003003" }, "Lucy::Util::StringHelper" : { "file" : "lib/Lucy/Util/StringHelper.pm", "version" : "0.003003" }, "LucyX::Index::ByteBufDocReader" : { "file" : "lib/LucyX/Index/ByteBufDocReader.pm", "version" : "0.003003" }, "LucyX::Index::ByteBufDocWriter" : { "file" : "lib/LucyX/Index/ByteBufDocWriter.pm", "version" : "0.003003" }, "LucyX::Index::LongFieldSim" : { "file" : "lib/LucyX/Index/LongFieldSim.pm", "version" : "0.003003" }, "LucyX::Index::ZlibDocReader" : { "file" : "lib/LucyX/Index/ZlibDocReader.pm", "version" : "0.003003" }, "LucyX::Index::ZlibDocWriter" : { "file" : "lib/LucyX/Index/ZlibDocWriter.pm", "version" : "0.003003" }, "LucyX::Remote::ClusterSearcher" : { "file" : "lib/LucyX/Remote/ClusterSearcher.pm", "version" : "0.003003" }, "LucyX::Remote::SearchClient" : { "file" : "lib/LucyX/Remote/SearchClient.pm", "version" : "0.003003" }, "LucyX::Remote::SearchServer" : { "file" : "lib/LucyX/Remote/SearchServer.pm", "version" : "0.003003" }, "LucyX::Search::Filter" : { "file" : "lib/LucyX/Search/Filter.pm", "version" : "0.003003" }, "LucyX::Search::FilterCompiler" : { "file" : "lib/LucyX/Search/Filter.pm", "version" : "0.003003" }, "LucyX::Search::FilterMatcher" : { "file" : "lib/LucyX/Search/Filter.pm", "version" : "0.003003" }, "LucyX::Search::MockMatcher" : { "file" : "lib/LucyX/Search/MockMatcher.pm", "version" : "0.003003" }, "LucyX::Search::ProximityQuery" : { "file" : "lib/LucyX/Search/ProximityQuery.pm", "version" : "0.003003" } }, "release_status" : "stable", "resources" : { "license" : [ "http://apache.org/licenses/LICENSE-2.0" ] }, "version" : "v0.3.3" } liblucy-perl-0.3.3/META.yml000066400000000000000000001570301233767526200154140ustar00rootroot00000000000000--- abstract: 'Apache Lucy search engine library.' author: - 'The Apache Lucy Project ' build_requires: Devel::PPPort: 3.13 ExtUtils::CBuilder: 0.21 ExtUtils::ParseXS: 2.18 Module::Build: 0.280801 configure_requires: Module::Build: 0.280801 dynamic_config: 1 generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921' keywords: - search - lucy - lucene license: apache meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Lucy no_index: file: - Build.PL - CHANGES - CONTRIBUTING - INSTALL - LICENSE - 'MANIFEST This list of files' - NOTICE - buildlib/Lucy/Build.pm - buildlib/Lucy/Redacted.pm - buildlib/Lucy/Test/TestUtils.pm - charmonizer/Makefile - charmonizer/Makefile.MSVC - charmonizer/Makefile.MinGW - charmonizer/README - charmonizer/charmonize.c - charmonizer/src/Charmonizer/Core/Compiler.c - charmonizer/src/Charmonizer/Core/Compiler.h - charmonizer/src/Charmonizer/Core/ConfWriter.c - charmonizer/src/Charmonizer/Core/ConfWriter.h - charmonizer/src/Charmonizer/Core/Defines.h - charmonizer/src/Charmonizer/Core/HeaderChecker.c - charmonizer/src/Charmonizer/Core/HeaderChecker.h - charmonizer/src/Charmonizer/Core/OperatingSystem.c - charmonizer/src/Charmonizer/Core/OperatingSystem.h - charmonizer/src/Charmonizer/Core/Util.c - charmonizer/src/Charmonizer/Core/Util.h - charmonizer/src/Charmonizer/Probe.c - charmonizer/src/Charmonizer/Probe.h - charmonizer/src/Charmonizer/Probe/AtomicOps.c - charmonizer/src/Charmonizer/Probe/AtomicOps.h - charmonizer/src/Charmonizer/Probe/DirManip.c - charmonizer/src/Charmonizer/Probe/DirManip.h - charmonizer/src/Charmonizer/Probe/Floats.c - charmonizer/src/Charmonizer/Probe/Floats.h - charmonizer/src/Charmonizer/Probe/FuncMacro.c - charmonizer/src/Charmonizer/Probe/FuncMacro.h - charmonizer/src/Charmonizer/Probe/Headers.c - charmonizer/src/Charmonizer/Probe/Headers.h - charmonizer/src/Charmonizer/Probe/Integers.c - charmonizer/src/Charmonizer/Probe/Integers.h - charmonizer/src/Charmonizer/Probe/LargeFiles.c - charmonizer/src/Charmonizer/Probe/LargeFiles.h - charmonizer/src/Charmonizer/Probe/Memory.c - charmonizer/src/Charmonizer/Probe/Memory.h - charmonizer/src/Charmonizer/Probe/UnusedVars.c - charmonizer/src/Charmonizer/Probe/UnusedVars.h - charmonizer/src/Charmonizer/Probe/VariadicMacros.c - charmonizer/src/Charmonizer/Probe/VariadicMacros.h - charmonizer/src/Charmonizer/Test.c - charmonizer/src/Charmonizer/Test.h - charmonizer/src/Charmonizer/Test/TestDirManip.c - charmonizer/src/Charmonizer/Test/TestFuncMacro.c - charmonizer/src/Charmonizer/Test/TestHeaders.c - charmonizer/src/Charmonizer/Test/TestIntegers.c - charmonizer/src/Charmonizer/Test/TestLargeFiles.c - charmonizer/src/Charmonizer/Test/TestUnusedVars.c - charmonizer/src/Charmonizer/Test/TestVariadicMacros.c - clownfish/include/CFC.h - clownfish/perl/Build.PL - clownfish/perl/MANIFEST - clownfish/perl/buildlib/Clownfish/CFC/Build.pm - clownfish/perl/lib/Clownfish.pod - clownfish/perl/lib/Clownfish/CFC.pm - clownfish/perl/lib/Clownfish/CFC.xs - clownfish/perl/lib/Clownfish/CFC/Base.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Core.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Core/Aliases.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Core/Class.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Core/File.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Core/Function.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Core/Method.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Class.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Constructor.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Method.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Perl/Subroutine.pm - clownfish/perl/lib/Clownfish/CFC/Binding/Perl/TypeMap.pm - clownfish/perl/lib/Clownfish/CFC/CBlock.pm - clownfish/perl/lib/Clownfish/CFC/Class.pm - clownfish/perl/lib/Clownfish/CFC/DocuComment.pm - clownfish/perl/lib/Clownfish/CFC/Dumpable.pm - clownfish/perl/lib/Clownfish/CFC/File.pm - clownfish/perl/lib/Clownfish/CFC/Function.pm - clownfish/perl/lib/Clownfish/CFC/Hierarchy.pm - clownfish/perl/lib/Clownfish/CFC/Method.pm - clownfish/perl/lib/Clownfish/CFC/ParamList.pm - clownfish/perl/lib/Clownfish/CFC/Parcel.pm - clownfish/perl/lib/Clownfish/CFC/Parser.pm - clownfish/perl/lib/Clownfish/CFC/Symbol.pm - clownfish/perl/lib/Clownfish/CFC/Type.pm - clownfish/perl/lib/Clownfish/CFC/Util.pm - clownfish/perl/lib/Clownfish/CFC/Variable.pm - clownfish/perl/t/000-load.t - clownfish/perl/t/001-util.t - clownfish/perl/t/050-docucomment.t - clownfish/perl/t/051-symbol.t - clownfish/perl/t/100-type.t - clownfish/perl/t/101-primitive_type.t - clownfish/perl/t/102-integer_type.t - clownfish/perl/t/103-float_type.t - clownfish/perl/t/104-void_type.t - clownfish/perl/t/105-object_type.t - clownfish/perl/t/106-va_list_type.t - clownfish/perl/t/107-arbitrary_type.t - clownfish/perl/t/108-composite_type.t - clownfish/perl/t/200-function.t - clownfish/perl/t/201-method.t - clownfish/perl/t/202-overridden_method.t - clownfish/perl/t/203-final_method.t - clownfish/perl/t/300-variable.t - clownfish/perl/t/301-param_list.t - clownfish/perl/t/400-class.t - clownfish/perl/t/401-c_block.t - clownfish/perl/t/402-parcel.t - clownfish/perl/t/403-file.t - clownfish/perl/t/500-hierarchy.t - clownfish/perl/t/600-parser.t - clownfish/perl/t/cfsource/Animal.cfh - clownfish/perl/t/cfsource/Animal/Dog.cfh - clownfish/perl/t/cfsource/Animal/Util.cfh - clownfish/perl/typemap - clownfish/ruby/Rakefile - clownfish/src/CFCBase.c - clownfish/src/CFCBase.h - clownfish/src/CFCBindAliases.c - clownfish/src/CFCBindAliases.h - clownfish/src/CFCBindClass.c - clownfish/src/CFCBindClass.h - clownfish/src/CFCBindCore.c - clownfish/src/CFCBindCore.h - clownfish/src/CFCBindFile.c - clownfish/src/CFCBindFile.h - clownfish/src/CFCBindFunction.c - clownfish/src/CFCBindFunction.h - clownfish/src/CFCBindMethod.c - clownfish/src/CFCBindMethod.h - clownfish/src/CFCCBlock.c - clownfish/src/CFCCBlock.h - clownfish/src/CFCClass.c - clownfish/src/CFCClass.h - clownfish/src/CFCDocuComment.c - clownfish/src/CFCDocuComment.h - clownfish/src/CFCDumpable.c - clownfish/src/CFCDumpable.h - clownfish/src/CFCFile.c - clownfish/src/CFCFile.h - clownfish/src/CFCFunction.c - clownfish/src/CFCFunction.h - clownfish/src/CFCHierarchy.c - clownfish/src/CFCHierarchy.h - clownfish/src/CFCLexHeader.c - clownfish/src/CFCLexHeader.h - clownfish/src/CFCLexHeader.l - clownfish/src/CFCMemPool.c - clownfish/src/CFCMemPool.h - clownfish/src/CFCMethod.c - clownfish/src/CFCMethod.h - clownfish/src/CFCParamList.c - clownfish/src/CFCParamList.h - clownfish/src/CFCParcel.c - clownfish/src/CFCParcel.h - clownfish/src/CFCParseHeader.y - clownfish/src/CFCParser.c - clownfish/src/CFCParser.h - clownfish/src/CFCSymbol.c - clownfish/src/CFCSymbol.h - clownfish/src/CFCType.c - clownfish/src/CFCType.h - clownfish/src/CFCUtil.c - clownfish/src/CFCUtil.h - clownfish/src/CFCVariable.c - clownfish/src/CFCVariable.h - core/Lucy/Analysis/Analyzer.c - core/Lucy/Analysis/Analyzer.cfh - core/Lucy/Analysis/CaseFolder.c - core/Lucy/Analysis/CaseFolder.cfh - core/Lucy/Analysis/EasyAnalyzer.c - core/Lucy/Analysis/EasyAnalyzer.cfh - core/Lucy/Analysis/Inversion.c - core/Lucy/Analysis/Inversion.cfh - core/Lucy/Analysis/Normalizer.c - core/Lucy/Analysis/Normalizer.cfh - core/Lucy/Analysis/PolyAnalyzer.c - core/Lucy/Analysis/PolyAnalyzer.cfh - core/Lucy/Analysis/RegexTokenizer.c - core/Lucy/Analysis/RegexTokenizer.cfh - core/Lucy/Analysis/SnowballStemmer.c - core/Lucy/Analysis/SnowballStemmer.cfh - core/Lucy/Analysis/SnowballStopFilter.c - core/Lucy/Analysis/SnowballStopFilter.cfh - core/Lucy/Analysis/StandardTokenizer.c - core/Lucy/Analysis/StandardTokenizer.cfh - core/Lucy/Analysis/Token.c - core/Lucy/Analysis/Token.cfh - core/Lucy/Docs/DevGuide.cfh - core/Lucy/Docs/FileLocking.cfh - core/Lucy/Document/Doc.c - core/Lucy/Document/Doc.cfh - core/Lucy/Document/HitDoc.c - core/Lucy/Document/HitDoc.cfh - core/Lucy/Highlight/HeatMap.c - core/Lucy/Highlight/HeatMap.cfh - core/Lucy/Highlight/Highlighter.c - core/Lucy/Highlight/Highlighter.cfh - core/Lucy/Index/BackgroundMerger.c - core/Lucy/Index/BackgroundMerger.cfh - core/Lucy/Index/BitVecDelDocs.c - core/Lucy/Index/BitVecDelDocs.cfh - core/Lucy/Index/DataReader.c - core/Lucy/Index/DataReader.cfh - core/Lucy/Index/DataWriter.c - core/Lucy/Index/DataWriter.cfh - core/Lucy/Index/DeletionsReader.c - core/Lucy/Index/DeletionsReader.cfh - core/Lucy/Index/DeletionsWriter.c - core/Lucy/Index/DeletionsWriter.cfh - core/Lucy/Index/DocReader.c - core/Lucy/Index/DocReader.cfh - core/Lucy/Index/DocVector.c - core/Lucy/Index/DocVector.cfh - core/Lucy/Index/DocWriter.c - core/Lucy/Index/DocWriter.cfh - core/Lucy/Index/FilePurger.c - core/Lucy/Index/FilePurger.cfh - core/Lucy/Index/HighlightReader.c - core/Lucy/Index/HighlightReader.cfh - core/Lucy/Index/HighlightWriter.c - core/Lucy/Index/HighlightWriter.cfh - core/Lucy/Index/IndexManager.c - core/Lucy/Index/IndexManager.cfh - core/Lucy/Index/IndexReader.c - core/Lucy/Index/IndexReader.cfh - core/Lucy/Index/Indexer.c - core/Lucy/Index/Indexer.cfh - core/Lucy/Index/Inverter.c - core/Lucy/Index/Inverter.cfh - core/Lucy/Index/LexIndex.c - core/Lucy/Index/LexIndex.cfh - core/Lucy/Index/Lexicon.c - core/Lucy/Index/Lexicon.cfh - core/Lucy/Index/LexiconReader.c - core/Lucy/Index/LexiconReader.cfh - core/Lucy/Index/LexiconWriter.c - core/Lucy/Index/LexiconWriter.cfh - core/Lucy/Index/PolyLexicon.c - core/Lucy/Index/PolyLexicon.cfh - core/Lucy/Index/PolyReader.c - core/Lucy/Index/PolyReader.cfh - core/Lucy/Index/Posting.c - core/Lucy/Index/Posting.cfh - core/Lucy/Index/Posting/MatchPosting.c - core/Lucy/Index/Posting/MatchPosting.cfh - core/Lucy/Index/Posting/RawPosting.c - core/Lucy/Index/Posting/RawPosting.cfh - core/Lucy/Index/Posting/RichPosting.c - core/Lucy/Index/Posting/RichPosting.cfh - core/Lucy/Index/Posting/ScorePosting.c - core/Lucy/Index/Posting/ScorePosting.cfh - core/Lucy/Index/PostingList.c - core/Lucy/Index/PostingList.cfh - core/Lucy/Index/PostingListReader.c - core/Lucy/Index/PostingListReader.cfh - core/Lucy/Index/PostingListWriter.c - core/Lucy/Index/PostingListWriter.cfh - core/Lucy/Index/PostingPool.c - core/Lucy/Index/PostingPool.cfh - core/Lucy/Index/RawLexicon.c - core/Lucy/Index/RawLexicon.cfh - core/Lucy/Index/RawPostingList.c - core/Lucy/Index/RawPostingList.cfh - core/Lucy/Index/SegLexicon.c - core/Lucy/Index/SegLexicon.cfh - core/Lucy/Index/SegPostingList.c - core/Lucy/Index/SegPostingList.cfh - core/Lucy/Index/SegReader.c - core/Lucy/Index/SegReader.cfh - core/Lucy/Index/SegWriter.c - core/Lucy/Index/SegWriter.cfh - core/Lucy/Index/Segment.c - core/Lucy/Index/Segment.cfh - core/Lucy/Index/Similarity.c - core/Lucy/Index/Similarity.cfh - core/Lucy/Index/SkipStepper.c - core/Lucy/Index/SkipStepper.cfh - core/Lucy/Index/Snapshot.c - core/Lucy/Index/Snapshot.cfh - core/Lucy/Index/SortCache.c - core/Lucy/Index/SortCache.cfh - core/Lucy/Index/SortCache/NumericSortCache.c - core/Lucy/Index/SortCache/NumericSortCache.cfh - core/Lucy/Index/SortCache/TextSortCache.c - core/Lucy/Index/SortCache/TextSortCache.cfh - core/Lucy/Index/SortFieldWriter.c - core/Lucy/Index/SortFieldWriter.cfh - core/Lucy/Index/SortReader.c - core/Lucy/Index/SortReader.cfh - core/Lucy/Index/SortWriter.c - core/Lucy/Index/SortWriter.cfh - core/Lucy/Index/TermInfo.c - core/Lucy/Index/TermInfo.cfh - core/Lucy/Index/TermStepper.c - core/Lucy/Index/TermStepper.cfh - core/Lucy/Index/TermVector.c - core/Lucy/Index/TermVector.cfh - core/Lucy/Index/ZombieKeyedHash.c - core/Lucy/Index/ZombieKeyedHash.cfh - core/Lucy/Object/BitVector.c - core/Lucy/Object/BitVector.cfh - core/Lucy/Object/ByteBuf.c - core/Lucy/Object/ByteBuf.cfh - core/Lucy/Object/CharBuf.c - core/Lucy/Object/CharBuf.cfh - core/Lucy/Object/Err.c - core/Lucy/Object/Err.cfh - core/Lucy/Object/Hash.c - core/Lucy/Object/Hash.cfh - core/Lucy/Object/Host.cfh - core/Lucy/Object/I32Array.c - core/Lucy/Object/I32Array.cfh - core/Lucy/Object/LockFreeRegistry.c - core/Lucy/Object/LockFreeRegistry.cfh - core/Lucy/Object/Num.c - core/Lucy/Object/Num.cfh - core/Lucy/Object/Obj.c - core/Lucy/Object/Obj.cfh - core/Lucy/Object/VArray.c - core/Lucy/Object/VArray.cfh - core/Lucy/Object/VTable.c - core/Lucy/Object/VTable.cfh - core/Lucy/Plan/Architecture.c - core/Lucy/Plan/Architecture.cfh - core/Lucy/Plan/BlobType.c - core/Lucy/Plan/BlobType.cfh - core/Lucy/Plan/FieldType.c - core/Lucy/Plan/FieldType.cfh - core/Lucy/Plan/FullTextType.c - core/Lucy/Plan/FullTextType.cfh - core/Lucy/Plan/NumericType.c - core/Lucy/Plan/NumericType.cfh - core/Lucy/Plan/Schema.c - core/Lucy/Plan/Schema.cfh - core/Lucy/Plan/StringType.c - core/Lucy/Plan/StringType.cfh - core/Lucy/Plan/TextType.c - core/Lucy/Plan/TextType.cfh - core/Lucy/Search/ANDMatcher.c - core/Lucy/Search/ANDMatcher.cfh - core/Lucy/Search/ANDQuery.c - core/Lucy/Search/ANDQuery.cfh - core/Lucy/Search/BitVecMatcher.c - core/Lucy/Search/BitVecMatcher.cfh - core/Lucy/Search/Collector.c - core/Lucy/Search/Collector.cfh - core/Lucy/Search/Collector/SortCollector.c - core/Lucy/Search/Collector/SortCollector.cfh - core/Lucy/Search/Compiler.c - core/Lucy/Search/Compiler.cfh - core/Lucy/Search/HitQueue.c - core/Lucy/Search/HitQueue.cfh - core/Lucy/Search/Hits.c - core/Lucy/Search/Hits.cfh - core/Lucy/Search/IndexSearcher.c - core/Lucy/Search/IndexSearcher.cfh - core/Lucy/Search/LeafQuery.c - core/Lucy/Search/LeafQuery.cfh - core/Lucy/Search/MatchAllMatcher.c - core/Lucy/Search/MatchAllMatcher.cfh - core/Lucy/Search/MatchAllQuery.c - core/Lucy/Search/MatchAllQuery.cfh - core/Lucy/Search/MatchDoc.c - core/Lucy/Search/MatchDoc.cfh - core/Lucy/Search/Matcher.c - core/Lucy/Search/Matcher.cfh - core/Lucy/Search/NOTMatcher.c - core/Lucy/Search/NOTMatcher.cfh - core/Lucy/Search/NOTQuery.c - core/Lucy/Search/NOTQuery.cfh - core/Lucy/Search/NoMatchMatcher.c - core/Lucy/Search/NoMatchMatcher.cfh - core/Lucy/Search/NoMatchQuery.c - core/Lucy/Search/NoMatchQuery.cfh - core/Lucy/Search/ORMatcher.c - core/Lucy/Search/ORMatcher.cfh - core/Lucy/Search/ORQuery.c - core/Lucy/Search/ORQuery.cfh - core/Lucy/Search/PhraseMatcher.c - core/Lucy/Search/PhraseMatcher.cfh - core/Lucy/Search/PhraseQuery.c - core/Lucy/Search/PhraseQuery.cfh - core/Lucy/Search/PolyMatcher.c - core/Lucy/Search/PolyMatcher.cfh - core/Lucy/Search/PolyQuery.c - core/Lucy/Search/PolyQuery.cfh - core/Lucy/Search/PolySearcher.c - core/Lucy/Search/PolySearcher.cfh - core/Lucy/Search/Query.c - core/Lucy/Search/Query.cfh - core/Lucy/Search/QueryParser.c - core/Lucy/Search/QueryParser.cfh - core/Lucy/Search/RangeMatcher.c - core/Lucy/Search/RangeMatcher.cfh - core/Lucy/Search/RangeQuery.c - core/Lucy/Search/RangeQuery.cfh - core/Lucy/Search/RequiredOptionalMatcher.c - core/Lucy/Search/RequiredOptionalMatcher.cfh - core/Lucy/Search/RequiredOptionalQuery.c - core/Lucy/Search/RequiredOptionalQuery.cfh - core/Lucy/Search/Searcher.c - core/Lucy/Search/Searcher.cfh - core/Lucy/Search/SeriesMatcher.c - core/Lucy/Search/SeriesMatcher.cfh - core/Lucy/Search/SortRule.c - core/Lucy/Search/SortRule.cfh - core/Lucy/Search/SortSpec.c - core/Lucy/Search/SortSpec.cfh - core/Lucy/Search/Span.c - core/Lucy/Search/Span.cfh - core/Lucy/Search/TermMatcher.c - core/Lucy/Search/TermMatcher.cfh - core/Lucy/Search/TermQuery.c - core/Lucy/Search/TermQuery.cfh - core/Lucy/Search/TopDocs.c - core/Lucy/Search/TopDocs.cfh - core/Lucy/Store/CompoundFileReader.c - core/Lucy/Store/CompoundFileReader.cfh - core/Lucy/Store/CompoundFileWriter.c - core/Lucy/Store/CompoundFileWriter.cfh - core/Lucy/Store/DirHandle.c - core/Lucy/Store/DirHandle.cfh - core/Lucy/Store/FSDirHandle.c - core/Lucy/Store/FSDirHandle.cfh - core/Lucy/Store/FSFileHandle.c - core/Lucy/Store/FSFileHandle.cfh - core/Lucy/Store/FSFolder.c - core/Lucy/Store/FSFolder.cfh - core/Lucy/Store/FileHandle.c - core/Lucy/Store/FileHandle.cfh - core/Lucy/Store/FileWindow.c - core/Lucy/Store/FileWindow.cfh - core/Lucy/Store/Folder.c - core/Lucy/Store/Folder.cfh - core/Lucy/Store/InStream.c - core/Lucy/Store/InStream.cfh - core/Lucy/Store/Lock.c - core/Lucy/Store/Lock.cfh - core/Lucy/Store/LockFactory.c - core/Lucy/Store/LockFactory.cfh - core/Lucy/Store/OutStream.c - core/Lucy/Store/OutStream.cfh - core/Lucy/Store/RAMDirHandle.c - core/Lucy/Store/RAMDirHandle.cfh - core/Lucy/Store/RAMFile.c - core/Lucy/Store/RAMFile.cfh - core/Lucy/Store/RAMFileHandle.c - core/Lucy/Store/RAMFileHandle.cfh - core/Lucy/Store/RAMFolder.c - core/Lucy/Store/RAMFolder.cfh - core/Lucy/Store/SharedLock.c - core/Lucy/Store/SharedLock.cfh - core/Lucy/Test.c - core/Lucy/Test.cfh - core/Lucy/Test/Analysis/TestAnalyzer.c - core/Lucy/Test/Analysis/TestAnalyzer.cfh - core/Lucy/Test/Analysis/TestCaseFolder.c - core/Lucy/Test/Analysis/TestCaseFolder.cfh - core/Lucy/Test/Analysis/TestNormalizer.c - core/Lucy/Test/Analysis/TestNormalizer.cfh - core/Lucy/Test/Analysis/TestPolyAnalyzer.c - core/Lucy/Test/Analysis/TestPolyAnalyzer.cfh - core/Lucy/Test/Analysis/TestRegexTokenizer.c - core/Lucy/Test/Analysis/TestRegexTokenizer.cfh - core/Lucy/Test/Analysis/TestSnowballStemmer.c - core/Lucy/Test/Analysis/TestSnowballStemmer.cfh - core/Lucy/Test/Analysis/TestSnowballStopFilter.c - core/Lucy/Test/Analysis/TestSnowballStopFilter.cfh - core/Lucy/Test/Analysis/TestStandardTokenizer.c - core/Lucy/Test/Analysis/TestStandardTokenizer.cfh - core/Lucy/Test/Highlight/TestHighlighter.c - core/Lucy/Test/Highlight/TestHighlighter.cfh - core/Lucy/Test/Index/TestDocWriter.c - core/Lucy/Test/Index/TestDocWriter.cfh - core/Lucy/Test/Index/TestHighlightWriter.c - core/Lucy/Test/Index/TestHighlightWriter.cfh - core/Lucy/Test/Index/TestIndexManager.c - core/Lucy/Test/Index/TestIndexManager.cfh - core/Lucy/Test/Index/TestPolyReader.c - core/Lucy/Test/Index/TestPolyReader.cfh - core/Lucy/Test/Index/TestPostingListWriter.c - core/Lucy/Test/Index/TestPostingListWriter.cfh - core/Lucy/Test/Index/TestSegWriter.c - core/Lucy/Test/Index/TestSegWriter.cfh - core/Lucy/Test/Index/TestSegment.c - core/Lucy/Test/Index/TestSegment.cfh - core/Lucy/Test/Index/TestSnapshot.c - core/Lucy/Test/Index/TestSnapshot.cfh - core/Lucy/Test/Object/TestBitVector.c - core/Lucy/Test/Object/TestBitVector.cfh - core/Lucy/Test/Object/TestByteBuf.c - core/Lucy/Test/Object/TestByteBuf.cfh - core/Lucy/Test/Object/TestCharBuf.c - core/Lucy/Test/Object/TestCharBuf.cfh - core/Lucy/Test/Object/TestHash.c - core/Lucy/Test/Object/TestHash.cfh - core/Lucy/Test/Object/TestI32Array.c - core/Lucy/Test/Object/TestI32Array.cfh - core/Lucy/Test/Object/TestLockFreeRegistry.c - core/Lucy/Test/Object/TestLockFreeRegistry.cfh - core/Lucy/Test/Object/TestNum.c - core/Lucy/Test/Object/TestNum.cfh - core/Lucy/Test/Object/TestObj.c - core/Lucy/Test/Object/TestObj.cfh - core/Lucy/Test/Object/TestVArray.c - core/Lucy/Test/Object/TestVArray.cfh - core/Lucy/Test/Plan/TestArchitecture.c - core/Lucy/Test/Plan/TestArchitecture.cfh - core/Lucy/Test/Plan/TestBlobType.c - core/Lucy/Test/Plan/TestBlobType.cfh - core/Lucy/Test/Plan/TestFieldType.c - core/Lucy/Test/Plan/TestFieldType.cfh - core/Lucy/Test/Plan/TestFullTextType.c - core/Lucy/Test/Plan/TestFullTextType.cfh - core/Lucy/Test/Plan/TestNumericType.c - core/Lucy/Test/Plan/TestNumericType.cfh - core/Lucy/Test/Search/TestLeafQuery.c - core/Lucy/Test/Search/TestLeafQuery.cfh - core/Lucy/Test/Search/TestMatchAllQuery.c - core/Lucy/Test/Search/TestMatchAllQuery.cfh - core/Lucy/Test/Search/TestNOTQuery.c - core/Lucy/Test/Search/TestNOTQuery.cfh - core/Lucy/Test/Search/TestNoMatchQuery.c - core/Lucy/Test/Search/TestNoMatchQuery.cfh - core/Lucy/Test/Search/TestPhraseQuery.c - core/Lucy/Test/Search/TestPhraseQuery.cfh - core/Lucy/Test/Search/TestPolyQuery.c - core/Lucy/Test/Search/TestPolyQuery.cfh - core/Lucy/Test/Search/TestQueryParser.c - core/Lucy/Test/Search/TestQueryParser.cfh - core/Lucy/Test/Search/TestQueryParserLogic.c - core/Lucy/Test/Search/TestQueryParserLogic.cfh - core/Lucy/Test/Search/TestQueryParserSyntax.c - core/Lucy/Test/Search/TestQueryParserSyntax.cfh - core/Lucy/Test/Search/TestRangeQuery.c - core/Lucy/Test/Search/TestRangeQuery.cfh - core/Lucy/Test/Search/TestReqOptQuery.c - core/Lucy/Test/Search/TestReqOptQuery.cfh - core/Lucy/Test/Search/TestSeriesMatcher.c - core/Lucy/Test/Search/TestSeriesMatcher.cfh - core/Lucy/Test/Search/TestTermQuery.c - core/Lucy/Test/Search/TestTermQuery.cfh - core/Lucy/Test/Store/MockFileHandle.c - core/Lucy/Test/Store/MockFileHandle.cfh - core/Lucy/Test/Store/TestCompoundFileReader.c - core/Lucy/Test/Store/TestCompoundFileReader.cfh - core/Lucy/Test/Store/TestCompoundFileWriter.c - core/Lucy/Test/Store/TestCompoundFileWriter.cfh - core/Lucy/Test/Store/TestFSDirHandle.c - core/Lucy/Test/Store/TestFSDirHandle.cfh - core/Lucy/Test/Store/TestFSFileHandle.c - core/Lucy/Test/Store/TestFSFileHandle.cfh - core/Lucy/Test/Store/TestFSFolder.c - core/Lucy/Test/Store/TestFSFolder.cfh - core/Lucy/Test/Store/TestFileHandle.c - core/Lucy/Test/Store/TestFileHandle.cfh - core/Lucy/Test/Store/TestFolder.c - core/Lucy/Test/Store/TestFolder.cfh - core/Lucy/Test/Store/TestFolderCommon.c - core/Lucy/Test/Store/TestFolderCommon.cfh - core/Lucy/Test/Store/TestIOChunks.c - core/Lucy/Test/Store/TestIOChunks.cfh - core/Lucy/Test/Store/TestIOPrimitives.c - core/Lucy/Test/Store/TestIOPrimitives.cfh - core/Lucy/Test/Store/TestInStream.c - core/Lucy/Test/Store/TestInStream.cfh - core/Lucy/Test/Store/TestRAMDirHandle.c - core/Lucy/Test/Store/TestRAMDirHandle.cfh - core/Lucy/Test/Store/TestRAMFileHandle.c - core/Lucy/Test/Store/TestRAMFileHandle.cfh - core/Lucy/Test/Store/TestRAMFolder.c - core/Lucy/Test/Store/TestRAMFolder.cfh - core/Lucy/Test/TestSchema.c - core/Lucy/Test/TestSchema.cfh - core/Lucy/Test/TestUtils.c - core/Lucy/Test/TestUtils.cfh - core/Lucy/Test/Util/BBSortEx.c - core/Lucy/Test/Util/BBSortEx.cfh - core/Lucy/Test/Util/TestAtomic.c - core/Lucy/Test/Util/TestAtomic.cfh - core/Lucy/Test/Util/TestIndexFileNames.c - core/Lucy/Test/Util/TestIndexFileNames.cfh - core/Lucy/Test/Util/TestJson.c - core/Lucy/Test/Util/TestJson.cfh - core/Lucy/Test/Util/TestMemory.c - core/Lucy/Test/Util/TestMemory.cfh - core/Lucy/Test/Util/TestMemoryPool.c - core/Lucy/Test/Util/TestMemoryPool.cfh - core/Lucy/Test/Util/TestNumberUtils.c - core/Lucy/Test/Util/TestNumberUtils.cfh - core/Lucy/Test/Util/TestPriorityQueue.c - core/Lucy/Test/Util/TestPriorityQueue.cfh - core/Lucy/Test/Util/TestStringHelper.c - core/Lucy/Test/Util/TestStringHelper.cfh - core/Lucy/Util/Atomic.c - core/Lucy/Util/Atomic.cfh - core/Lucy/Util/Debug.c - core/Lucy/Util/Debug.cfh - core/Lucy/Util/Freezer.c - core/Lucy/Util/Freezer.cfh - core/Lucy/Util/IndexFileNames.c - core/Lucy/Util/IndexFileNames.cfh - core/Lucy/Util/Json.c - core/Lucy/Util/Json.cfh - core/Lucy/Util/Json/JsonParser.y - core/Lucy/Util/Memory.c - core/Lucy/Util/Memory.cfh - core/Lucy/Util/MemoryPool.c - core/Lucy/Util/MemoryPool.cfh - core/Lucy/Util/NumberUtils.c - core/Lucy/Util/NumberUtils.cfh - core/Lucy/Util/PriorityQueue.c - core/Lucy/Util/PriorityQueue.cfh - core/Lucy/Util/ProcessID.c - core/Lucy/Util/ProcessID.cfh - core/Lucy/Util/Sleep.c - core/Lucy/Util/Sleep.cfh - core/Lucy/Util/SortExternal.c - core/Lucy/Util/SortExternal.cfh - core/Lucy/Util/SortUtils.c - core/Lucy/Util/SortUtils.cfh - core/Lucy/Util/Stepper.c - core/Lucy/Util/Stepper.cfh - core/Lucy/Util/StringHelper.c - core/Lucy/Util/StringHelper.cfh - core/Lucy/Util/ToolSet.h - core/LucyX/Search/FilterMatcher.c - core/LucyX/Search/FilterMatcher.cfh - core/LucyX/Search/MockMatcher.c - core/LucyX/Search/MockMatcher.cfh - core/LucyX/Search/ProximityMatcher.c - core/LucyX/Search/ProximityMatcher.cfh - core/LucyX/Search/ProximityQuery.c - core/LucyX/Search/ProximityQuery.cfh - devel/benchmarks/README.txt - devel/benchmarks/extract_reuters.plx - devel/benchmarks/indexers/BenchmarkingIndexer.pm - devel/benchmarks/indexers/LuceneIndexer.java - devel/benchmarks/indexers/lucy_indexer.plx - devel/bin/UnicodeTable.pm - devel/bin/format_changes_entry.pl - devel/bin/gen_charmonizer_makefiles.pl - devel/bin/gen_word_break_data.pl - devel/bin/lucytidy.pl - devel/bin/release_commands.pl - devel/bin/smoke.pl - devel/bin/update_version - devel/bin/valgrind_triggers.pl - devel/conf/astylerc - devel/conf/lucyperl.supp - devel/conf/perltidyrc - devel/conf/rat-excludes - lemon/Makefile - lemon/Makefile.MSVC - lemon/Makefile.MinGW - lemon/README - lemon/lemon.c - lemon/lempar.c - lib/Lucy.pm - lib/Lucy/Analysis/Analyzer.pm - lib/Lucy/Analysis/CaseFolder.pm - lib/Lucy/Analysis/EasyAnalyzer.pm - lib/Lucy/Analysis/Inversion.pm - lib/Lucy/Analysis/LCNormalizer.pm - lib/Lucy/Analysis/Normalizer.pm - lib/Lucy/Analysis/PolyAnalyzer.pm - lib/Lucy/Analysis/RegexTokenizer.pm - lib/Lucy/Analysis/SnowballStemmer.pm - lib/Lucy/Analysis/SnowballStopFilter.pm - lib/Lucy/Analysis/StandardTokenizer.pm - lib/Lucy/Analysis/Token.pm - lib/Lucy/Analysis/TokenBatch.pm - lib/Lucy/Docs/DevGuide.pm - lib/Lucy/Docs/FileLocking.pm - lib/Lucy/Document/Doc.pm - lib/Lucy/Document/HitDoc.pm - lib/Lucy/Highlight/HeatMap.pm - lib/Lucy/Highlight/Highlighter.pm - lib/Lucy/Index/BackgroundMerger.pm - lib/Lucy/Index/DataReader.pm - lib/Lucy/Index/DataWriter.pm - lib/Lucy/Index/DeletionsReader.pm - lib/Lucy/Index/DeletionsWriter.pm - lib/Lucy/Index/DocReader.pm - lib/Lucy/Index/DocVector.pm - lib/Lucy/Index/DocWriter.pm - lib/Lucy/Index/FilePurger.pm - lib/Lucy/Index/HighlightReader.pm - lib/Lucy/Index/HighlightWriter.pm - lib/Lucy/Index/IndexManager.pm - lib/Lucy/Index/IndexReader.pm - lib/Lucy/Index/Indexer.pm - lib/Lucy/Index/Inverter.pm - lib/Lucy/Index/Lexicon.pm - lib/Lucy/Index/LexiconReader.pm - lib/Lucy/Index/LexiconWriter.pm - lib/Lucy/Index/PolyLexicon.pm - lib/Lucy/Index/PolyReader.pm - lib/Lucy/Index/Posting.pm - lib/Lucy/Index/Posting/MatchPosting.pm - lib/Lucy/Index/Posting/RichPosting.pm - lib/Lucy/Index/Posting/ScorePosting.pm - lib/Lucy/Index/PostingList.pm - lib/Lucy/Index/PostingListReader.pm - lib/Lucy/Index/PostingListWriter.pm - lib/Lucy/Index/SegLexicon.pm - lib/Lucy/Index/SegPostingList.pm - lib/Lucy/Index/SegReader.pm - lib/Lucy/Index/SegWriter.pm - lib/Lucy/Index/Segment.pm - lib/Lucy/Index/Similarity.pm - lib/Lucy/Index/Snapshot.pm - lib/Lucy/Index/SortCache.pm - lib/Lucy/Index/SortReader.pm - lib/Lucy/Index/SortWriter.pm - lib/Lucy/Index/Term.pm - lib/Lucy/Index/TermInfo.pm - lib/Lucy/Index/TermVector.pm - lib/Lucy/InvIndex.pm - lib/Lucy/InvIndexer.pm - lib/Lucy/Object/BitVector.pm - lib/Lucy/Object/ByteBuf.pm - lib/Lucy/Object/CharBuf.pm - lib/Lucy/Object/Err.pm - lib/Lucy/Object/Hash.pm - lib/Lucy/Object/Host.pm - lib/Lucy/Object/I32Array.pm - lib/Lucy/Object/LockFreeRegistry.pm - lib/Lucy/Object/Num.pm - lib/Lucy/Object/Obj.pm - lib/Lucy/Object/VArray.pm - lib/Lucy/Object/VTable.pm - lib/Lucy/Plan/Architecture.pm - lib/Lucy/Plan/BlobType.pm - lib/Lucy/Plan/FieldType.pm - lib/Lucy/Plan/Float32Type.pm - lib/Lucy/Plan/Float64Type.pm - lib/Lucy/Plan/FullTextType.pm - lib/Lucy/Plan/Int32Type.pm - lib/Lucy/Plan/Int64Type.pm - lib/Lucy/Plan/Schema.pm - lib/Lucy/Plan/StringType.pm - lib/Lucy/QueryParser/QueryParser.pm - lib/Lucy/Redacted.pm - lib/Lucy/Search/ANDMatcher.pm - lib/Lucy/Search/ANDQuery.pm - lib/Lucy/Search/BitVecMatcher.pm - lib/Lucy/Search/BooleanQuery.pm - lib/Lucy/Search/Collector.pm - lib/Lucy/Search/Collector/BitCollector.pm - lib/Lucy/Search/Collector/SortCollector.pm - lib/Lucy/Search/Compiler.pm - lib/Lucy/Search/HitQueue.pm - lib/Lucy/Search/Hits.pm - lib/Lucy/Search/IndexSearcher.pm - lib/Lucy/Search/LeafQuery.pm - lib/Lucy/Search/MatchAllQuery.pm - lib/Lucy/Search/MatchDoc.pm - lib/Lucy/Search/Matcher.pm - lib/Lucy/Search/NOTMatcher.pm - lib/Lucy/Search/NOTQuery.pm - lib/Lucy/Search/NoMatchQuery.pm - lib/Lucy/Search/ORQuery.pm - lib/Lucy/Search/ORScorer.pm - lib/Lucy/Search/PhraseQuery.pm - lib/Lucy/Search/PolyCompiler.pm - lib/Lucy/Search/PolyQuery.pm - lib/Lucy/Search/PolySearcher.pm - lib/Lucy/Search/Query.pm - lib/Lucy/Search/QueryFilter.pm - lib/Lucy/Search/QueryParser.pm - lib/Lucy/Search/RangeQuery.pm - lib/Lucy/Search/RequiredOptionalMatcher.pm - lib/Lucy/Search/RequiredOptionalQuery.pm - lib/Lucy/Search/SearchClient.pm - lib/Lucy/Search/SearchServer.pm - lib/Lucy/Search/Searcher.pm - lib/Lucy/Search/SortRule.pm - lib/Lucy/Search/SortSpec.pm - lib/Lucy/Search/Span.pm - lib/Lucy/Search/TermQuery.pm - lib/Lucy/Search/TopDocs.pm - lib/Lucy/Store/FSFileHandle.pm - lib/Lucy/Store/FSFolder.pm - lib/Lucy/Store/FileHandle.pm - lib/Lucy/Store/Folder.pm - lib/Lucy/Store/InStream.pm - lib/Lucy/Store/Lock.pm - lib/Lucy/Store/LockErr.pm - lib/Lucy/Store/LockFactory.pm - lib/Lucy/Store/OutStream.pm - lib/Lucy/Store/RAMFile.pm - lib/Lucy/Store/RAMFileHandle.pm - lib/Lucy/Store/RAMFolder.pm - lib/Lucy/Test.pm - lib/Lucy/Test/Object/TestCharBuf.pm - lib/Lucy/Test/TestUtils.pm - lib/Lucy/Test/Util/BBSortEx.pm - lib/Lucy/Util/BitVector.pm - lib/Lucy/Util/Debug.pm - lib/Lucy/Util/IndexFileNames.pm - lib/Lucy/Util/Json.pm - lib/Lucy/Util/MemoryPool.pm - lib/Lucy/Util/PriorityQueue.pm - lib/Lucy/Util/SortExternal.pm - lib/Lucy/Util/Stepper.pm - lib/Lucy/Util/StringHelper.pm - lib/LucyX/Search/ProximityQuery.pm - modules/analysis/snowstem/devel/update_snowstem.pl - modules/analysis/snowstem/source/README - modules/analysis/snowstem/source/include/libstemmer.h - modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c - modules/analysis/snowstem/source/libstemmer/modules_utf8.h - modules/analysis/snowstem/source/runtime/api.c - modules/analysis/snowstem/source/runtime/api.h - modules/analysis/snowstem/source/runtime/header.h - modules/analysis/snowstem/source/runtime/utilities.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_danish.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_danish.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_dutch.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_dutch.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_english.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_english.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_finnish.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_finnish.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_french.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_french.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_german.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_german.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_hungarian.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_hungarian.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_italian.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_italian.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_norwegian.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_norwegian.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_porter.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_porter.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_portuguese.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_portuguese.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_romanian.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_romanian.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_russian.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_russian.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_spanish.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_spanish.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_swedish.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_swedish.h - modules/analysis/snowstem/source/src_c/stem_UTF_8_turkish.c - modules/analysis/snowstem/source/src_c/stem_UTF_8_turkish.h - modules/analysis/snowstem/source/test/README - modules/analysis/snowstem/source/test/tests.json - modules/analysis/snowstop/devel/update_snowstop.pl - modules/analysis/snowstop/source/snowball_stoplists.c - modules/unicode/ucd/WordBreak.tab - modules/unicode/ucd/WordBreakTest.json - modules/unicode/utf8proc/tests.json - modules/unicode/utf8proc/utf8proc.c - modules/unicode/utf8proc/utf8proc.h - modules/unicode/utf8proc/utf8proc_data.c - sample/FlatQueryParser.pm - sample/PrefixQuery.pm - sample/README.txt - sample/indexer.pl - sample/search.cgi - sample/us_constitution/amend1.txt - sample/us_constitution/amend10.txt - sample/us_constitution/amend11.txt - sample/us_constitution/amend12.txt - sample/us_constitution/amend13.txt - sample/us_constitution/amend14.txt - sample/us_constitution/amend15.txt - sample/us_constitution/amend16.txt - sample/us_constitution/amend17.txt - sample/us_constitution/amend18.txt - sample/us_constitution/amend19.txt - sample/us_constitution/amend2.txt - sample/us_constitution/amend20.txt - sample/us_constitution/amend21.txt - sample/us_constitution/amend22.txt - sample/us_constitution/amend23.txt - sample/us_constitution/amend24.txt - sample/us_constitution/amend25.txt - sample/us_constitution/amend26.txt - sample/us_constitution/amend27.txt - sample/us_constitution/amend3.txt - sample/us_constitution/amend4.txt - sample/us_constitution/amend5.txt - sample/us_constitution/amend6.txt - sample/us_constitution/amend7.txt - sample/us_constitution/amend8.txt - sample/us_constitution/amend9.txt - sample/us_constitution/art1sec1.txt - sample/us_constitution/art1sec10.txt - sample/us_constitution/art1sec2.txt - sample/us_constitution/art1sec3.txt - sample/us_constitution/art1sec4.txt - sample/us_constitution/art1sec5.txt - sample/us_constitution/art1sec6.txt - sample/us_constitution/art1sec7.txt - sample/us_constitution/art1sec8.txt - sample/us_constitution/art1sec9.txt - sample/us_constitution/art2sec1.txt - sample/us_constitution/art2sec2.txt - sample/us_constitution/art2sec3.txt - sample/us_constitution/art2sec4.txt - sample/us_constitution/art3sec1.txt - sample/us_constitution/art3sec2.txt - sample/us_constitution/art3sec3.txt - sample/us_constitution/art4sec1.txt - sample/us_constitution/art4sec2.txt - sample/us_constitution/art4sec3.txt - sample/us_constitution/art4sec4.txt - sample/us_constitution/art5.txt - sample/us_constitution/art6.txt - sample/us_constitution/art7.txt - sample/us_constitution/index.html - sample/us_constitution/preamble.txt - sample/us_constitution/uscon.css - t/001-build_indexes.t - t/002-lucy.t - t/015-sort_external.t - t/018-host.t - t/021-vtable.t - t/023-stepper.t - t/025-debug.t - t/026-serialization.t - t/028-sortexrun.t - t/050-ramfile.t - t/051-fsfile.t - t/102-strings_io.t - t/105-folder.t - t/106-locking.t - t/109-read_locking.t - t/110-shared_lock.t - t/111-index_manager.t - t/152-inversion.t - t/154-regex_tokenizer.t - t/200-doc.t - t/201-hit_doc.t - t/204-doc_reader.t - t/205-seg_reader.t - t/207-seg_lexicon.t - t/208-terminfo.t - t/209-seg_lexicon_heavy.t - t/210-deldocs.t - t/211-seg_posting_list.t - t/213-segment_merging.t - t/214-spec_field.t - t/215-term_vectors.t - t/216-schema.t - t/217-poly_lexicon.t - t/218-del_merging.t - t/219-byte_buf_doc.t - t/220-zlib_doc.t - t/221-sort_writer.t - t/224-lex_reader.t - t/233-background_merger.t - t/302-many_fields.t - t/304-verify_utf8.t - t/305-indexer.t - t/306-dynamic_schema.t - t/308-simple.t - t/309-span.t - t/310-heat_map.t - t/311-hl_selection.t - t/400-match_posting.t - t/501-termquery.t - t/502-phrasequery.t - t/504-similarity.t - t/505-hit_queue.t - t/506-collector.t - t/507-filter.t - t/508-hits.t - t/509-poly_searcher.t - t/510-remote_search.t - t/511-sort_spec.t - t/513-matcher.t - t/514-and_matcher.t - t/515-range_query.t - t/518-or_scorer.t - t/519-req_opt_matcher.t - t/520-match_doc.t - t/523-and_query.t - t/524-poly_query.t - t/525-match_all_query.t - t/526-not_query.t - t/527-req_opt_query.t - t/528-leaf_query.t - t/529-no_match_query.t - t/532-sort_collector.t - t/550-cluster_searcher.t - t/601-queryparser.t - t/602-boosts.t - t/603-query_boosts.t - t/604-simple_search.t - t/605-store_pos_boost.t - t/607-queryparser_multi_field.t - t/610-queryparser_logic.t - t/611-queryparser_syntax.t - t/613-proximityquery.t - t/701-uscon.t - t/999-remove_indexes.t - t/binding/016-varray.t - t/binding/017-hash.t - t/binding/019-obj.t - t/binding/022-bytebuf.t - t/binding/029-charbuf.t - t/binding/034-err.t - t/binding/101-simple_io.t - t/binding/150-polyanalyzer.t - t/binding/151-analyzer.t - t/binding/153-case_folder.t - t/binding/155-snowball_stop_filter.t - t/binding/156-snowball_stemmer.t - t/binding/157-normalizer.t - t/binding/158-standard_tokenizer.t - t/binding/159-easyanalyzer.t - t/binding/206-snapshot.t - t/binding/303-highlighter.t - t/binding/506-collector.t - t/binding/702-sample.t - t/binding/800-stack.t - t/charmonizer/001-integers.t - t/charmonizer/002-func_macro.t - t/charmonizer/003-headers.t - t/charmonizer/004-large_files.t - t/charmonizer/005-unused_vars.t - t/charmonizer/006-variadic_macros.t - t/charmonizer/007-dirmanip.t - t/core/012-priority_queue.t - t/core/013-bit_vector.t - t/core/016-varray.t - t/core/017-hash.t - t/core/019-obj.t - t/core/022-bytebuf.t - t/core/024-memory_pool.t - t/core/029-charbuf.t - t/core/030-number_utils.t - t/core/031-num.t - t/core/032-string_helper.t - t/core/033-index_file_names.t - t/core/035-json.t - t/core/036-i32_array.t - t/core/037-atomic.t - t/core/039-memory.t - t/core/050-ram_file_handle.t - t/core/051-fs_file_handle.t - t/core/052-instream.t - t/core/053-file_handle.t - t/core/054-io_primitives.t - t/core/055-io_chunks.t - t/core/061-ram_dir_handle.t - t/core/062-fs_dir_handle.t - t/core/103-fs_folder.t - t/core/104-ram_folder.t - t/core/105-folder.t - t/core/111-index_manager.t - t/core/112-cf_writer.t - t/core/113-cf_reader.t - t/core/150-analyzer.t - t/core/150-polyanalyzer.t - t/core/153-case_folder.t - t/core/154-regex_tokenizer.t - t/core/155-snowball_stop_filter.t - t/core/156-snowball_stemmer.t - t/core/157-normalizer.t - t/core/158-standard_tokenizer.t - t/core/206-snapshot.t - t/core/216-schema.t - t/core/220-doc_writer.t - t/core/221-highlight_writer.t - t/core/222-posting_list_writer.t - t/core/223-seg_writer.t - t/core/225-polyreader.t - t/core/230-full_text_type.t - t/core/231-blob_type.t - t/core/232-numeric_type.t - t/core/234-field_type.t - t/core/301-segment.t - t/core/303-highlighter.t - t/core/501-termquery.t - t/core/502-phrasequery.t - t/core/515-range_query.t - t/core/523-and_query.t - t/core/525-match_all_query.t - t/core/526-not_query.t - t/core/527-req_opt_query.t - t/core/528-leaf_query.t - t/core/529-no_match_query.t - t/core/530-series_matcher.t - t/core/531-or_query.t - xs/Lucy/Analysis/CaseFolder.c - xs/Lucy/Analysis/RegexTokenizer.c - xs/Lucy/Document/Doc.c - xs/Lucy/Index/DocReader.c - xs/Lucy/Index/Inverter.c - xs/Lucy/Index/PolyReader.c - xs/Lucy/Index/SegReader.c - xs/Lucy/Object/Err.c - xs/Lucy/Object/Host.c - xs/Lucy/Object/LockFreeRegistry.c - xs/Lucy/Object/Obj.c - xs/Lucy/Object/VTable.c - xs/Lucy/Store/FSFolder.c - xs/XSBind.c - xs/XSBind.h provides: Lucy: file: lib/Lucy.pm version: 0.003003 Lucy::Analysis::Analyzer: file: lib/Lucy/Analysis/Analyzer.pm version: 0.003003 Lucy::Analysis::CaseFolder: file: lib/Lucy/Analysis/CaseFolder.pm version: 0.003003 Lucy::Analysis::EasyAnalyzer: file: lib/Lucy/Analysis/EasyAnalyzer.pm version: 0.003003 Lucy::Analysis::Inversion: file: lib/Lucy/Analysis/Inversion.pm version: 0.003003 Lucy::Analysis::Normalizer: file: lib/Lucy/Analysis/Normalizer.pm version: 0.003003 Lucy::Analysis::PolyAnalyzer: file: lib/Lucy/Analysis/PolyAnalyzer.pm version: 0.003003 Lucy::Analysis::RegexTokenizer: file: lib/Lucy/Analysis/RegexTokenizer.pm version: 0.003003 Lucy::Analysis::SnowballStemmer: file: lib/Lucy/Analysis/SnowballStemmer.pm version: 0.003003 Lucy::Analysis::SnowballStopFilter: file: lib/Lucy/Analysis/SnowballStopFilter.pm version: 0.003003 Lucy::Analysis::StandardTokenizer: file: lib/Lucy/Analysis/StandardTokenizer.pm version: 0.003003 Lucy::Analysis::Token: file: lib/Lucy/Analysis/Token.pm version: 0.003003 Lucy::Document::Doc: file: lib/Lucy/Document/Doc.pm version: 0.003003 Lucy::Document::HitDoc: file: lib/Lucy/Document/HitDoc.pm version: 0.003003 Lucy::Highlight::HeatMap: file: lib/Lucy/Highlight/HeatMap.pm version: 0.003003 Lucy::Highlight::Highlighter: file: lib/Lucy/Highlight/Highlighter.pm version: 0.003003 Lucy::Index::BackgroundMerger: file: lib/Lucy/Index/BackgroundMerger.pm version: 0.003003 Lucy::Index::DataReader: file: lib/Lucy/Index/DataReader.pm version: 0.003003 Lucy::Index::DataWriter: file: lib/Lucy/Index/DataWriter.pm version: 0.003003 Lucy::Index::DeletionsReader: file: lib/Lucy/Index/DeletionsReader.pm version: 0.003003 Lucy::Index::DeletionsWriter: file: lib/Lucy/Index/DeletionsWriter.pm version: 0.003003 Lucy::Index::DocReader: file: lib/Lucy/Index/DocReader.pm version: 0.003003 Lucy::Index::DocVector: file: lib/Lucy/Index/DocVector.pm version: 0.003003 Lucy::Index::DocWriter: file: lib/Lucy/Index/DocWriter.pm version: 0.003003 Lucy::Index::FilePurger: file: lib/Lucy/Index/FilePurger.pm version: 0.003003 Lucy::Index::HighlightReader: file: lib/Lucy/Index/HighlightReader.pm version: 0.003003 Lucy::Index::HighlightWriter: file: lib/Lucy/Index/HighlightWriter.pm version: 0.003003 Lucy::Index::IndexManager: file: lib/Lucy/Index/IndexManager.pm version: 0.003003 Lucy::Index::IndexReader: file: lib/Lucy/Index/IndexReader.pm version: 0.003003 Lucy::Index::Indexer: file: lib/Lucy/Index/Indexer.pm version: 0.003003 Lucy::Index::Inverter: file: lib/Lucy/Index/Inverter.pm version: 0.003003 Lucy::Index::Lexicon: file: lib/Lucy/Index/Lexicon.pm version: 0.003003 Lucy::Index::LexiconReader: file: lib/Lucy/Index/LexiconReader.pm version: 0.003003 Lucy::Index::LexiconWriter: file: lib/Lucy/Index/LexiconWriter.pm version: 0.003003 Lucy::Index::PolyLexicon: file: lib/Lucy/Index/PolyLexicon.pm version: 0.003003 Lucy::Index::PolyReader: file: lib/Lucy/Index/PolyReader.pm version: 0.003003 Lucy::Index::Posting: file: lib/Lucy/Index/Posting.pm version: 0.003003 Lucy::Index::Posting::MatchPosting: file: lib/Lucy/Index/Posting/MatchPosting.pm version: 0.003003 Lucy::Index::Posting::RichPosting: file: lib/Lucy/Index/Posting/RichPosting.pm version: 0.003003 Lucy::Index::Posting::ScorePosting: file: lib/Lucy/Index/Posting/ScorePosting.pm version: 0.003003 Lucy::Index::PostingList: file: lib/Lucy/Index/PostingList.pm version: 0.003003 Lucy::Index::PostingListReader: file: lib/Lucy/Index/PostingListReader.pm version: 0.003003 Lucy::Index::PostingListWriter: file: lib/Lucy/Index/PostingListWriter.pm version: 0.003003 Lucy::Index::SegLexicon: file: lib/Lucy/Index/SegLexicon.pm version: 0.003003 Lucy::Index::SegPostingList: file: lib/Lucy/Index/SegPostingList.pm version: 0.003003 Lucy::Index::SegReader: file: lib/Lucy/Index/SegReader.pm version: 0.003003 Lucy::Index::SegWriter: file: lib/Lucy/Index/SegWriter.pm version: 0.003003 Lucy::Index::Segment: file: lib/Lucy/Index/Segment.pm version: 0.003003 Lucy::Index::Similarity: file: lib/Lucy/Index/Similarity.pm version: 0.003003 Lucy::Index::Snapshot: file: lib/Lucy/Index/Snapshot.pm version: 0.003003 Lucy::Index::SortCache: file: lib/Lucy/Index/SortCache.pm version: 0.003003 Lucy::Index::SortReader: file: lib/Lucy/Index/SortReader.pm version: 0.003003 Lucy::Index::SortWriter: file: lib/Lucy/Index/SortWriter.pm version: 0.003003 Lucy::Index::TermInfo: file: lib/Lucy/Index/TermInfo.pm version: 0.003003 Lucy::Index::TermVector: file: lib/Lucy/Index/TermVector.pm version: 0.003003 Lucy::Object::BitVector: file: lib/Lucy/Object/BitVector.pm version: 0.003003 Lucy::Object::ByteBuf: file: lib/Lucy/Object/ByteBuf.pm version: 0.003003 Lucy::Object::CharBuf: file: lib/Lucy/Object/CharBuf.pm version: 0.003003 Lucy::Object::Err: file: lib/Lucy/Object/Err.pm version: 0.003003 Lucy::Object::Hash: file: lib/Lucy/Object/Hash.pm version: 0.003003 Lucy::Object::Host: file: lib/Lucy/Object/Host.pm version: 0.003003 Lucy::Object::I32Array: file: lib/Lucy/Object/I32Array.pm version: 0.003003 Lucy::Object::LockFreeRegistry: file: lib/Lucy/Object/LockFreeRegistry.pm version: 0.003003 Lucy::Object::Num: file: lib/Lucy/Object/Num.pm version: 0.003003 Lucy::Object::Obj: file: lib/Lucy/Object/Obj.pm version: 0.003003 Lucy::Object::VArray: file: lib/Lucy/Object/VArray.pm version: 0.003003 Lucy::Object::VTable: file: lib/Lucy/Object/VTable.pm version: 0.003003 Lucy::Object::ViewByteBuf: file: lib/Lucy.pm version: 0.003003 Lucy::Object::ViewCharBuf: file: lib/Lucy.pm version: 0.003003 Lucy::Object::ZombieCharBuf: file: lib/Lucy.pm version: 0.003003 Lucy::Plan::Architecture: file: lib/Lucy/Plan/Architecture.pm version: 0.003003 Lucy::Plan::BlobType: file: lib/Lucy/Plan/BlobType.pm version: 0.003003 Lucy::Plan::FieldType: file: lib/Lucy/Plan/FieldType.pm version: 0.003003 Lucy::Plan::Float32Type: file: lib/Lucy/Plan/Float32Type.pm version: 0.003003 Lucy::Plan::Float64Type: file: lib/Lucy/Plan/Float64Type.pm version: 0.003003 Lucy::Plan::FullTextType: file: lib/Lucy/Plan/FullTextType.pm version: 0.003003 Lucy::Plan::Int32Type: file: lib/Lucy/Plan/Int32Type.pm version: 0.003003 Lucy::Plan::Int64Type: file: lib/Lucy/Plan/Int64Type.pm version: 0.003003 Lucy::Plan::Schema: file: lib/Lucy/Plan/Schema.pm version: 0.003003 Lucy::Plan::StringType: file: lib/Lucy/Plan/StringType.pm version: 0.003003 Lucy::Search::ANDMatcher: file: lib/Lucy/Search/ANDMatcher.pm version: 0.003003 Lucy::Search::ANDQuery: file: lib/Lucy/Search/ANDQuery.pm version: 0.003003 Lucy::Search::BitVecMatcher: file: lib/Lucy/Search/BitVecMatcher.pm version: 0.003003 Lucy::Search::Collector: file: lib/Lucy/Search/Collector.pm version: 0.003003 Lucy::Search::Collector::BitCollector: file: lib/Lucy/Search/Collector/BitCollector.pm version: 0.003003 Lucy::Search::Collector::SortCollector: file: lib/Lucy/Search/Collector/SortCollector.pm version: 0.003003 Lucy::Search::Compiler: file: lib/Lucy/Search/Compiler.pm version: 0.003003 Lucy::Search::HitQueue: file: lib/Lucy/Search/HitQueue.pm version: 0.003003 Lucy::Search::Hits: file: lib/Lucy/Search/Hits.pm version: 0.003003 Lucy::Search::IndexSearcher: file: lib/Lucy/Search/IndexSearcher.pm version: 0.003003 Lucy::Search::LeafQuery: file: lib/Lucy/Search/LeafQuery.pm version: 0.003003 Lucy::Search::MatchAllQuery: file: lib/Lucy/Search/MatchAllQuery.pm version: 0.003003 Lucy::Search::MatchDoc: file: lib/Lucy/Search/MatchDoc.pm version: 0.003003 Lucy::Search::Matcher: file: lib/Lucy/Search/Matcher.pm version: 0.003003 Lucy::Search::NOTMatcher: file: lib/Lucy/Search/NOTMatcher.pm version: 0.003003 Lucy::Search::NOTQuery: file: lib/Lucy/Search/NOTQuery.pm version: 0.003003 Lucy::Search::NoMatchQuery: file: lib/Lucy/Search/NoMatchQuery.pm version: 0.003003 Lucy::Search::ORQuery: file: lib/Lucy/Search/ORQuery.pm version: 0.003003 Lucy::Search::ORScorer: file: lib/Lucy/Search/ORScorer.pm version: 0.003003 Lucy::Search::PhraseQuery: file: lib/Lucy/Search/PhraseQuery.pm version: 0.003003 Lucy::Search::PolyCompiler: file: lib/Lucy/Search/PolyCompiler.pm version: 0.003003 Lucy::Search::PolyQuery: file: lib/Lucy/Search/PolyQuery.pm version: 0.003003 Lucy::Search::PolySearcher: file: lib/Lucy/Search/PolySearcher.pm version: 0.003003 Lucy::Search::Query: file: lib/Lucy/Search/Query.pm version: 0.003003 Lucy::Search::QueryParser: file: lib/Lucy/Search/QueryParser.pm version: 0.003003 Lucy::Search::RangeQuery: file: lib/Lucy/Search/RangeQuery.pm version: 0.003003 Lucy::Search::RequiredOptionalMatcher: file: lib/Lucy/Search/RequiredOptionalMatcher.pm version: 0.003003 Lucy::Search::RequiredOptionalQuery: file: lib/Lucy/Search/RequiredOptionalQuery.pm version: 0.003003 Lucy::Search::Searcher: file: lib/Lucy/Search/Searcher.pm version: 0.003003 Lucy::Search::SortRule: file: lib/Lucy/Search/SortRule.pm version: 0.003003 Lucy::Search::SortSpec: file: lib/Lucy/Search/SortSpec.pm version: 0.003003 Lucy::Search::Span: file: lib/Lucy/Search/Span.pm version: 0.003003 Lucy::Search::TermQuery: file: lib/Lucy/Search/TermQuery.pm version: 0.003003 Lucy::Search::TopDocs: file: lib/Lucy/Search/TopDocs.pm version: 0.003003 Lucy::Simple: file: lib/Lucy/Simple.pm version: 0.003003 Lucy::Store::FSFileHandle: file: lib/Lucy/Store/FSFileHandle.pm version: 0.003003 Lucy::Store::FSFolder: file: lib/Lucy/Store/FSFolder.pm version: 0.003003 Lucy::Store::FileHandle: file: lib/Lucy/Store/FileHandle.pm version: 0.003003 Lucy::Store::Folder: file: lib/Lucy/Store/Folder.pm version: 0.003003 Lucy::Store::InStream: file: lib/Lucy/Store/InStream.pm version: 0.003003 Lucy::Store::Lock: file: lib/Lucy/Store/Lock.pm version: 0.003003 Lucy::Store::LockErr: file: lib/Lucy/Store/LockErr.pm version: 0.003003 Lucy::Store::LockFactory: file: lib/Lucy/Store/LockFactory.pm version: 0.003003 Lucy::Store::OutStream: file: lib/Lucy/Store/OutStream.pm version: 0.003003 Lucy::Store::RAMFile: file: lib/Lucy/Store/RAMFile.pm version: 0.003003 Lucy::Store::RAMFileHandle: file: lib/Lucy/Store/RAMFileHandle.pm version: 0.003003 Lucy::Store::RAMFolder: file: lib/Lucy/Store/RAMFolder.pm version: 0.003003 Lucy::Test: file: lib/Lucy/Test.pm version: 0.003003 Lucy::Test::TestCharmonizer: file: lib/Lucy/Test.pm version: 0.003003 Lucy::Test::Util::BBSortEx: file: lib/Lucy/Test/Util/BBSortEx.pm version: 0.003003 Lucy::Util::Debug: file: lib/Lucy/Util/Debug.pm version: 0.003003 Lucy::Util::IndexFileNames: file: lib/Lucy/Util/IndexFileNames.pm version: 0.003003 Lucy::Util::Json: file: lib/Lucy/Util/Json.pm version: 0.003003 Lucy::Util::MemoryPool: file: lib/Lucy/Util/MemoryPool.pm version: 0.003003 Lucy::Util::PriorityQueue: file: lib/Lucy/Util/PriorityQueue.pm version: 0.003003 Lucy::Util::SortExternal: file: lib/Lucy/Util/SortExternal.pm version: 0.003003 Lucy::Util::Stepper: file: lib/Lucy/Util/Stepper.pm version: 0.003003 Lucy::Util::StringHelper: file: lib/Lucy/Util/StringHelper.pm version: 0.003003 LucyX::Index::ByteBufDocReader: file: lib/LucyX/Index/ByteBufDocReader.pm version: 0.003003 LucyX::Index::ByteBufDocWriter: file: lib/LucyX/Index/ByteBufDocWriter.pm version: 0.003003 LucyX::Index::LongFieldSim: file: lib/LucyX/Index/LongFieldSim.pm version: 0.003003 LucyX::Index::ZlibDocReader: file: lib/LucyX/Index/ZlibDocReader.pm version: 0.003003 LucyX::Index::ZlibDocWriter: file: lib/LucyX/Index/ZlibDocWriter.pm version: 0.003003 LucyX::Remote::ClusterSearcher: file: lib/LucyX/Remote/ClusterSearcher.pm version: 0.003003 LucyX::Remote::SearchClient: file: lib/LucyX/Remote/SearchClient.pm version: 0.003003 LucyX::Remote::SearchServer: file: lib/LucyX/Remote/SearchServer.pm version: 0.003003 LucyX::Search::Filter: file: lib/LucyX/Search/Filter.pm version: 0.003003 LucyX::Search::FilterCompiler: file: lib/LucyX/Search/Filter.pm version: 0.003003 LucyX::Search::FilterMatcher: file: lib/LucyX/Search/Filter.pm version: 0.003003 LucyX::Search::MockMatcher: file: lib/LucyX/Search/MockMatcher.pm version: 0.003003 LucyX::Search::ProximityQuery: file: lib/LucyX/Search/ProximityQuery.pm version: 0.003003 requires: perl: v5.8.3 resources: license: http://apache.org/licenses/LICENSE-2.0 version: v0.3.3 liblucy-perl-0.3.3/NOTICE000066400000000000000000000002411233767526200150360ustar00rootroot00000000000000Apache Lucy Copyright 2013 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). liblucy-perl-0.3.3/README000066400000000000000000000003611233767526200150150ustar00rootroot00000000000000Apache Lucy =========== OVERVIEW The Apache Lucy search engine library provides full-text search for dynamic programming languages. INSTALLATION To build and install Lucy, follow the instructions in the accompanying "INSTALL" document. liblucy-perl-0.3.3/buildlib/000077500000000000000000000000001233767526200157235ustar00rootroot00000000000000liblucy-perl-0.3.3/buildlib/Lucy/000077500000000000000000000000001233767526200166375ustar00rootroot00000000000000liblucy-perl-0.3.3/buildlib/Lucy/Build.pm000066400000000000000000000645231233767526200202460ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use warnings; use lib '../clownfish/perl/blib/arch'; use lib '../clownfish/perl/blib/lib'; use lib 'clownfish/perl/blib/arch'; use lib 'clownfish/perl/blib/lib'; package Lucy::Build::CBuilder; BEGIN { our @ISA = "ExtUtils::CBuilder"; } use Config; our $VERSION = '0.003003'; $VERSION = eval $VERSION; my %cc; sub new { my ( $class, %args ) = @_; require ExtUtils::CBuilder; if ( $ENV{LUCY_VALGRIND} ) { $args{config} ||= {}; $args{config}{optimize} ||= $Config{optimize}; $args{config}{optimize} =~ s/\-O\d+/-O1/g; } my $self = $class->SUPER::new(%args); $cc{"$self"} = $args{'config'}->{'cc'}; return $self; } sub get_cc { $cc{"$_[0]"} } sub DESTROY { my $self = shift; delete $cc{"$self"}; } # This method isn't implemented by CBuilder for Windows, so we issue a basic # link command that works on at least one system and hope for the best. sub link_executable { my ( $self, %args ) = @_; if ( $self->get_cc eq 'cl' ) { my ( $objects, $exe_file ) = @args{qw( objects exe_file )}; $self->do_system("link /out:$exe_file @$objects"); return $exe_file; } else { return $self->SUPER::link_executable(%args); } } package Lucy::Build; use base qw( Module::Build ); our $VERSION = '0.003003'; $VERSION = eval $VERSION; use File::Spec::Functions qw( catdir catfile splitpath updir no_upwards rel2abs ); use File::Path qw( mkpath rmtree ); use File::Copy qw( copy move ); use File::Find qw( find ); use Config; use Env qw( @PATH ); use Fcntl; use Carp; use Cwd qw( getcwd ); BEGIN { unshift @PATH, rel2abs( getcwd() ) } sub extra_ccflags { my $self = shift; my $gcc_flags = '-std=gnu99 -D_GNU_SOURCE '; if ( $Config{osname} =~ /openbsd/i && !$Config{usethreads} ) { $gcc_flags .= '-DLUCY_NOTHREADS '; } if ( defined $ENV{LUCY_VALGRIND} ) { return "$gcc_flags -DLUCY_VALGRIND -fno-inline-functions "; } elsif ( defined $ENV{LUCY_DEBUG} ) { return "$gcc_flags -DLUCY_DEBUG -pedantic -Wall -Wextra " . "-Wno-variadic-macros "; } elsif ( $self->config('gccversion') ) { return $gcc_flags; } elsif ( $self->config('cc') =~ /^cl\b/ ) { # Compile as C++ under MSVC. return '/TP -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS '; } } =for Rationale When the distribution tarball for the Perl binding of Lucy is built, core/, charmonizer/, and any other needed files/directories are copied into the perl/ directory within the main Lucy directory. Then the distro is built from the contents of the perl/ directory, leaving out all the files in ruby/, etc. However, during development, the files are accessed from their original locations. =cut my $is_distro_not_devel = -e 'core'; my $base_dir = rel2abs( $is_distro_not_devel ? getcwd() : updir() ); my $CHARMONIZER_ORIG_DIR = catdir( $base_dir, 'charmonizer' ); my $CHARMONIZE_EXE_PATH = catfile( $CHARMONIZER_ORIG_DIR, "charmonize$Config{_exe}" ); my $CHARMONY_PATH = 'charmony.h'; my $LEMON_DIR = catdir( $base_dir, 'lemon' ); my $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" ); my $SNOWSTEM_SRC_DIR = catdir( $base_dir, qw( modules analysis snowstem source ) ); my $SNOWSTEM_INC_DIR = catdir( $SNOWSTEM_SRC_DIR, 'include' ); my $SNOWSTOP_SRC_DIR = catdir( $base_dir, qw( modules analysis snowstop source ) ); my $UCD_INC_DIR = catdir( $base_dir, qw( modules unicode ucd ) ); my $UTF8PROC_SRC_DIR = catdir( $base_dir, qw( modules unicode utf8proc ) ); my $UTF8PROC_C = catfile( $UTF8PROC_SRC_DIR, 'utf8proc.c' ); my $CORE_SOURCE_DIR = catdir( $base_dir, 'core' ); my $CLOWNFISH_DIR = catdir( $base_dir, 'clownfish', 'perl' ); my $CLOWNFISH_BUILD = catfile( $CLOWNFISH_DIR, 'Build' ); my $AUTOGEN_DIR = 'autogen'; my $XS_SOURCE_DIR = 'xs'; my $LIB_DIR = 'lib'; my $XS_FILEPATH = catfile( $LIB_DIR, "Lucy.xs" ); my $AUTOBIND_PM_PATH = catfile( $LIB_DIR, 'Lucy', 'Autobinding.pm' ); sub new { shift->SUPER::new( recursive_test_files => 1, @_ ) } sub _run_make { my ( $self, %params ) = @_; my @command = @{ $params{args} }; my $dir = $params{dir}; my $current_directory = getcwd(); chdir $dir if $dir; unshift @command, 'CC=' . $self->config('cc'); if ( $self->config('cc') =~ /^cl\b/ ) { unshift @command, "-f", "Makefile.MSVC"; } elsif ( $^O =~ /mswin/i ) { unshift @command, "-f", "Makefile.MinGW"; } unshift @command, "$Config{make}"; system(@command) and confess("$Config{make} failed"); chdir $current_directory if $dir; } # Build the charmonize executable. sub ACTION_charmonize { my $self = shift; print "Building $CHARMONIZE_EXE_PATH...\n\n"; $self->_run_make( dir => $CHARMONIZER_ORIG_DIR, args => [], ); } # Run the charmonize executable, creating the charmony.h file. sub ACTION_charmony { my $self = shift; $self->dispatch('charmonize'); return if $self->up_to_date( $CHARMONIZE_EXE_PATH, $CHARMONY_PATH ); print "\nWriting $CHARMONY_PATH...\n\n"; # Clean up after charmonize if it doesn't succeed on its own. $self->add_to_cleanup("_charm*"); $self->add_to_cleanup($CHARMONY_PATH); # Prepare arguments to charmonize. my $flags = $self->config('ccflags') . ' ' . $self->extra_ccflags; $flags =~ s/"/\\"/g; my @command = ( $CHARMONIZE_EXE_PATH, $self->config('cc'), $flags ); if ( $ENV{CHARM_VALGRIND} ) { unshift @command, "valgrind", "--leak-check=yes"; } print join( " ", @command ), $/; system(@command) and die "Failed to write $CHARMONY_PATH: $!"; } # Build the charmonizer tests. sub ACTION_charmonizer_tests { my $self = shift; $self->dispatch('charmony'); print "Building Charmonizer Tests...\n\n"; my $flags = join( " ", $self->config('ccflags'), $self->extra_ccflags, '-I' . rel2abs( getcwd() ) ); $flags =~ s/"/\\"/g; $self->_run_make( dir => $CHARMONIZER_ORIG_DIR, args => [ "DEFS=$flags", "tests" ], ); } # Build the Lemon parser generator. sub ACTION_lemon { my $self = shift; print "Building the Lemon parser generator...\n\n"; $self->_run_make( dir => $LEMON_DIR, args => [], ); } sub _compile_clownfish { my $self = shift; require Clownfish::CFC::Hierarchy; require Clownfish::CFC::Binding::Perl; require Clownfish::CFC::Binding::Perl::Class; # Compile Clownfish. my $hierarchy = Clownfish::CFC::Hierarchy->new( source => $CORE_SOURCE_DIR, dest => $AUTOGEN_DIR, ); $hierarchy->build; # Process all __BINDING__ blocks. my $pm_filepaths = $self->rscan_dir( $LIB_DIR, qr/\.pm$/ ); my @pm_filepaths_with_xs; for my $pm_filepath (@$pm_filepaths) { open( my $pm_fh, '<', $pm_filepath ) or die "Can't open '$pm_filepath': $!"; my $pm_content = do { local $/; <$pm_fh> }; my ($autobind_frag) = $pm_content =~ /^__BINDING__\s*(.*?)(?:^__\w+__|\Z)/sm; if ($autobind_frag) { push @pm_filepaths_with_xs, $pm_filepath; eval $autobind_frag; confess("Invalid __BINDING__ from $pm_filepath: $@") if $@; } } my $binding = Clownfish::CFC::Binding::Perl->new( parcel => 'Lucy', hierarchy => $hierarchy, lib_dir => $LIB_DIR, boot_class => 'Lucy', header => $self->autogen_header, footer => '', ); return ( $hierarchy, $binding, \@pm_filepaths_with_xs ); } sub ACTION_pod { my $self = shift; $self->dispatch("cfc"); $self->_write_pod(@_); } sub _write_pod { my ( $self, $binding ) = @_; if ( !$binding ) { ( undef, $binding ) = $self->_compile_clownfish; } my $pod_files = $binding->prepare_pod( lib_dir => $LIB_DIR ); print "Writing POD...\n"; while ( my ( $filepath, $pod ) = each %$pod_files ) { $self->add_to_cleanup($filepath); unlink $filepath; sysopen( my $pod_fh, $filepath, O_CREAT | O_EXCL | O_WRONLY ) or confess("Can't open '$filepath': $!"); print $pod_fh $pod; } } sub ACTION_cfc { my $self = shift; my $old_dir = getcwd(); chdir($CLOWNFISH_DIR); if ( !-f 'Build' ) { print "\nBuilding Clownfish compiler... \n"; system("$^X Build.PL"); system("$^X Build code"); print "\nFinished building Clownfish compiler.\n\n"; } chdir($old_dir); } sub ACTION_clownfish { my $self = shift; $self->dispatch('charmonizer_tests'); $self->dispatch('cfc'); # Create destination dir, copy xs helper files. if ( !-d $AUTOGEN_DIR ) { mkdir $AUTOGEN_DIR or die "Can't mkdir '$AUTOGEN_DIR': $!"; } $self->add_to_cleanup($AUTOGEN_DIR); my $pm_filepaths = $self->rscan_dir( $LIB_DIR, qr/\.pm$/ ); my $cfh_filepaths = $self->rscan_dir( $CORE_SOURCE_DIR, qr/\.cfh$/ ); # XXX joes thinks this is dubious # Don't bother parsing Clownfish files if everything's up to date. return if $self->up_to_date( [ @$cfh_filepaths, @$pm_filepaths ], [ $XS_FILEPATH, $AUTOGEN_DIR, ] ); # Write out all autogenerated files. print "Parsing Clownfish files...\n"; my ( $hierarchy, $perl_binding, $pm_filepaths_with_xs ) = $self->_compile_clownfish; require Clownfish::CFC::Binding::Core; my $core_binding = Clownfish::CFC::Binding::Core->new( hierarchy => $hierarchy, dest => $AUTOGEN_DIR, header => $self->autogen_header, footer => '', ); print "Writing Clownfish autogenerated files...\n"; my $modified = $core_binding->write_all_modified; if ($modified) { unlink('typemap'); print "Writing typemap...\n"; $self->add_to_cleanup('typemap'); $perl_binding->write_xs_typemap; } # Rewrite XS if either any .cfh files or relevant .pm files were modified. $modified ||= $self->up_to_date( \@$pm_filepaths_with_xs, $XS_FILEPATH ) ? 0 : 1; if ($modified) { $self->add_to_cleanup($XS_FILEPATH); $self->add_to_cleanup($AUTOBIND_PM_PATH); $perl_binding->write_boot; $perl_binding->write_bindings; $self->_write_pod($perl_binding); } # Touch autogenerated files in case the modifications were inconsequential # and didn't trigger a rewrite, so that we won't have to check them again # next pass. if (!$self->up_to_date( [ @$cfh_filepaths, @$pm_filepaths_with_xs ], $XS_FILEPATH ) ) { utime( time, time, $XS_FILEPATH ); # touch } if (!$self->up_to_date( [ @$cfh_filepaths, @$pm_filepaths_with_xs ], $AUTOGEN_DIR ) ) { utime( time, time, $AUTOGEN_DIR ); # touch } } # Write ppport.h, which supplies some XS routines not found in older Perls and # allows us to use more up-to-date XS API while still supporting Perls back to # 5.8.3. # # The Devel::PPPort docs recommend that we distribute ppport.h rather than # require Devel::PPPort itself, but ppport.h isn't compatible with the Apache # license. sub ACTION_ppport { my $self = shift; if ( !-e 'ppport.h' ) { require Devel::PPPort; $self->add_to_cleanup('ppport.h'); Devel::PPPort::WriteFile(); } } sub ACTION_suppressions { my $self = shift; my $LOCAL_SUPP = 'local.supp'; return if $self->up_to_date( '../devel/bin/valgrind_triggers.pl', $LOCAL_SUPP ); # Generate suppressions. print "Writing $LOCAL_SUPP...\n"; $self->add_to_cleanup($LOCAL_SUPP); my $command = "yes | " . $self->_valgrind_base_command . "--gen-suppressions=yes " . $self->perl . " ../devel/bin/valgrind_triggers.pl 2>&1"; my $suppressions = `$command`; $suppressions =~ s/^==.*?\n//mg; $suppressions =~ s/^--.*?\n//mg; my $rule_number = 1; while ( $suppressions =~ // ) { $suppressions =~ s/^\s*/{\n /m; $rule_number++; } # Change e.g. fun:_vgrZU_libcZdsoZa_calloc to fun:calloc $suppressions =~ s/fun:\w+_((m|c|re)alloc)/fun:$1/g; # Write local suppressions file. open( my $supp_fh, '>', $LOCAL_SUPP ) or confess("Can't open '$LOCAL_SUPP': $!"); print $supp_fh $suppressions; } sub _valgrind_base_command { return "PERL_DESTRUCT_LEVEL=2 LUCY_VALGRIND=1 valgrind " . "--leak-check=yes " . "--show-reachable=yes " . "--num-callers=10 " . "--dsymutil=yes " . "--suppressions=../devel/conf/lucyperl.supp "; } # Run the entire test suite under Valgrind. # # For this to work, Lucy must be compiled with the LUCY_VALGRIND environment # variable set to a true value, under a debugging Perl. # # A custom suppressions file will probably be needed -- use your judgment. # To pass in one or more local suppressions files, provide a comma separated # list like so: # # $ ./Build test_valgrind --suppressions=foo.supp,bar.supp sub ACTION_test_valgrind { my $self = shift; die "Must be run under a perl that was compiled with -DDEBUGGING" unless $self->config('ccflags') =~ /-D?DEBUGGING\b/; if ( !$ENV{LUCY_VALGRIND} ) { warn "\$ENV{LUCY_VALGRIND} not true -- possible false positives"; } $self->dispatch('code'); $self->dispatch('suppressions'); # Unbuffer STDOUT, grab test file names and suppressions files. $|++; my $t_files = $self->find_test_files; # not public M::B API, may fail my $valgrind_command = $self->_valgrind_base_command; $valgrind_command .= "--suppressions=local.supp "; if ( my $local_supp = $self->args('suppressions') ) { for my $supp ( split( ',', $local_supp ) ) { $valgrind_command .= "--suppressions=$supp "; } } # Iterate over test files. my @failed; for my $t_file (@$t_files) { # Run test file under Valgrind. print "Testing $t_file..."; die "Can't find '$t_file'" unless -f $t_file; my $command = "$valgrind_command $^X -Mblib $t_file 2>&1"; my $output = "\n" . ( scalar localtime(time) ) . "\n$command\n"; $output .= `$command`; # Screen-scrape Valgrind output, looking for errors and leaks. if ( $? or $output =~ /ERROR SUMMARY:\s+[^0\s]/ or $output =~ /definitely lost:\s+[^0\s]/ or $output =~ /possibly lost:\s+[^0\s]/ or $output =~ /still reachable:\s+[^0\s]/ ) { print " failed.\n"; push @failed, $t_file; print "$output\n"; } else { print " succeeded.\n"; } } # If there are failed tests, print a summary list. if (@failed) { print "\nFailed " . scalar @failed . "/" . scalar @$t_files . " test files:\n " . join( "\n ", @failed ) . "\n"; exit(1); } } # Run all .y files through lemon. sub ACTION_parsers { my $self = shift; $self->dispatch('lemon'); my $y_files = $self->rscan_dir( $CORE_SOURCE_DIR, qr/\.y$/ ); for my $y_file (@$y_files) { my $c_file = $y_file; my $h_file = $y_file; $c_file =~ s/\.y$/.c/ or die "no match"; $h_file =~ s/\.y$/.h/ or die "no match"; next if $self->up_to_date( $y_file, [ $c_file, $h_file ] ); $self->add_to_cleanup( $c_file, $h_file ); system( $LEMON_EXE_PATH, '-q', $y_file ) and die "lemon failed"; } } sub ACTION_compile_custom_xs { my $self = shift; $self->dispatch('ppport'); $self->dispatch('parsers'); require ExtUtils::ParseXS; my $cbuilder = Lucy::Build::CBuilder->new( config => { cc => $self->config('cc') }, ); my $archdir = catdir( $self->blib, 'arch', 'auto', 'Lucy', ); mkpath( $archdir, 0, 0777 ) unless -d $archdir; my @include_dirs = ( getcwd(), $CORE_SOURCE_DIR, $AUTOGEN_DIR, $XS_SOURCE_DIR, $SNOWSTEM_INC_DIR, $UCD_INC_DIR, $UTF8PROC_SRC_DIR ); my @objects; # Compile C source files. my $c_files = []; push @$c_files, @{ $self->rscan_dir( $CORE_SOURCE_DIR, qr/\.c$/ ) }; push @$c_files, @{ $self->rscan_dir( $XS_SOURCE_DIR, qr/\.c$/ ) }; push @$c_files, @{ $self->rscan_dir( $AUTOGEN_DIR, qr/\.c$/ ) }; push @$c_files, @{ $self->rscan_dir( $SNOWSTEM_SRC_DIR, qr/\.c$/ ) }; push @$c_files, @{ $self->rscan_dir( $SNOWSTOP_SRC_DIR, qr/\.c$/ ) }; push @$c_files, $UTF8PROC_C; for my $c_file (@$c_files) { my $o_file = $c_file; my $ccs_file = $c_file; $o_file =~ s/\.c$/$Config{_o}/ or die "no match"; $ccs_file =~ s/\.c$/.ccs/ or die "no match"; push @objects, $o_file; next if $self->up_to_date( $c_file, $o_file ); $self->add_to_cleanup($o_file); $self->add_to_cleanup($ccs_file); $cbuilder->compile( source => $c_file, extra_compiler_flags => $self->extra_ccflags, include_dirs => \@include_dirs, object_file => $o_file, ); } # .xs => .c my $perl_binding_c_file = catfile( $LIB_DIR, 'Lucy.c' ); $self->add_to_cleanup($perl_binding_c_file); if ( !$self->up_to_date( $XS_FILEPATH, $perl_binding_c_file ) ) { ExtUtils::ParseXS::process_file( filename => $XS_FILEPATH, prototypes => 0, output => $perl_binding_c_file, ); } # .c => .o my $version = $self->dist_version; my $perl_binding_o_file = catfile( $LIB_DIR, "Lucy$Config{_o}" ); unshift @objects, $perl_binding_o_file; $self->add_to_cleanup($perl_binding_o_file); if ( !$self->up_to_date( $perl_binding_c_file, $perl_binding_o_file ) ) { $cbuilder->compile( source => $perl_binding_c_file, extra_compiler_flags => $self->extra_ccflags, include_dirs => \@include_dirs, object_file => $perl_binding_o_file, # 'defines' is an undocumented parameter to compile(), so we # should officially roll our own variant and generate compiler # flags. However, that involves writing a bunch of # platform-dependent code, so we'll just take the chance that this # will break. defines => { VERSION => qq|"$version"|, XS_VERSION => qq|"$version"|, }, ); } # Create .bs bootstrap file, needed by Dynaloader. my $bs_file = catfile( $archdir, "Lucy.bs" ); $self->add_to_cleanup($bs_file); if ( !$self->up_to_date( $perl_binding_o_file, $bs_file ) ) { require ExtUtils::Mkbootstrap; ExtUtils::Mkbootstrap::Mkbootstrap($bs_file); if ( !-f $bs_file ) { # Create file in case Mkbootstrap didn't do anything. open( my $fh, '>', $bs_file ) or confess "Can't open $bs_file: $!"; } utime( (time) x 2, $bs_file ); # touch } # Clean up after CBuilder under MSVC. $self->add_to_cleanup('compilet*'); $self->add_to_cleanup('*.ccs'); $self->add_to_cleanup( catfile( 'lib', 'Lucy.ccs' ) ); $self->add_to_cleanup( catfile( 'lib', 'Lucy.def' ) ); $self->add_to_cleanup( catfile( 'lib', 'Lucy_def.old' ) ); $self->add_to_cleanup( catfile( 'lib', 'Lucy.exp' ) ); $self->add_to_cleanup( catfile( 'lib', 'Lucy.lib' ) ); $self->add_to_cleanup( catfile( 'lib', 'Lucy.lds' ) ); $self->add_to_cleanup( catfile( 'lib', 'Lucy.base' ) ); # .o => .(a|bundle) my $lib_file = catfile( $archdir, "Lucy.$Config{dlext}" ); if ( !$self->up_to_date( [ @objects, $AUTOGEN_DIR ], $lib_file ) ) { # TODO: use Charmonizer to determine whether pthreads are userland. my $link_flags = ''; if ( $Config{osname} =~ /openbsd/i && $Config{usethreads} ) { $link_flags = '-lpthread '; } $cbuilder->link( module_name => 'Lucy', objects => \@objects, lib_file => $lib_file, extra_linker_flags => $link_flags, ); } } sub ACTION_code { my $self = shift; $self->dispatch('clownfish'); $self->dispatch('compile_custom_xs'); $self->SUPER::ACTION_code; } sub autogen_header { my $self = shift; return <<"END_AUTOGEN"; /*********************************************** !!!! DO NOT EDIT !!!! This file was auto-generated by Build.PL. ***********************************************/ /* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ END_AUTOGEN } sub _check_module_build_for_dist { eval "use Module::Build 0.38;"; die "./Build dist reqiures Module::Build 0.38 or higher--this is only " . Module::Build->VERSION . $/ if $@; } sub ACTION_distdir { _check_module_build_for_dist; shift->SUPER::ACTION_distdir(@_); } sub ACTION_dist { my $self = shift; _check_module_build_for_dist; # Create POD but make sure not to include build artifacts. $self->dispatch('pod'); _clean_prereq_builds($self); # We build our Perl release tarball from $REPOS_ROOT/perl, rather than # from the top-level. # # Because some items we need are outside this directory, we need to copy a # bunch of stuff. After the tarball is packaged up, we delete the copied # directories. my @items_to_copy = qw( core modules charmonizer devel clownfish lemon CHANGES CONTRIBUTING LICENSE NOTICE README ); print "Copying files...\n"; for my $item (@items_to_copy) { confess("'$item' already exists") if -e $item; system("cp -R ../$item $item"); } $self->dispatch('manifest'); my $no_index = $self->_gen_pause_exclusion_list; $self->meta_add( { no_index => $no_index } ); $self->SUPER::ACTION_dist; # Clean up. print "Removing copied files...\n"; rmtree($_) for @items_to_copy; unlink("META.yml"); move( "MANIFEST.bak", "MANIFEST" ) or die "move() failed: $!"; } sub ACTION_distmeta { my $self = shift; $self->SUPER::ACTION_distmeta(@_); # Make sure everything has a version. require CPAN::Meta; my $v = version->new($self->dist_version); my $meta = CPAN::Meta->load_file('META.json'); my $provides = $meta->provides; while (my ($pkg, $data) = each %{ $provides }) { die "$pkg, defined in $data->{file}, has no version\n" unless $data->{version}; die "$pkg, defined in $data->{file}, is " . version->new($data->{version})->normal . " but should be " . $v->normal . "\n" unless $data->{version} == $v; } } # Generate a list of files for PAUSE, search.cpan.org, etc to ignore. sub _gen_pause_exclusion_list { my $self = shift; # Only exclude files that are actually on-board. open( my $man_fh, '<', 'MANIFEST' ) or die "Can't open MANIFEST: $!"; my @manifest_entries = <$man_fh>; chomp @manifest_entries; my @excluded_files; for my $entry (@manifest_entries) { # Allow README and Changes. next if $entry =~ m#^(README|Changes)#; # Allow public modules. if ( $entry =~ m#^(perl/)?lib\b.+\.(pm|pod)$# ) { open( my $fh, '<', $entry ) or die "Can't open '$entry': $!"; my $content = do { local $/; <$fh> }; next if $content =~ /=head1\s*NAME/; } # Disallow everything else. push @excluded_files, $entry; } # Exclude redacted modules. if ( eval { require "buildlib/Lucy/Redacted.pm" } ) { my @redacted = map { my @parts = split( /\W+/, $_ ); catfile( $LIB_DIR, @parts ) . '.pm' } Lucy::Redacted->redacted, Lucy::Redacted->hidden; push @excluded_files, @redacted; } my %uniquifier; @excluded_files = sort grep { !$uniquifier{$_}++ } @excluded_files; return { file => \@excluded_files }; } sub ACTION_semiclean { my $self = shift; print "Cleaning up most build files.\n"; my @candidates = grep { $_ !~ /(charmonizer|^_charm|charmony|charmonize|snowstem)/ } $self->cleanup; for my $path ( map { glob($_) } @candidates ) { next unless -e $path; rmtree($path); confess("Failed to remove '$path'") if -e $path; } } # Run the cleanup targets for independent prerequisite builds. sub _clean_prereq_builds { my $self = shift; if ( -e $CLOWNFISH_BUILD ) { my $old_dir = getcwd(); chdir $CLOWNFISH_DIR; system("$^X Build realclean") and die "Clownfish clean failed"; chdir $old_dir; } $self->_run_make( dir => $CHARMONIZER_ORIG_DIR, args => ['clean'] ); $self->_run_make( dir => $LEMON_DIR, args => ['clean'] ); } sub ACTION_clean { my $self = shift; _clean_prereq_builds($self); $self->SUPER::ACTION_clean; } 1; __END__ liblucy-perl-0.3.3/buildlib/Lucy/Redacted.pm000066400000000000000000000035501233767526200207130ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use warnings; package Lucy::Redacted; use Exporter; BEGIN { our @ISA = qw( Exporter ); our @EXPORT_OK = qw( list ); } our $VERSION = '0.003003'; $VERSION = eval $VERSION; # Return a partial list of Lucy classes which were once public but are # now either deprecated, removed, or moved. sub redacted { return qw( Lucy::Analysis::LCNormalizer Lucy::Analysis::Token Lucy::Analysis::TokenBatch Lucy::Index::Term Lucy::InvIndex Lucy::InvIndexer Lucy::QueryParser::QueryParser Lucy::Search::BooleanQuery Lucy::Search::QueryFilter Lucy::Search::SearchServer Lucy::Search::SearchClient ); } # Hide additional stuff from PAUSE and search.cpan.org. sub hidden { return qw( Lucy::Analysis::Inversion Lucy::Object::Num Lucy::Plan::Int32Type Lucy::Plan::Int64Type Lucy::Plan::Float32Type Lucy::Plan::Float64Type Lucy::Redacted Lucy::Test::Object::TestCharBuf Lucy::Test::TestUtils Lucy::Util::BitVector ); } 1; liblucy-perl-0.3.3/buildlib/Lucy/Test/000077500000000000000000000000001233767526200175565ustar00rootroot00000000000000liblucy-perl-0.3.3/buildlib/Lucy/Test/TestUtils.pm000066400000000000000000000175041233767526200220630ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use warnings; package Lucy::Test::TestUtils; use base qw( Exporter ); our $VERSION = '0.003003'; $VERSION = eval $VERSION; our @EXPORT_OK = qw( working_dir create_working_dir remove_working_dir create_index create_uscon_index test_index_loc persistent_test_index_loc init_test_index_loc get_uscon_docs utf8_test_strings test_analyzer doc_ids_from_td_coll modulo_set ); use Lucy; use Lucy::Test; use File::Spec::Functions qw( catdir catfile curdir ); use Encode qw( _utf8_off ); use File::Path qw( rmtree ); use Carp; my $working_dir = catfile( curdir(), 'lucy_test' ); # Return a directory within the system's temp directory where we will put all # testing scratch files. sub working_dir {$working_dir} sub create_working_dir { mkdir( $working_dir, 0700 ) or die "Can't mkdir '$working_dir': $!"; } # Verify that this user owns the working dir, then zap it. Returns true upon # success. sub remove_working_dir { return unless -d $working_dir; rmtree $working_dir; return 1; } # Return a location for a test index to be used by a single test file. If # the test file crashes it cannot clean up after itself, so we put the cleanup # routine in a single test file to be run at or near the end of the test # suite. sub test_index_loc { return catdir( $working_dir, 'test_index' ); } # Return a location for a test index intended to be shared by multiple test # files. It will be cleaned as above. sub persistent_test_index_loc { return catdir( $working_dir, 'persistent_test_index' ); } # Destroy anything left over in the test_index location, then create the # directory. Finally, return the path. sub init_test_index_loc { my $dir = test_index_loc(); rmtree $dir; die "Can't clean up '$dir'" if -e $dir; mkdir $dir or die "Can't mkdir '$dir': $!"; return $dir; } # Build a RAM index, using the supplied array of strings as source material. # The index will have a single field: "content". sub create_index { my $folder = Lucy::Store::RAMFolder->new; my $indexer = Lucy::Index::Indexer->new( index => $folder, schema => Lucy::Test::TestSchema->new, ); $indexer->add_doc( { content => $_ } ) for @_; $indexer->commit; return $folder; } # Slurp us constitition docs and build hashrefs. sub get_uscon_docs { my $uscon_dir = catdir( 'sample', 'us_constitution' ); opendir( my $uscon_dh, $uscon_dir ) or die "couldn't opendir '$uscon_dir': $!"; my @filenames = grep {/\.txt$/} sort readdir $uscon_dh; closedir $uscon_dh or die "couldn't closedir '$uscon_dir': $!"; my %docs; for my $filename (@filenames) { my $filepath = catfile( $uscon_dir, $filename ); open( my $fh, '<', $filepath ) or die "couldn't open file '$filepath': $!"; my $content = do { local $/; <$fh> }; $content =~ /\A(.+?)^\s+(.*)/ms or die "Can't extract title/bodytext from '$filepath'"; my $title = $1; my $bodytext = $2; $bodytext =~ s/\s+/ /sg; my $category = $filename =~ /art/ ? 'article' : $filename =~ /amend/ ? 'amendment' : $filename =~ /preamble/ ? 'preamble' : confess "Can't derive category for $filename"; $docs{$filename} = { title => $title, bodytext => $bodytext, url => "/us_constitution/$filename", category => $category, }; } return \%docs; } sub _uscon_schema { my $schema = Lucy::Plan::Schema->new; my $analyzer = Lucy::Analysis::EasyAnalyzer->new( language => 'en' ); my $title_type = Lucy::Plan::FullTextType->new( analyzer => $analyzer, ); my $content_type = Lucy::Plan::FullTextType->new( analyzer => $analyzer, highlightable => 1, ); my $url_type = Lucy::Plan::StringType->new( indexed => 0, ); my $cat_type = Lucy::Plan::StringType->new; $schema->spec_field( name => 'title', type => $title_type ); $schema->spec_field( name => 'content', type => $content_type ); $schema->spec_field( name => 'url', type => $url_type ); $schema->spec_field( name => 'category', type => $cat_type ); return $schema; } sub create_uscon_index { my $folder = Lucy::Store::FSFolder->new( path => persistent_test_index_loc() ); my $indexer = Lucy::Index::Indexer->new( schema => _uscon_schema(), index => $folder, truncate => 1, create => 1, ); $indexer->add_doc( { content => "zz$_" } ) for ( 0 .. 10000 ); $indexer->commit; undef $indexer; $indexer = Lucy::Index::Indexer->new( index => $folder ); my $source_docs = get_uscon_docs(); $indexer->add_doc( { content => $_->{bodytext} } ) for values %$source_docs; $indexer->commit; undef $indexer; $indexer = Lucy::Index::Indexer->new( index => $folder ); my @chars = ( 'a' .. 'z' ); for ( 0 .. 1000 ) { my $content = ''; for my $num_words ( 1 .. int( rand(20) ) ) { for ( 1 .. ( int( rand(10) ) + 10 ) ) { $content .= @chars[ rand(@chars) ]; } $content .= ' '; } $indexer->add_doc( { content => $content } ); } $indexer->optimize; $indexer->commit; } # Return 3 strings useful for verifying UTF-8 integrity. sub utf8_test_strings { my $smiley = "\x{263a}"; my $not_a_smiley = $smiley; _utf8_off($not_a_smiley); my $frowny = $not_a_smiley; utf8::upgrade($frowny); return ( $smiley, $not_a_smiley, $frowny ); } # Verify an Analyzer's transform, transform_text, and split methods. sub test_analyzer { my ( $analyzer, $source, $expected, $message ) = @_; my $inversion = Lucy::Analysis::Inversion->new( text => $source ); $inversion = $analyzer->transform($inversion); my @got; while ( my $token = $inversion->next ) { push @got, $token->get_text; } Test::More::is_deeply( \@got, $expected, "analyze: $message" ); $inversion = $analyzer->transform_text($source); @got = (); while ( my $token = $inversion->next ) { push @got, $token->get_text; } Test::More::is_deeply( \@got, $expected, "transform_text: $message" ); @got = @{ $analyzer->split($source) }; Test::More::is_deeply( \@got, $expected, "split: $message" ); } # Extract all doc nums from a SortCollector. Return two sorted array refs: # by_score and by_id. sub doc_ids_from_td_coll { my $collector = shift; my @by_score; my $match_docs = $collector->pop_match_docs; my @by_score_then_id = map { $_->get_doc_id } sort { $b->get_score <=> $a->get_score || $a->get_doc_id <=> $b->get_doc_id } @$match_docs; my @by_id = sort { $a <=> $b } @by_score_then_id; return ( \@by_score_then_id, \@by_id ); } # Use a modulus to generate a set of numbers. sub modulo_set { my ( $interval, $max ) = @_; my @out; for ( my $doc = $interval; $doc < $max; $doc += $interval ) { push @out, $doc; } return \@out; } 1; __END__ liblucy-perl-0.3.3/charmonizer/000077500000000000000000000000001233767526200164565ustar00rootroot00000000000000liblucy-perl-0.3.3/charmonizer/Makefile000066400000000000000000000073701233767526200201250ustar00rootroot00000000000000# GENERATED BY gen_charmonizer_makefiles.pl: do not hand-edit!!! # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. CC= cc DEFS= CFLAGS= -Isrc $(DEFS) PROGNAME= charmonize TESTS= TestDirManip TestFuncMacro TestHeaders TestIntegers TestLargeFiles TestUnusedVars TestVariadicMacros OBJS= charmonize.o src/Charmonizer/Core/Compiler.o src/Charmonizer/Core/ConfWriter.o src/Charmonizer/Core/HeaderChecker.o src/Charmonizer/Core/OperatingSystem.o src/Charmonizer/Core/Util.o src/Charmonizer/Probe.o src/Charmonizer/Probe/AtomicOps.o src/Charmonizer/Probe/DirManip.o src/Charmonizer/Probe/Floats.o src/Charmonizer/Probe/FuncMacro.o src/Charmonizer/Probe/Headers.o src/Charmonizer/Probe/Integers.o src/Charmonizer/Probe/LargeFiles.o src/Charmonizer/Probe/Memory.o src/Charmonizer/Probe/UnusedVars.o src/Charmonizer/Probe/VariadicMacros.o TEST_OBJS= src/Charmonizer/Test.o src/Charmonizer/Test/TestDirManip.o src/Charmonizer/Test/TestFuncMacro.o src/Charmonizer/Test/TestHeaders.o src/Charmonizer/Test/TestIntegers.o src/Charmonizer/Test/TestLargeFiles.o src/Charmonizer/Test/TestUnusedVars.o src/Charmonizer/Test/TestVariadicMacros.o HEADERS= src/Charmonizer/Core/Compiler.h src/Charmonizer/Core/ConfWriter.h src/Charmonizer/Core/Defines.h src/Charmonizer/Core/HeaderChecker.h src/Charmonizer/Core/OperatingSystem.h src/Charmonizer/Core/Util.h src/Charmonizer/Probe.h src/Charmonizer/Probe/AtomicOps.h src/Charmonizer/Probe/DirManip.h src/Charmonizer/Probe/Floats.h src/Charmonizer/Probe/FuncMacro.h src/Charmonizer/Probe/Headers.h src/Charmonizer/Probe/Integers.h src/Charmonizer/Probe/LargeFiles.h src/Charmonizer/Probe/Memory.h src/Charmonizer/Probe/UnusedVars.h src/Charmonizer/Probe/VariadicMacros.h src/Charmonizer/Test.h CLEANABLE= $(OBJS) $(PROGNAME) $(TEST_OBJS) $(TESTS) .c.o: $(CC) $(CFLAGS) -c $*.c -o $@ all: $(PROGNAME) $(PROGNAME): $(OBJS) $(CC) $(CFLAGS) $(OBJS) -o $(PROGNAME) $(OBJS) $(TEST_OBJS): $(HEADERS) tests: $(TESTS) TestDirManip: src/Charmonizer/Test.o src/Charmonizer/Test/TestDirManip.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestDirManip.o src/Charmonizer/Test.o -o $@ TestFuncMacro: src/Charmonizer/Test.o src/Charmonizer/Test/TestFuncMacro.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestFuncMacro.o src/Charmonizer/Test.o -o $@ TestHeaders: src/Charmonizer/Test.o src/Charmonizer/Test/TestHeaders.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestHeaders.o src/Charmonizer/Test.o -o $@ TestIntegers: src/Charmonizer/Test.o src/Charmonizer/Test/TestIntegers.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestIntegers.o src/Charmonizer/Test.o -o $@ TestLargeFiles: src/Charmonizer/Test.o src/Charmonizer/Test/TestLargeFiles.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestLargeFiles.o src/Charmonizer/Test.o -o $@ TestUnusedVars: src/Charmonizer/Test.o src/Charmonizer/Test/TestUnusedVars.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestUnusedVars.o src/Charmonizer/Test.o -o $@ TestVariadicMacros: src/Charmonizer/Test.o src/Charmonizer/Test/TestVariadicMacros.o $(CC) $(CFLAGS) src/Charmonizer/Test/TestVariadicMacros.o src/Charmonizer/Test.o -o $@ clean: rm -f $(CLEANABLE) liblucy-perl-0.3.3/charmonizer/Makefile.MSVC000066400000000000000000000077741233767526200207040ustar00rootroot00000000000000# GENERATED BY gen_charmonizer_makefiles.pl: do not hand-edit!!! # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. CC= cl DEFS= CFLAGS= -Isrc $(DEFS) -nologo -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS PROGNAME= charmonize.exe TESTS= TestDirManip.exe TestFuncMacro.exe TestHeaders.exe TestIntegers.exe TestLargeFiles.exe TestUnusedVars.exe TestVariadicMacros.exe OBJS= charmonize.obj src\Charmonizer\Core\Compiler.obj src\Charmonizer\Core\ConfWriter.obj src\Charmonizer\Core\HeaderChecker.obj src\Charmonizer\Core\OperatingSystem.obj src\Charmonizer\Core\Util.obj src\Charmonizer\Probe.obj src\Charmonizer\Probe\AtomicOps.obj src\Charmonizer\Probe\DirManip.obj src\Charmonizer\Probe\Floats.obj src\Charmonizer\Probe\FuncMacro.obj src\Charmonizer\Probe\Headers.obj src\Charmonizer\Probe\Integers.obj src\Charmonizer\Probe\LargeFiles.obj src\Charmonizer\Probe\Memory.obj src\Charmonizer\Probe\UnusedVars.obj src\Charmonizer\Probe\VariadicMacros.obj TEST_OBJS= src\Charmonizer\Test.obj src\Charmonizer\Test\TestDirManip.obj src\Charmonizer\Test\TestFuncMacro.obj src\Charmonizer\Test\TestHeaders.obj src\Charmonizer\Test\TestIntegers.obj src\Charmonizer\Test\TestLargeFiles.obj src\Charmonizer\Test\TestUnusedVars.obj src\Charmonizer\Test\TestVariadicMacros.obj HEADERS= src\Charmonizer\Core\Compiler.h src\Charmonizer\Core\ConfWriter.h src\Charmonizer\Core\Defines.h src\Charmonizer\Core\HeaderChecker.h src\Charmonizer\Core\OperatingSystem.h src\Charmonizer\Core\Util.h src\Charmonizer\Probe.h src\Charmonizer\Probe\AtomicOps.h src\Charmonizer\Probe\DirManip.h src\Charmonizer\Probe\Floats.h src\Charmonizer\Probe\FuncMacro.h src\Charmonizer\Probe\Headers.h src\Charmonizer\Probe\Integers.h src\Charmonizer\Probe\LargeFiles.h src\Charmonizer\Probe\Memory.h src\Charmonizer\Probe\UnusedVars.h src\Charmonizer\Probe\VariadicMacros.h src\Charmonizer\Test.h CLEANABLE= $(OBJS) $(PROGNAME) $(TEST_OBJS) $(TESTS) *.pdb .c.obj: $(CC) $(CFLAGS) -c $< -Fo$@ all: $(PROGNAME) $(PROGNAME): $(OBJS) link -nologo $(OBJS) /OUT:$(PROGNAME) $(OBJS) $(TEST_OBJS): $(HEADERS) tests: $(TESTS) TestDirManip.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestDirManip.obj link -nologo src\Charmonizer\Test\TestDirManip.obj src\Charmonizer\Test.obj /OUT:$@ TestFuncMacro.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestFuncMacro.obj link -nologo src\Charmonizer\Test\TestFuncMacro.obj src\Charmonizer\Test.obj /OUT:$@ TestHeaders.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestHeaders.obj link -nologo src\Charmonizer\Test\TestHeaders.obj src\Charmonizer\Test.obj /OUT:$@ TestIntegers.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestIntegers.obj link -nologo src\Charmonizer\Test\TestIntegers.obj src\Charmonizer\Test.obj /OUT:$@ TestLargeFiles.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestLargeFiles.obj link -nologo src\Charmonizer\Test\TestLargeFiles.obj src\Charmonizer\Test.obj /OUT:$@ TestUnusedVars.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestUnusedVars.obj link -nologo src\Charmonizer\Test\TestUnusedVars.obj src\Charmonizer\Test.obj /OUT:$@ TestVariadicMacros.exe: src\Charmonizer\Test.obj src\Charmonizer\Test\TestVariadicMacros.obj link -nologo src\Charmonizer\Test\TestVariadicMacros.obj src\Charmonizer\Test.obj /OUT:$@ clean: CMD /c FOR %i IN ($(CLEANABLE)) DO IF EXIST %i DEL /F %i liblucy-perl-0.3.3/charmonizer/Makefile.MinGW000066400000000000000000000075331233767526200211060ustar00rootroot00000000000000# GENERATED BY gen_charmonizer_makefiles.pl: do not hand-edit!!! # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. CC= gcc DEFS= CFLAGS= -Isrc $(DEFS) PROGNAME= charmonize.exe TESTS= TestDirManip.exe TestFuncMacro.exe TestHeaders.exe TestIntegers.exe TestLargeFiles.exe TestUnusedVars.exe TestVariadicMacros.exe OBJS= charmonize.o src\Charmonizer\Core\Compiler.o src\Charmonizer\Core\ConfWriter.o src\Charmonizer\Core\HeaderChecker.o src\Charmonizer\Core\OperatingSystem.o src\Charmonizer\Core\Util.o src\Charmonizer\Probe.o src\Charmonizer\Probe\AtomicOps.o src\Charmonizer\Probe\DirManip.o src\Charmonizer\Probe\Floats.o src\Charmonizer\Probe\FuncMacro.o src\Charmonizer\Probe\Headers.o src\Charmonizer\Probe\Integers.o src\Charmonizer\Probe\LargeFiles.o src\Charmonizer\Probe\Memory.o src\Charmonizer\Probe\UnusedVars.o src\Charmonizer\Probe\VariadicMacros.o TEST_OBJS= src\Charmonizer\Test.o src\Charmonizer\Test\TestDirManip.o src\Charmonizer\Test\TestFuncMacro.o src\Charmonizer\Test\TestHeaders.o src\Charmonizer\Test\TestIntegers.o src\Charmonizer\Test\TestLargeFiles.o src\Charmonizer\Test\TestUnusedVars.o src\Charmonizer\Test\TestVariadicMacros.o HEADERS= src\Charmonizer\Core\Compiler.h src\Charmonizer\Core\ConfWriter.h src\Charmonizer\Core\Defines.h src\Charmonizer\Core\HeaderChecker.h src\Charmonizer\Core\OperatingSystem.h src\Charmonizer\Core\Util.h src\Charmonizer\Probe.h src\Charmonizer\Probe\AtomicOps.h src\Charmonizer\Probe\DirManip.h src\Charmonizer\Probe\Floats.h src\Charmonizer\Probe\FuncMacro.h src\Charmonizer\Probe\Headers.h src\Charmonizer\Probe\Integers.h src\Charmonizer\Probe\LargeFiles.h src\Charmonizer\Probe\Memory.h src\Charmonizer\Probe\UnusedVars.h src\Charmonizer\Probe\VariadicMacros.h src\Charmonizer\Test.h CLEANABLE= $(OBJS) $(PROGNAME) $(TEST_OBJS) $(TESTS) .c.o: $(CC) $(CFLAGS) -c $*.c -o $@ all: $(PROGNAME) $(PROGNAME): $(OBJS) $(CC) $(CFLAGS) $(OBJS) -o $(PROGNAME) $(OBJS) $(TEST_OBJS): $(HEADERS) tests: $(TESTS) TestDirManip.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestDirManip.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestDirManip.o src\Charmonizer\Test.o -o $@ TestFuncMacro.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestFuncMacro.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestFuncMacro.o src\Charmonizer\Test.o -o $@ TestHeaders.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestHeaders.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestHeaders.o src\Charmonizer\Test.o -o $@ TestIntegers.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestIntegers.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestIntegers.o src\Charmonizer\Test.o -o $@ TestLargeFiles.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestLargeFiles.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestLargeFiles.o src\Charmonizer\Test.o -o $@ TestUnusedVars.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestUnusedVars.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestUnusedVars.o src\Charmonizer\Test.o -o $@ TestVariadicMacros.exe: src\Charmonizer\Test.o src\Charmonizer\Test\TestVariadicMacros.o $(CC) $(CFLAGS) src\Charmonizer\Test\TestVariadicMacros.o src\Charmonizer\Test.o -o $@ clean: CMD /c FOR %i IN ($(CLEANABLE)) DO IF EXIST %i DEL /F %i liblucy-perl-0.3.3/charmonizer/README000066400000000000000000000076731233767526200173530ustar00rootroot00000000000000NAME Charmonizer - Use C to configure C. OVERVIEW Charmonizer is a tool for probing, normalizing, and testing the build environment provided by a C compiler and an operating system. It works by attempting to compile lots of little programs and analyzing the output from those that build successfully. ` Charmonizer modules are ordinary ANSI C files, and the configuration application that you write is an ordinary C executable. REQUIREMENTS Charmonizer's only prerequisite is an ISO C90-compliant compiler which can be invoked from C via the system() command. The build system assumes you have a corresponding make or nmake executable. Folks hacking on the Charmonizer source need to be aware of ../devel/bin/gen_charmonizer_makefiles.pl which generates the makefiles from the src tree. PROBING #include "Charmonizer/Probe.h" #include "Charmonizer/Probe/Integers.h" #include "Charmonizer/Probe/LargeFiles.h" int main() { /* Tell Charmonizer about your OS and compiler. */ chaz_Probe_init("cc", "-I/usr/local/include", NULL); /* Run desired Charmonizer modules. */ chaz_Integers_run(); chaz_LargeFiles_run(); /* Tear down. */ chaz_Probe_clean_up(); return 0; } The purpose of Charmonizer's probing toolset is to generate a single C header file called "charmony.h", gathering together information that is ordinarily only available at runtime and assigning predictable names to functionality which may go by many different aliases on different systems. One header file, "Charmonizer/Probe.h", provides the primary interface and a suite of topically oriented modules -- e.g. "Charmonizer/Probe/LargeFiles.h", "Charmonizer/Probe/Integers.h" -- do the heavy lifting. Each topical module exports 1 main function, ModuleName_run(), which runs all the relevant compiler probes and appends output to charmony.h. As you run each module in turn, "charmony.h" gets built up incrementally; it can be further customized by writing your own content to it at any point. TESTING #include "Charmonizer/Test.h" #include "Charmonizer/Test/Integers.h" #include "Charmonizer/Test/Largefile.h" #include "MyTest.h" int main() { int all_tests_pass = 0; /* Set up. */ chaz_Test_init(); chaz_Integers_init_test(); chaz_LargeFiles_init_test(); MyTest_init_test(); /* Run all the tests */ all_tests_pass = chaz_Test_run_all_tests(); /* Tear down. */ chaz_Test_clean_up(); return all_tests_pass; } Charmonizer provides both a general test harness for writing your own tests, and a corresponding test module for each probing module. The stock tests can be found within "Charmonizer/Test" -- e.g. at "Charmonizer/Test/Integers.h". The stock tests require access to "charmony.h". Not all tests will pass in every environment, and the expectation is that you will append charmony.h with ifdef tests as necessary to draw in supplementary code: #ifndef HAS_DIRENT_H #include "my/dirent.h" #endif Charmonizer restricts itself to working with what it finds, and does not supply a library of compatibility functions. C NAMESPACE The "charmony.h" header prepends a prefix onto most of the symbols it exports: either "chy_" or "CHY_". For public code, such as header files, this helps avoid namespace collisions. For private code, the prefixes can be stripped via the CHY_USE_SHORT_NAMES symbol. #define CHY_USE_SHORT_NAMES #ifdef HAS_LONG_LONG /* alias for CHY_HAS_LONG_LONG */ FILESYSTEM NAMESPACE Charmonizer creates a number of temporary files within the current working directory while it runs. These files all begin with "_charm". liblucy-perl-0.3.3/charmonizer/charmonize.c000066400000000000000000000057441233767526200207730ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonize.c -- Create Charmony. */ #include #include #include #include "Charmonizer/Probe.h" #include "Charmonizer/Probe/AtomicOps.h" #include "Charmonizer/Probe/DirManip.h" #include "Charmonizer/Probe/Floats.h" #include "Charmonizer/Probe/FuncMacro.h" #include "Charmonizer/Probe/Headers.h" #include "Charmonizer/Probe/Integers.h" #include "Charmonizer/Probe/LargeFiles.h" #include "Charmonizer/Probe/Memory.h" #include "Charmonizer/Probe/UnusedVars.h" #include "Charmonizer/Probe/VariadicMacros.h" #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/ConfWriter.h" int main(int argc, char **argv) { /* Parse and process arguments. */ if (argc != 3) { fprintf(stderr, "Usage: ./charmonize CC_COMMAND CC_FLAGS\n"); exit(1); } else { char *cc_command = argv[1]; char *cc_flags = argv[2]; chaz_Probe_init(cc_command, cc_flags, NULL); } /* Run probe modules. */ chaz_DirManip_run(); chaz_Headers_run(); chaz_AtomicOps_run(); chaz_FuncMacro_run(); chaz_Integers_run(); chaz_Floats_run(); chaz_LargeFiles_run(); chaz_Memory_run(); chaz_UnusedVars_run(); chaz_VariadicMacros_run(); /* Write custom postamble. */ chaz_ConfWriter_append_conf( "#ifdef CHY_HAS_SYS_TYPES_H\n" " #include \n" "#endif\n\n" ); chaz_ConfWriter_append_conf( "#ifdef CHY_HAS_STDARG_H\n" " #include \n" "#endif\n\n" ); chaz_ConfWriter_append_conf( "#ifdef CHY_HAS_ALLOCA_H\n" " #include \n" "#elif defined(CHY_HAS_MALLOC_H)\n" " #include \n" "#elif defined(CHY_ALLOCA_IN_STDLIB_H)\n" " #include \n" "#endif\n\n" ); chaz_ConfWriter_append_conf( "#ifdef CHY_HAS_WINDOWS_H\n" " /* Target Windows XP. */\n" " #ifndef WINVER\n" " #define WINVER 0x0500\n" " #endif\n" " #ifndef _WIN32_WINNT\n" " #define _WIN32_WINNT 0x0500\n" " #endif\n" "#endif\n\n" ); /* Clean up. */ chaz_Probe_clean_up(); return 0; } liblucy-perl-0.3.3/charmonizer/src/000077500000000000000000000000001233767526200172455ustar00rootroot00000000000000liblucy-perl-0.3.3/charmonizer/src/Charmonizer/000077500000000000000000000000001233767526200215265ustar00rootroot00000000000000liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/000077500000000000000000000000001233767526200224165ustar00rootroot00000000000000liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/Compiler.c000066400000000000000000000231451233767526200243410ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include #include #include #include "Charmonizer/Core/Util.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/OperatingSystem.h" /* Temporary files. */ #define TRY_SOURCE_PATH "_charmonizer_try.c" #define TRY_BASENAME "_charmonizer_try" #define TARGET_PATH "_charmonizer_target" /* Static vars. */ static char *cc_command = NULL; static char *cc_flags = NULL; static char **inc_dirs = NULL; static char *try_exe_name = NULL; static char *try_obj_name = NULL; /* Detect a supported compiler, or assume a generic GCC-compatible compiler * and hope for the best. */ #ifdef __GNUC__ static const char *include_flag = "-I "; static const char *object_flag = "-o "; static const char *exe_flag = "-o "; #elif defined(_MSC_VER) static const char *include_flag = "/I"; static const char *object_flag = "/Fo"; static const char *exe_flag = "/Fe"; #else static const char *include_flag = "-I "; static const char *object_flag = "-o "; static const char *exe_flag = "-o "; #endif static void S_do_test_compile(void); void CC_init(const char *compiler_command, const char *compiler_flags) { const char *code = "int main() { return 0; }\n"; if (Util_verbosity) { printf("Creating compiler object...\n"); } /* Assign. */ cc_command = Util_strdup(compiler_command); cc_flags = Util_strdup(compiler_flags); /* Init. */ inc_dirs = (char**)calloc(sizeof(char*), 1); /* Add the current directory as an include dir. */ CC_add_inc_dir("."); /* Set names for the targets which we "try" to compile. */ { const char *exe_ext = OS_exe_ext(); const char *obj_ext = OS_obj_ext(); size_t exe_len = strlen(TRY_BASENAME) + strlen(exe_ext) + 1; size_t obj_len = strlen(TRY_BASENAME) + strlen(obj_ext) + 1; try_exe_name = (char*)malloc(exe_len); try_obj_name = (char*)malloc(obj_len); sprintf(try_exe_name, "%s%s", TRY_BASENAME, exe_ext); sprintf(try_obj_name, "%s%s", TRY_BASENAME, obj_ext); } /* If we can't compile anything, game over. */ if (Util_verbosity) { printf("Trying to compile a small test file...\n"); } if (!CC_test_compile(code, strlen(code))) { Util_die("Failed to compile a small test file"); } } void CC_clean_up(void) { char **dirs; for (dirs = inc_dirs; *dirs != NULL; dirs++) { free(*dirs); } free(inc_dirs); free(cc_command); free(cc_flags); free(try_obj_name); free(try_exe_name); } static char* S_inc_dir_string(void) { size_t needed = 0; char *inc_dir_string; char **dirs; for (dirs = inc_dirs; *dirs != NULL; dirs++) { needed += strlen(include_flag) + 2; needed += strlen(*dirs); } inc_dir_string = (char*)malloc(needed + 1); inc_dir_string[0] = '\0'; for (dirs = inc_dirs; *dirs != NULL; dirs++) { strcat(inc_dir_string, include_flag); strcat(inc_dir_string, *dirs); strcat(inc_dir_string, " "); } return inc_dir_string; } chaz_bool_t CC_compile_exe(const char *source_path, const char *exe_name, const char *code, size_t code_len) { const char *exe_ext = OS_exe_ext(); size_t exe_file_buf_size = strlen(exe_name) + strlen(exe_ext) + 1; char *exe_file = (char*)malloc(exe_file_buf_size); size_t junk_buf_size = exe_file_buf_size + 3; char *junk = (char*)malloc(junk_buf_size); size_t exe_file_buf_len = sprintf(exe_file, "%s%s", exe_name, exe_ext); char *inc_dir_string = S_inc_dir_string(); size_t command_max_size = strlen(cc_command) + strlen(source_path) + strlen(exe_flag) + exe_file_buf_len + strlen(inc_dir_string) + strlen(cc_flags) + 200; /* command start, _charm_run, etc. */ char *command = (char*)malloc(command_max_size); chaz_bool_t result; (void)code_len; /* Unused. */ /* Write the source file. */ Util_write_file(source_path, code); /* Prepare and run the compiler command. */ sprintf(command, "%s %s %s%s %s %s", cc_command, source_path, exe_flag, exe_file, inc_dir_string, cc_flags); if (Util_verbosity < 2) { OS_run_quietly(command); } else { system(command); } #ifdef _MSC_VER /* Zap MSVC junk. */ /* TODO: Key this off the compiler supplied as argument, not the compiler * used to compile Charmonizer. */ sprintf(junk, "%s.obj", exe_name); Util_remove_and_verify(junk); sprintf(junk, "%s.ilk", exe_name); Util_remove_and_verify(junk); sprintf(junk, "%s.pdb", exe_name); Util_remove_and_verify(junk); #endif /* See if compilation was successful. Remove the source file. */ result = Util_can_open_file(exe_file); if (!Util_remove_and_verify(source_path)) { Util_die("Failed to remove '%s'", source_path); } free(command); free(inc_dir_string); free(junk); free(exe_file); return result; } chaz_bool_t CC_compile_obj(const char *source_path, const char *obj_name, const char *code, size_t code_len) { const char *obj_ext = OS_obj_ext(); size_t obj_file_buf_size = strlen(obj_name) + strlen(obj_ext) + 1; char *obj_file = (char*)malloc(obj_file_buf_size); size_t obj_file_buf_len = sprintf(obj_file, "%s%s", obj_name, obj_ext); char *inc_dir_string = S_inc_dir_string(); size_t command_max_size = strlen(cc_command) + strlen(source_path) + strlen(object_flag) + obj_file_buf_len + strlen(inc_dir_string) + strlen(cc_flags) + 200; /* command start, _charm_run, etc. */ char *command = (char*)malloc(command_max_size); chaz_bool_t result; (void)code_len; /* Unused. */ /* Write the source file. */ Util_write_file(source_path, code); /* Prepare and run the compiler command. */ sprintf(command, "%s %s %s%s %s %s", cc_command, source_path, object_flag, obj_file, inc_dir_string, cc_flags); if (Util_verbosity < 2) { OS_run_quietly(command); } else { system(command); } /* See if compilation was successful. Remove the source file. */ result = Util_can_open_file(obj_file); if (!Util_remove_and_verify(source_path)) { Util_die("Failed to remove '%s'", source_path); } free(command); free(inc_dir_string); free(obj_file); return result; } chaz_bool_t CC_test_compile(const char *source, size_t source_len) { chaz_bool_t compile_succeeded; if (!Util_remove_and_verify(try_obj_name)) { Util_die("Failed to delete file '%s'", try_obj_name); } compile_succeeded = CC_compile_obj(TRY_SOURCE_PATH, TRY_BASENAME, source, source_len); Util_remove_and_verify(try_obj_name); return compile_succeeded; } char* CC_capture_output(const char *source, size_t source_len, size_t *output_len) { char *captured_output = NULL; chaz_bool_t compile_succeeded; /* Clear out previous versions and test to make sure removal worked. */ if (!Util_remove_and_verify(try_exe_name)) { Util_die("Failed to delete file '%s'", try_exe_name); } if (!Util_remove_and_verify(TARGET_PATH)) { Util_die("Failed to delete file '%s'", TARGET_PATH); } /* Attempt compilation; if successful, run app and slurp output. */ compile_succeeded = CC_compile_exe(TRY_SOURCE_PATH, TRY_BASENAME, source, source_len); if (compile_succeeded) { OS_run_local(try_exe_name, NULL); captured_output = Util_slurp_file(TARGET_PATH, output_len); } else { *output_len = 0; } /* Remove all the files we just created. */ Util_remove_and_verify(TRY_SOURCE_PATH); Util_remove_and_verify(try_exe_name); Util_remove_and_verify(TARGET_PATH); return captured_output; } void CC_add_inc_dir(const char *dir) { size_t num_dirs = 0; char **dirs = inc_dirs; /* Count up the present number of dirs, reallocate. */ while (*dirs++ != NULL) { num_dirs++; } num_dirs += 1; /* Passed-in dir. */ inc_dirs = (char**)realloc(inc_dirs, (num_dirs + 1) * sizeof(char*)); /* Put the passed-in dir at the end of the list. */ inc_dirs[num_dirs - 1] = Util_strdup(dir); inc_dirs[num_dirs] = NULL; } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/Compiler.h000066400000000000000000000054471233767526200243530ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Core/Compiler.h */ #ifndef H_CHAZ_COMPILER #define H_CHAZ_COMPILER #ifdef __cplusplus extern "C" { #endif #include #include "Charmonizer/Core/Defines.h" /* Attempt to compile and link an executable. Return true if the executable * file exists after the attempt. */ chaz_bool_t chaz_CC_compile_exe(const char *source_path, const char *exe_path, const char *code, size_t code_len); /* Attempt to compile an object file. Return true if the object file * exists after the attempt. */ chaz_bool_t chaz_CC_compile_obj(const char *source_path, const char *obj_path, const char *code, size_t code_len); /* Attempt to compile the supplied source code and return true if the * effort succeeds. */ chaz_bool_t chaz_CC_test_compile(const char *source, size_t source_len); /* Attempt to compile the supplied source code. If successful, capture the * output of the program and return a pointer to a newly allocated buffer. * If the compilation fails, return NULL. The length of the captured * output will be placed into the integer pointed to by [output_len]. */ char* chaz_CC_capture_output(const char *source, size_t source_len, size_t *output_len); /* Add an include directory which will be used for all future compilation * attempts. */ void chaz_CC_add_inc_dir(const char *dir); /** Initialize the compiler environment. */ void chaz_CC_init(const char *cc_command, const char *cc_flags); /* Clean up the environment. */ void chaz_CC_clean_up(void); #ifdef CHAZ_USE_SHORT_NAMES #define CC_compile_exe chaz_CC_compile_exe #define CC_compile_obj chaz_CC_compile_obj #define CC_add_inc_dir chaz_CC_add_inc_dir #define CC_clean_up chaz_CC_clean_up #define CC_test_compile chaz_CC_test_compile #define CC_capture_output chaz_CC_capture_output #define CC_init chaz_CC_init #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_COMPILER */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/ConfWriter.c000066400000000000000000000063171233767526200246530ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/Util.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/OperatingSystem.h" #include "Charmonizer/Core/Compiler.h" #include #include #include #include #include /* Static vars. */ static FILE *charmony_fh = NULL; void ConfWriter_init(void) { return; } void ConfWriter_open_charmony_h(const char *charmony_start) { /* Open the filehandle. */ charmony_fh = fopen("charmony.h", "w+"); if (charmony_fh == NULL) { Util_die("Can't open 'charmony.h': %s", strerror(errno)); } /* Print supplied text (if any) along with warning, open include guard. */ if (charmony_start != NULL) { fwrite(charmony_start, sizeof(char), strlen(charmony_start), charmony_fh); } fprintf(charmony_fh, "/* Header file auto-generated by Charmonizer. \n" " * DO NOT EDIT THIS FILE!!\n" " */\n\n" "#ifndef H_CHARMONY\n" "#define H_CHARMONY 1\n\n" ); } FILE* ConfWriter_get_charmony_fh(void) { return charmony_fh; } void ConfWriter_clean_up(void) { /* Write the last bit of charmony.h and close. */ fprintf(charmony_fh, "#endif /* H_CHARMONY */\n\n"); if (fclose(charmony_fh)) { Util_die("Couldn't close 'charmony.h': %s", strerror(errno)); } } void ConfWriter_append_conf(const char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(charmony_fh, fmt, args); va_end(args); } void ConfWriter_start_short_names(void) { ConfWriter_append_conf( "\n#if defined(CHY_USE_SHORT_NAMES) " "|| defined(CHAZ_USE_SHORT_NAMES)\n" ); } void ConfWriter_end_short_names(void) { ConfWriter_append_conf("#endif /* USE_SHORT_NAMES */\n"); } void ConfWriter_start_module(const char *module_name) { if (chaz_Util_verbosity > 0) { printf("Running %s module...\n", module_name); } ConfWriter_append_conf("\n/* %s */\n", module_name); } void ConfWriter_end_module(void) { ConfWriter_append_conf("\n"); } void ConfWriter_shorten_macro(const char *sym) { ConfWriter_append_conf(" #define %s CHY_%s\n", sym, sym); } void ConfWriter_shorten_typedef(const char *sym) { ConfWriter_append_conf(" #define %s chy_%s\n", sym, sym); } void ConfWriter_shorten_function(const char *sym) { ConfWriter_append_conf(" #define %s chy_%s\n", sym, sym); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/ConfWriter.h000066400000000000000000000070711233767526200246560ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Core/ConfWriter.h -- Write to a config file. */ #ifndef H_CHAZ_CONFWRITER #define H_CHAZ_CONFWRITER 1 #ifdef __cplusplus extern "C" { #endif #include #include #include "Charmonizer/Core/Defines.h" /* Initialize elements needed by ConfWriter. Must be called before anything * else, but after os and compiler are initialized. */ void chaz_ConfWriter_init(void); /* Open the charmony.h file handle. Print supplied text to it, if non-null. * Print an explanatory comment and open the include guard. */ void chaz_ConfWriter_open_charmony_h(const char *charmony_start); /* Return the config file's file handle. */ FILE* chaz_ConfWriter_get_charmony_fh(void); /* Close the include guard on charmony.h, then close the file. Delete temp * files and perform any other needed cleanup. */ void chaz_ConfWriter_clean_up(void); /* Print output to charmony.h. */ void chaz_ConfWriter_append_conf(const char *fmt, ...); /* Start a short names block. */ void chaz_ConfWriter_start_short_names(void); /* Close a short names block. */ void chaz_ConfWriter_end_short_names(void); /* Define a shortened version of a macro symbol (minus the "CHY_" prefix); */ void chaz_ConfWriter_shorten_macro(const char *symbol); /* Define a shortened version of a typedef symbol (minus the "chy_" prefix); */ void chaz_ConfWriter_shorten_typedef(const char *symbol); /* Define a shortened version of a function symbol (minus the "chy_" prefix); */ void chaz_ConfWriter_shorten_function(const char *symbol); /* Print a "chapter heading" comment in the conf file when starting a module. */ void chaz_ConfWriter_start_module(const char *module_name); /* Leave a little whitespace at the end of each module. */ void chaz_ConfWriter_end_module(void); #ifdef CHAZ_USE_SHORT_NAMES #define ConfWriter_init chaz_ConfWriter_init #define ConfWriter_open_charmony_h chaz_ConfWriter_open_charmony_h #define ConfWriter_get_charmony_fh chaz_ConfWriter_get_charmony_fh #define ConfWriter_clean_up chaz_ConfWriter_clean_up #define ConfWriter_build_charm_run chaz_ConfWriter_build_charm_run #define ConfWriter_start_module chaz_ConfWriter_start_module #define ConfWriter_end_module chaz_ConfWriter_end_module #define ConfWriter_start_short_names chaz_ConfWriter_start_short_names #define ConfWriter_end_short_names chaz_ConfWriter_end_short_names #define ConfWriter_append_conf chaz_ConfWriter_append_conf #define ConfWriter_shorten_macro chaz_ConfWriter_shorten_macro #define ConfWriter_shorten_typedef chaz_ConfWriter_shorten_typedef #define ConfWriter_shorten_function chaz_ConfWriter_shorten_function #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_CONFWRITER */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/Defines.h000066400000000000000000000023071233767526200241460ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Core/Defines.h -- Universal definitions. */ #ifndef H_CHAZ_DEFINES #define H_CHAZ_DEFINES 1 #ifdef __cplusplus extern "C" { #endif typedef int chaz_bool_t; #ifndef true #define true 1 #define false 0 #endif #define CHAZ_QUOTE(x) #x "\n" #if (defined(CHAZ_USE_SHORT_NAMES) || defined(CHY_USE_SHORT_NAMES)) #define QUOTE CHAZ_QUOTE #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_DEFINES */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/HeaderChecker.c000066400000000000000000000151041233767526200252400ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include #include typedef struct Header { const char *name; chaz_bool_t exists; } Header; /* "hello_world.c" without the hello or the world. */ static const char test_code[] = "int main() { return 0; }\n"; /* Keep a sorted, dynamically-sized array of names of all headers we've * checked for so far. */ static int cache_size = 0; static Header **header_cache = NULL; /* Comparison function to feed to qsort, bsearch, etc. */ static int S_compare_headers(const void *vptr_a, const void *vptr_b); /* Run a test compilation and return a new Header object encapsulating the * results. */ static Header* S_discover_header(const char *header_name); /* Extend the cache, add this Header object to it, and sort. */ static void S_add_to_cache(Header *header); /* Like add_to_cache, but takes a individual elements instead of a Header* and * checks if header exists in array first. */ static void S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists); void HeadCheck_init(void) { Header *null_header = (Header*)malloc(sizeof(Header)); /* Create terminating record for the dynamic array of Header objects. */ null_header->name = NULL; null_header->exists = false; header_cache = (Header**)malloc(sizeof(void*)); *header_cache = null_header; cache_size = 1; } chaz_bool_t HeadCheck_check_header(const char *header_name) { Header *header; Header key; Header *fake = &key; Header **header_ptr; /* Fake up a key to feed to bsearch; see if the header's already there. */ key.name = header_name; key.exists = false; header_ptr = (Header**)bsearch(&fake, header_cache, cache_size, sizeof(void*), S_compare_headers); /* If it's not there, go try a test compile. */ if (header_ptr == NULL) { header = S_discover_header(header_name); S_add_to_cache(header); } else { header = *header_ptr; } return header->exists; } chaz_bool_t HeadCheck_check_many_headers(const char **header_names) { chaz_bool_t success; int i; char *code_buf = Util_strdup(""); size_t needed = sizeof(test_code) + 20; /* Build the source code string. */ for (i = 0; header_names[i] != NULL; i++) { needed += strlen(header_names[i]); needed += sizeof("#include <>\n"); } code_buf = (char*)malloc(needed); code_buf[0] = '\0'; for (i = 0; header_names[i] != NULL; i++) { strcat(code_buf, "#include <"); strcat(code_buf, header_names[i]); strcat(code_buf, ">\n"); } strcat(code_buf, test_code); /* If the code compiles, bulk add all header names to the cache. */ success = CC_test_compile(code_buf, strlen(code_buf)); if (success) { for (i = 0; header_names[i] != NULL; i++) { S_maybe_add_to_cache(header_names[i], true); } } free(code_buf); return success; } static const char contains_code[] = QUOTE( #include ) QUOTE( %s ) QUOTE( int main() { return offsetof(%s, %s); } ); chaz_bool_t HeadCheck_contains_member(const char *struct_name, const char *member, const char *includes) { long needed = sizeof(contains_code) + strlen(struct_name) + strlen(member) + strlen(includes) + 10; char *buf = (char*)malloc(needed); chaz_bool_t retval; sprintf(buf, contains_code, includes, struct_name, member); retval = CC_test_compile(buf, strlen(buf)); free(buf); return retval; } static int S_compare_headers(const void *vptr_a, const void *vptr_b) { Header *const *const a = (Header*const*)vptr_a; Header *const *const b = (Header*const*)vptr_b; /* (NULL is "greater than" any string.) */ if ((*a)->name == NULL) { return 1; } else if ((*b)->name == NULL) { return -1; } else { return strcmp((*a)->name, (*b)->name); } } static Header* S_discover_header(const char *header_name) { Header* header = (Header*)malloc(sizeof(Header)); size_t needed = strlen(header_name) + sizeof(test_code) + 50; char *include_test = (char*)malloc(needed); /* Assign. */ header->name = Util_strdup(header_name); /* See whether code that tries to pull in this header compiles. */ sprintf(include_test, "#include <%s>\n%s", header_name, test_code); header->exists = CC_test_compile(include_test, strlen(include_test)); free(include_test); return header; } static void S_add_to_cache(Header *header) { /* Realloc array -- inefficient, but this isn't a bottleneck. */ cache_size++; header_cache = (Header**)realloc(header_cache, (cache_size * sizeof(void*))); header_cache[cache_size - 1] = header; /* Keep the list of headers sorted. */ qsort(header_cache, cache_size, sizeof(*header_cache), S_compare_headers); } static void S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists) { Header *header; Header key; Header *fake = &key; /* Fake up a key and bsearch for it. */ key.name = header_name; key.exists = exists; header = (Header*)bsearch(&fake, header_cache, cache_size, sizeof(void*), S_compare_headers); /* We've already done the test compile, so skip that step and add it. */ if (header == NULL) { header = (Header*)malloc(sizeof(Header)); header->name = Util_strdup(header_name); header->exists = exists; S_add_to_cache(header); } } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/HeaderChecker.h000066400000000000000000000041401233767526200252430ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/HeaderChecker.h */ #ifndef H_CHAZ_HEAD_CHECK #define H_CHAZ_HEAD_CHECK #ifdef __cplusplus extern "C" { #endif #include "Charmonizer/Core/Defines.h" /* Bootstrap the HeadCheck. Call this before anything else. */ void chaz_HeadCheck_init(void); /* Check for a particular header and return true if it's available. The * test-compile is only run the first time a given request is made. */ chaz_bool_t chaz_HeadCheck_check_header(const char *header_name); /* Attempt to compile a file which pulls in all the headers specified by name * in a null-terminated array. If the compile succeeds, add them all to the * internal register and return true. */ chaz_bool_t chaz_HeadCheck_check_many_headers(const char **header_names); /* Return true if the member is present in the struct. */ chaz_bool_t chaz_HeadCheck_contains_member(const char *struct_name, const char *member, const char *includes); #ifdef CHAZ_USE_SHORT_NAMES #define HeadCheck_init chaz_HeadCheck_init #define HeadCheck_contains_member chaz_HeadCheck_contains_member #define HeadCheck_check_header chaz_HeadCheck_check_header #define HeadCheck_check_many_headers chaz_HeadCheck_check_many_headers #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_HEAD_CHECK */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/OperatingSystem.c000066400000000000000000000136261233767526200257270ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include #include #include #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/OperatingSystem.h" static char dev_null[20] = ""; #ifdef _WIN32 #define SHELL_IS_CMD_EXE static const char *exe_ext = ".exe"; static const char *obj_ext = ".obj"; static const char *local_command_start = ".\\"; #else #define SHELL_IS_POSIX static const char *exe_ext = ""; static const char *obj_ext = ""; static const char *local_command_start = "./"; #endif static void S_probe_dev_null(void); /* Compile a small wrapper application which is used to redirect error output * to dev_null. */ static void S_build_charm_run(void); static chaz_bool_t charm_run_initialized = false; static chaz_bool_t charm_run_ok = false; void OS_init(void) { if (Util_verbosity) { printf("Initializing Charmonizer/Core/OperatingSystem...\n"); } S_probe_dev_null(); } static void S_probe_dev_null(void) { if (Util_verbosity) { printf("Trying to find a bit-bucket a la /dev/null...\n"); } #ifdef _WIN32 strcpy(dev_null, "nul"); #else { const char *const options[] = { "/dev/null", "/dev/nul", NULL }; int i; /* Iterate through names of possible devnulls trying to open them. */ for (i = 0; options[i] != NULL; i++) { if (Util_can_open_file(options[i])) { strcpy(dev_null, options[i]); return; } } /* Bail out because we couldn't find anything like /dev/null. */ Util_die("Couldn't find anything like /dev/null"); } #endif } const char* OS_exe_ext(void) { return exe_ext; } const char* OS_obj_ext(void) { return obj_ext; } const char* OS_dev_null(void) { return dev_null; } int OS_remove(const char *name) { /* * On Windows it can happen that another process, typically a * virus scanner, still has an open handle on the file. This can * make the subsequent recreation of a file with the same name * fail. As a workaround, files are renamed to a random name * before deletion. */ int retval; static const size_t num_random_chars = 16; size_t name_len = strlen(name); size_t i; char *temp_name = (char*)malloc(name_len + num_random_chars + 1); strcpy(temp_name, name); for (i = 0; i < num_random_chars; i++) { temp_name[name_len+i] = 'A' + rand() % 26; } temp_name[name_len+num_random_chars] = '\0'; if (rename(name, temp_name) == 0) { retval = !remove(temp_name); } else { // Error during rename, remove using old name. retval = !remove(name); } free(temp_name); return retval; } void OS_remove_exe(const char *name) { char *exe_name = (char*)malloc(strlen(name) + strlen(exe_ext) + 1); sprintf(exe_name, "%s%s", name, exe_ext); OS_remove(exe_name); free(exe_name); } void OS_remove_obj(const char *name) { char *obj_name = (char*)malloc(strlen(name) + strlen(obj_ext) + 1); sprintf(obj_name, "%s%s", name, obj_ext); OS_remove(obj_name); free(obj_name); } int OS_run_local(const char *arg1, ...) { va_list args; size_t len = strlen(local_command_start) + strlen(arg1); char *command = (char*)malloc(len + 1); int retval; char *arg; /* Append all supplied texts. */ sprintf(command, "%s%s", local_command_start, arg1); va_start(args, arg1); while (NULL != (arg = va_arg(args, char*))) { len += strlen(arg); command = (char*)realloc(command, len + 1); strcat(command, arg); } va_end(args); /* Run the command. */ retval = system(command); free(command); return retval; } int OS_run_quietly(const char *command) { int retval = 1; #ifdef _WIN32 char pattern[] = "%s > NUL 2> NUL"; size_t size = sizeof(pattern) + strlen(command) + 10; char *quiet_command = (char*)malloc(size); sprintf(quiet_command, pattern, command); #else char pattern[] = "%s > %s 2>&1"; size_t size = sizeof(pattern) + strlen(command) + strlen(dev_null) + 10; char *quiet_command = (char*)malloc(size); sprintf(quiet_command, pattern, command, dev_null); #endif retval = system(quiet_command); free(quiet_command); return retval; } void OS_mkdir(const char *filepath) { #if (defined(SHELL_IS_POSIX) || defined (SHELL_IS_CMD_EXE)) char *mkdir_command = "mkdir"; #endif unsigned size = strlen(mkdir_command) + 1 + strlen(filepath) + 1; char *command = (char*)malloc(size); sprintf(command, "%s %s", mkdir_command, filepath); OS_run_quietly(command); free(command); } void OS_rmdir(const char *filepath) { #ifdef SHELL_IS_POSIX char *rmdir_command = "rmdir"; #elif defined(SHELL_IS_CMD_EXE) char *rmdir_command = "rmdir /q"; #endif unsigned size = strlen(rmdir_command) + 1 + strlen(filepath) + 1; char *command = (char*)malloc(size); sprintf(command, "%s %s", rmdir_command, filepath); OS_run_quietly(command); free(command); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/OperatingSystem.h000066400000000000000000000060431233767526200257270ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Core/OperatingSystem.h - abstract an operating system down to a few * variables. */ #ifndef H_CHAZ_OPER_SYS #define H_CHAZ_OPER_SYS #ifdef __cplusplus extern "C" { #endif /* Safely remove a file named [name]. Needed because of Windows quirks. * Returns true on success, false on failure. */ int chaz_OS_remove(const char *name); /* Remove an executable file named [name], appending the exe_ext if needed. */ void chaz_OS_remove_exe(const char *name); /* Remove an object file named [name], appending the obj_ext if needed. */ void chaz_OS_remove_obj(const char *name); /* Concatenate all arguments in a NULL-terminated list into a single command * string, prepend the appropriate prefix, and invoke via system(). */ int chaz_OS_run_local(const char *arg1, ...); /* Invoke a command and attempt to suppress output from both stdout and stderr * (as if they had been sent to /dev/null). If it's not possible to run the * command quietly, run it anyway. */ int chaz_OS_run_quietly(const char *command); /* Attempt to create a directory. */ void chaz_OS_mkdir(const char *filepath); /* Attempt to remove a directory, which must be empty. */ void chaz_OS_rmdir(const char *filepath); /* Return the extension for an executable on this system. */ const char* chaz_OS_exe_ext(void); /* Return the extension for a compiled object on this system. */ const char* chaz_OS_obj_ext(void); /* Return the equivalent of /dev/null on this system. */ const char* chaz_OS_dev_null(void); /* Initialize the Charmonizer/Core/OperatingSystem module. */ void chaz_OS_init(void); #ifdef CHAZ_USE_SHORT_NAMES #define OS_remove chaz_OS_remove #define OS_remove_exe chaz_OS_remove_exe #define OS_remove_obj chaz_OS_remove_obj #define OS_run_local chaz_OS_run_local #define OS_run_quietly chaz_OS_run_quietly #define OS_mkdir chaz_OS_mkdir #define OS_rmdir chaz_OS_rmdir #define OS_exe_ext chaz_OS_exe_ext #define OS_obj_ext chaz_OS_obj_ext #define OS_dev_null chaz_OS_dev_null #define OS_init chaz_OS_init #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_COMPILER */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/Util.c000066400000000000000000000110011233767526200234700ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include #include #include #include #include "Charmonizer/Core/Util.h" #include "Charmonizer/Core/OperatingSystem.h" /* Global verbosity setting. */ int Util_verbosity = 1; void Util_write_file(const char *filename, const char *content) { FILE *fh = fopen(filename, "w+"); size_t content_len = strlen(content); if (fh == NULL) { Util_die("Couldn't open '%s': %s", filename, strerror(errno)); } fwrite(content, sizeof(char), content_len, fh); if (fclose(fh)) { Util_die("Error when closing '%s': %s", filename, strerror(errno)); } } char* Util_slurp_file(const char *file_path, size_t *len_ptr) { FILE *const file = fopen(file_path, "r"); char *contents; size_t len; long check_val; /* Sanity check. */ if (file == NULL) { Util_die("Error opening file '%s': %s", file_path, strerror(errno)); } /* Find length; return NULL if the file has a zero-length. */ len = Util_flength(file); if (len == 0) { *len_ptr = 0; return NULL; } /* Allocate memory and read the file. */ contents = (char*)malloc(len * sizeof(char) + 1); if (contents == NULL) { Util_die("Out of memory at %d, %s", __FILE__, __LINE__); } contents[len] = '\0'; check_val = fread(contents, sizeof(char), len, file); /* Weak error check, because CRLF might result in fewer chars read. */ if (check_val <= 0) { Util_die("Tried to read %d characters of '%s', got %d", (int)len, file_path, check_val); } /* Set length pointer for benefit of caller. */ *len_ptr = check_val; /* Clean up. */ if (fclose(file)) { Util_die("Error closing file '%s': %s", file_path, strerror(errno)); } return contents; } long Util_flength(void *file) { FILE *f = (FILE*)file; const long bookmark = ftell(f); long check_val; long len; /* Seek to end of file and check length. */ check_val = fseek(f, 0, SEEK_END); if (check_val == -1) { Util_die("fseek error : %s\n", strerror(errno)); } len = ftell(f); if (len == -1) { Util_die("ftell error : %s\n", strerror(errno)); } /* Return to where we were. */ check_val = fseek(f, bookmark, SEEK_SET); if (check_val == -1) { Util_die("fseek error : %s\n", strerror(errno)); } return len; } char* Util_strdup(const char *string) { size_t len = strlen(string); char *copy = (char*)malloc(len + 1); strncpy(copy, string, len); copy[len] = '\0'; return copy; } void Util_die(const char* format, ...) { va_list args; va_start(args, format); vfprintf(stderr, format, args); va_end(args); fprintf(stderr, "\n"); exit(1); } void Util_warn(const char* format, ...) { va_list args; va_start(args, format); vfprintf(stderr, format, args); va_end(args); fprintf(stderr, "\n"); } int Util_remove_and_verify(const char *file_path) { /* Attempt to delete the file. If it's gone after the attempt, return * success, whether or not it was there to begin with. * (ENOENT is POSIX not C89, but let's go with it for now.) */ int result = OS_remove(file_path); if (result || errno == ENOENT) { return 1; } /* Issue a warning and return failure. */ Util_warn("Failed to remove '%s': %s at %s line %d", file_path, strerror(errno), __FILE__, __LINE__); return 0; } int Util_can_open_file(const char *file_path) { FILE *garbage_fh; /* Use fopen as a portable test for the existence of a file. */ garbage_fh = fopen(file_path, "r"); if (garbage_fh == NULL) { return 0; } else { fclose(garbage_fh); return 1; } } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Core/Util.h000066400000000000000000000052001233767526200235010ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Chaz/Core/Util.h -- miscellaneous utilities. */ #ifndef H_CHAZ_UTIL #define H_CHAZ_UTIL 1 #ifdef __cplusplus extern "C" { #endif #include #include #include extern int chaz_Util_verbosity; /* Open a file (truncating if necessary) and write [content] to it. Util_die() if * an error occurs. */ void chaz_Util_write_file(const char *filename, const char *content); /* Read an entire file into memory. */ char* chaz_Util_slurp_file(const char *file_path, size_t *len_ptr); /* Return a newly allocated copy of a NULL-terminated string. */ char* chaz_Util_strdup(const char *string); /* Get the length of a file (may overshoot on text files under DOS). */ long chaz_Util_flength(void *file); /* Print an error message to stderr and exit. */ void chaz_Util_die(const char *format, ...); /* Print an error message to stderr. */ void chaz_Util_warn(const char *format, ...); /* Attept to delete a file. Return true if the file is gone, whether or not * it was there to begin with. Issue a warning and return false if the file * still exists. */ int chaz_Util_remove_and_verify(const char *file_path); /* Attempt to open a file for reading, then close it immediately. */ int chaz_Util_can_open_file(const char *file_path); #ifdef CHAZ_USE_SHORT_NAMES #define Util_verbosity chaz_Util_verbosity #define Util_write_file chaz_Util_write_file #define Util_slurp_file chaz_Util_slurp_file #define Util_flength chaz_Util_flength #define Util_die chaz_Util_die #define Util_warn chaz_Util_warn #define Util_strdup chaz_Util_strdup #define Util_remove_and_verify chaz_Util_remove_and_verify #define Util_can_open_file chaz_Util_can_open_file #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_UTIL */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe.c000066400000000000000000000053621233767526200227470ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include #include #include #include "Charmonizer/Probe.h" #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/OperatingSystem.h" /* Write the "_charm.h" file used by every probe. */ static void S_write_charm_h(void); static void S_remove_charm_h(void); void Probe_init(const char *cc_command, const char *cc_flags, const char *charmony_start) { /* Proces CHARM_VERBOSITY environment variable. */ const char *verbosity_env = getenv("CHARM_VERBOSITY"); if (verbosity_env && strlen(verbosity_env)) { Util_verbosity = strtol(verbosity_env, NULL, 10); } /* Dispatch other initializers. */ OS_init(); CC_init(cc_command, cc_flags); ConfWriter_init(); HeadCheck_init(); ConfWriter_open_charmony_h(charmony_start); S_write_charm_h(); if (Util_verbosity) { printf("Initialization complete.\n"); } } void Probe_clean_up(void) { if (Util_verbosity) { printf("Cleaning up...\n"); } /* Dispatch various clean up routines. */ S_remove_charm_h(); ConfWriter_clean_up(); CC_clean_up(); if (Util_verbosity) { printf("Cleanup complete.\n"); } } FILE* Probe_get_charmony_fh(void) { return ConfWriter_get_charmony_fh(); } static const char charm_h_code[] = QUOTE( #ifndef CHARM_H ) QUOTE( #define CHARM_H 1 ) QUOTE( #include ) QUOTE( #define Charm_Setup freopen("_charmonizer_target", "w", stdout) ) QUOTE( #endif ); static void S_write_charm_h(void) { Util_write_file("_charm.h", charm_h_code); } static void S_remove_charm_h(void) { Util_remove_and_verify("_charm.h"); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe.h000066400000000000000000000041351233767526200227510ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef H_CHAZ #define H_CHAZ 1 #ifdef __cplusplus extern "C" { #endif #include #include /* Set up the Charmonizer environment. This should be called before anything * else. * * If the environment variable CHARM_VERBOSITY has been set, it will be * processed at this time: * * 0 - silent * 1 - normal * 2 - debugging * * @param cc_command the string used to invoke the C compiler via system() * @param cc_flags flags which will be passed on to the C compiler * @param charmony_start Code to prepend onto the front of charmony.h */ void chaz_Probe_init(const char *cc_command, const char *cc_flags, const char *charmony_start); /* Clean up the Charmonizer environment -- deleting tempfiles, etc. This * should be called only after everything else finishes. */ void chaz_Probe_clean_up(void); /* Access the FILE* used to write charmony.h, so that you can write your own * content to it. Should not be called before chaz_Probe_init() or after * chaz_Probe_clean_up(). */ FILE* chaz_Probe_get_charmony_fh(void); #ifdef CHAZ_USE_SHORT_NAMES #define Probe_init chaz_Probe_init #define Probe_clean_up chaz_Probe_clean_up #define Probe_get_charmony_fh chaz_Probe_get_charmony_fh #endif #ifdef __cplusplus } #endif #endif /* Include guard. */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/000077500000000000000000000000001233767526200225755ustar00rootroot00000000000000liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/AtomicOps.c000066400000000000000000000066471233767526200246540ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/AtomicOps.h" #include #include #include static const char osatomic_casptr_code[] = QUOTE( #include ) QUOTE( #include ) QUOTE( int main() { ) QUOTE( int foo = 1; ) QUOTE( int *foo_ptr = &foo; ) QUOTE( int *target = NULL; ) QUOTE( OSAtomicCompareAndSwapPtr(NULL, foo_ptr, (void**)&target); ) QUOTE( return 0; ) QUOTE( } ); void AtomicOps_run(void) { chaz_bool_t has_libkern_osatomic_h = false; chaz_bool_t has_osatomic_cas_ptr = false; chaz_bool_t has_sys_atomic_h = false; chaz_bool_t has_intrin_h = false; ConfWriter_start_module("AtomicOps"); if (HeadCheck_check_header("libkern/OSAtomic.h")) { has_libkern_osatomic_h = true; ConfWriter_append_conf("#define CHY_HAS_LIBKERN_OSATOMIC_H\n"); /* Check for OSAtomicCompareAndSwapPtr, introduced in later versions * of OSAtomic.h. */ has_osatomic_cas_ptr = CC_test_compile(osatomic_casptr_code, strlen(osatomic_casptr_code)); if (has_osatomic_cas_ptr) { ConfWriter_append_conf("#define CHY_HAS_OSATOMIC_CAS_PTR\n"); } } if (HeadCheck_check_header("sys/atomic.h")) { has_sys_atomic_h = true; ConfWriter_append_conf("#define CHY_HAS_SYS_ATOMIC_H\n"); } if (HeadCheck_check_header("windows.h") && HeadCheck_check_header("intrin.h") ) { has_intrin_h = true; ConfWriter_append_conf("#define CHY_HAS_INTRIN_H\n"); } /* Shorten */ ConfWriter_start_short_names(); if (has_libkern_osatomic_h) { ConfWriter_shorten_macro("HAS_LIBKERN_OSATOMIC_H"); if (has_osatomic_cas_ptr) { ConfWriter_shorten_macro("HAS_OSATOMIC_CAS_PTR"); } } if (has_sys_atomic_h) { ConfWriter_shorten_macro("HAS_SYS_ATOMIC_H"); } if (has_intrin_h) { ConfWriter_shorten_macro("HAS_INTRIN_H"); } ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/AtomicOps.h000066400000000000000000000027651233767526200246560ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/AtomicOps.h */ #ifndef H_CHAZ_ATOMICOPS #define H_CHAZ_ATOMICOPS #ifdef __cplusplus extern "C" { #endif #include /* Run the AtomicOps module. * * These following symbols will be defined if the associated headers are * available: * * HAS_LIBKERN_OSATOMIC_H (Mac OS X) * HAS_SYS_ATOMIC_H (Solaris) * HAS_INTRIN_H (Windows) * * This symbol is defined if OSAtomicCompareAndSwapPtr is available: * * HAS_OSATOMIC_CAS_PTR */ void chaz_AtomicOps_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define AtomicOps_run chaz_AtomicOps_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_ATOMICOPS */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/DirManip.c000066400000000000000000000172641233767526200244560ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/OperatingSystem.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Probe/DirManip.h" #include #include #include static int mkdir_num_args = 0; static int mkdir_available = 0; static char mkdir_command_buf[7]; static char *mkdir_command = mkdir_command_buf; static int rmdir_available = 0; /* Source code for standard POSIX mkdir */ static const char posix_mkdir_code[] = QUOTE( #include <%s> ) QUOTE( int main(int argc, char **argv) { ) QUOTE( if (argc != 2) { return 1; } ) QUOTE( if (mkdir(argv[1], 0777) != 0) { return 2; } ) QUOTE( return 0; ) QUOTE( } ); /* Source code for Windows _mkdir. */ static const char win_mkdir_code[] = QUOTE( #include ) QUOTE( int main(int argc, char **argv) { ) QUOTE( if (argc != 2) { return 1; } ) QUOTE( if (_mkdir(argv[1]) != 0) { return 2; } ) QUOTE( return 0; ) QUOTE( } ); /* Source code for rmdir. */ static const char rmdir_code[] = QUOTE( #include <%s> ) QUOTE( int main(int argc, char **argv) { ) QUOTE( if (argc != 2) { return 1; } ) QUOTE( if (rmdir(argv[1]) != 0) { return 2; } ) QUOTE( return 0; ) QUOTE( } ); static chaz_bool_t S_compile_posix_mkdir(const char *header) { size_t needed = sizeof(posix_mkdir_code) + 30; char *code_buf = (char*)malloc(needed); /* Attempt compilation. */ sprintf(code_buf, posix_mkdir_code, header); mkdir_available = CC_test_compile(code_buf, strlen(code_buf)); /* Set vars on success. */ if (mkdir_available) { strcpy(mkdir_command, "mkdir"); if (strcmp(header, "direct.h") == 0) { mkdir_num_args = 1; } else { mkdir_num_args = 2; } } free(code_buf); return mkdir_available; } static chaz_bool_t S_compile_win_mkdir(void) { mkdir_available = CC_test_compile(win_mkdir_code, strlen(win_mkdir_code)); if (mkdir_available) { strcpy(mkdir_command, "_mkdir"); mkdir_num_args = 1; } return mkdir_available; } static void S_try_mkdir(void) { if (HeadCheck_check_header("windows.h")) { if (S_compile_win_mkdir()) { return; } if (S_compile_posix_mkdir("direct.h")) { return; } } if (S_compile_posix_mkdir("sys/stat.h")) { return; } } static chaz_bool_t S_compile_rmdir(const char *header) { size_t needed = sizeof(posix_mkdir_code) + 30; char *code_buf = (char*)malloc(needed); sprintf(code_buf, rmdir_code, header); rmdir_available = CC_test_compile(code_buf, strlen(code_buf)); free(code_buf); return rmdir_available; } static void S_try_rmdir(void) { if (S_compile_rmdir("unistd.h")) { return; } if (S_compile_rmdir("dirent.h")) { return; } if (S_compile_rmdir("direct.h")) { return; } } static const char cygwin_code[] = QUOTE(#ifndef __CYGWIN__ ) QUOTE( #error "Not Cygwin" ) QUOTE(#endif ) QUOTE(int main() { return 0; } ); void DirManip_run(void) { FILE *f; char dir_sep[3]; chaz_bool_t remove_zaps_dirs = false; chaz_bool_t has_dirent_h = HeadCheck_check_header("dirent.h"); chaz_bool_t has_direct_h = HeadCheck_check_header("direct.h"); chaz_bool_t has_dirent_d_namlen = false; chaz_bool_t has_dirent_d_type = false; ConfWriter_start_module("DirManip"); S_try_mkdir(); S_try_rmdir(); /* Header checks. */ if (has_dirent_h) { ConfWriter_append_conf("#define CHY_HAS_DIRENT_H\n"); } if (has_direct_h) { ConfWriter_append_conf("#define CHY_HAS_DIRECT_H\n"); } /* Check for members in struct dirent. */ if (has_dirent_h) { has_dirent_d_namlen = HeadCheck_contains_member( "struct dirent", "d_namlen", "#include \n#include " ); if (has_dirent_d_namlen) { ConfWriter_append_conf("#define CHY_HAS_DIRENT_D_NAMLEN\n", dir_sep); } has_dirent_d_type = HeadCheck_contains_member( "struct dirent", "d_type", "#include \n#include " ); if (has_dirent_d_type) { ConfWriter_append_conf("#define CHY_HAS_DIRENT_D_TYPE\n", dir_sep); } } if (mkdir_num_args == 2) { /* It's two args, but the command isn't "mkdir". */ ConfWriter_append_conf("#define chy_makedir(_dir, _mode) %s(_dir, _mode)\n", mkdir_command); ConfWriter_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 0\n"); } else if (mkdir_num_args == 1) { /* It's one arg... mode arg will be ignored. */ ConfWriter_append_conf("#define chy_makedir(_dir, _mode) %s(_dir)\n", mkdir_command); ConfWriter_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 1\n"); } if (CC_test_compile(cygwin_code, strlen(cygwin_code))) { strcpy(dir_sep, "/"); } else if (HeadCheck_check_header("windows.h")) { strcpy(dir_sep, "\\\\"); } else { strcpy(dir_sep, "/"); } ConfWriter_append_conf("#define CHY_DIR_SEP \"%s\"\n", dir_sep); /* See whether remove works on directories. */ OS_mkdir("_charm_test_remove_me"); if (0 == remove("_charm_test_remove_me")) { remove_zaps_dirs = true; ConfWriter_append_conf("#define CHY_REMOVE_ZAPS_DIRS\n"); } OS_rmdir("_charm_test_remove_me"); /* Shorten. */ ConfWriter_start_short_names(); ConfWriter_shorten_macro("DIR_SEP"); if (has_dirent_h) { ConfWriter_shorten_macro("HAS_DIRENT_H"); } if (has_direct_h) { ConfWriter_shorten_macro("HAS_DIRECT_H"); } if (has_dirent_d_namlen) { ConfWriter_shorten_macro("HAS_DIRENT_D_NAMLEN"); } if (has_dirent_d_type) { ConfWriter_shorten_macro("HAS_DIRENT_D_TYPE"); } ConfWriter_shorten_function("makedir"); ConfWriter_shorten_macro("MAKEDIR_MODE_IGNORED"); if (remove_zaps_dirs) { ConfWriter_shorten_macro("REMOVE_ZAPS_DIRS"); } ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/DirManip.h000066400000000000000000000036151233767526200244560ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/DirManip.h */ #ifndef H_CHAZ_DIRMANIP #define H_CHAZ_DIRMANIP #ifdef __cplusplus extern "C" { #endif /* The DirManip module exports or aliases symbols related to directory and file * manipulation. * * Defined if the header files dirent.h and direct.h are available, respectively: * * HAS_DIRENT_H * HAS_DIRECT_H * * Defined if struct dirent has these members. * * HAS_DIRENT_D_NAMLEN * HAS_DIRENT_D_TYPE * * The "makedir" macro will be aliased to the POSIX-specified two-argument * "mkdir" interface: * * makedir * * On some systems, the second argument to makedir will be ignored, in which * case this symbol will be true; otherwise, it will be false: (TODO: This * isn't verified and may sometimes be incorrect.) * * MAKEDIR_MODE_IGNORED * * String representing the system's directory separator: * * DIR_SEP * * True if the remove() function removes directories, false otherwise: * * REMOVE_ZAPS_DIRS */ void chaz_DirManip_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define DirManip_run chaz_DirManip_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_DIR_SEP */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Floats.c000066400000000000000000000046161233767526200242000ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/Floats.h" #include #include #include void Floats_run(void) { ConfWriter_start_module("Floats"); ConfWriter_append_conf( "typedef union { uint32_t i; float f; } chy_floatu32;\n" "typedef union { uint64_t i; double d; } chy_floatu64;\n" "static const chy_floatu32 chy_f32inf = {CHY_U32_C(0x7f800000)};\n" "static const chy_floatu32 chy_f32neginf = {CHY_U32_C(0xff800000)};\n" "static const chy_floatu32 chy_f32nan = {CHY_U32_C(0x7fc00000)};\n" "static const chy_floatu64 chy_f64inf = {CHY_U64_C(0x7ff0000000000000)};\n" "static const chy_floatu64 chy_f64neginf = {CHY_U64_C(0xfff0000000000000)};\n" "static const chy_floatu64 chy_f64nan = {CHY_U64_C(0x7ff8000000000000)};\n" "#define CHY_F32_INF (chy_f32inf.f)\n" "#define CHY_F32_NEGINF (chy_f32neginf.f)\n" "#define CHY_F32_NAN (chy_f32nan.f)\n" "#define CHY_F64_INF (chy_f64inf.d)\n" "#define CHY_F64_NEGINF (chy_f64neginf.d)\n" "#define CHY_F64_NAN (chy_f64nan.d)\n" ); /* Shorten. */ ConfWriter_start_short_names(); ConfWriter_shorten_macro("F32_INF"); ConfWriter_shorten_macro("F32_NEGINF"); ConfWriter_shorten_macro("F32_NAN"); ConfWriter_shorten_macro("F64_INF"); ConfWriter_shorten_macro("F64_NEGINF"); ConfWriter_shorten_macro("F64_NAN"); ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Floats.h000066400000000000000000000026111233767526200241760ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/Floats.h -- floating point types. * * The following symbols will be created if the platform supports IEEE 754 * floating point types: * * F32_NAN * F32_INF * F32_NEGINF * F64_NAN * F64_INF * F64_NEGINF * * TODO: Actually test to see whether IEEE 754 is supported, rather than just * lying about it. */ #ifndef H_CHAZ_FLOATS #define H_CHAZ_FLOATS #ifdef __cplusplus extern "C" { #endif /* Run the Floats module. */ void chaz_Floats_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define Floats_run chaz_Floats_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_FLOATS */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/FuncMacro.c000066400000000000000000000117011233767526200246160ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/FuncMacro.h" #include #include #include /* Code for verifying ISO func macro. */ static const char iso_func_code[] = QUOTE( #include "_charm.h" ) QUOTE( int main() { ) QUOTE( Charm_Setup; ) QUOTE( printf("%s", __func__); ) QUOTE( return 0; ) QUOTE( } ); /* Code for verifying GNU func macro. */ static const char gnuc_func_code[] = QUOTE( #include "_charm.h" ) QUOTE( int main() { ) QUOTE( Charm_Setup; ) QUOTE( printf("%s", __FUNCTION__); ) QUOTE( return 0; ) QUOTE( } ); /* Code for verifying inline keyword. */ static const char inline_code[] = QUOTE( #include "_charm.h" ) QUOTE( static %s int foo() { return 1; } ) QUOTE( int main() { ) QUOTE( Charm_Setup; ) QUOTE( printf("%%d", foo()); ) QUOTE( return 0; ) QUOTE( } ); static char* S_try_inline(const char *keyword, size_t *output_len) { char code[sizeof(inline_code) + 30]; sprintf(code, inline_code, keyword); return CC_capture_output(code, strlen(code), output_len); } static const char* inline_options[] = { "__inline", "__inline__", "inline" }; static int num_inline_options = sizeof(inline_options) / sizeof(void*); void FuncMacro_run(void) { int i; char *output; size_t output_len; chaz_bool_t has_funcmac = false; chaz_bool_t has_iso_funcmac = false; chaz_bool_t has_gnuc_funcmac = false; chaz_bool_t has_inline = false; ConfWriter_start_module("FuncMacro"); /* Check for ISO func macro. */ output = CC_capture_output(iso_func_code, strlen(iso_func_code), &output_len); if (output != NULL && strncmp(output, "main", 4) == 0) { has_funcmac = true; has_iso_funcmac = true; } free(output); /* Check for GNUC func macro. */ output = CC_capture_output(gnuc_func_code, strlen(gnuc_func_code), &output_len); if (output != NULL && strncmp(output, "main", 4) == 0) { has_funcmac = true; has_gnuc_funcmac = true; } free(output); /* Write out common defines. */ if (has_funcmac) { const char *macro_text = has_iso_funcmac ? "__func__" : "__FUNCTION__"; ConfWriter_append_conf( "#define CHY_HAS_FUNC_MACRO\n" "#define CHY_FUNC_MACRO %s\n", macro_text ); } /* Write out specific defines. */ if (has_iso_funcmac) { ConfWriter_append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n"); } if (has_gnuc_funcmac) { ConfWriter_append_conf("#define CHY_HAS_GNUC_FUNC_MACRO\n"); } /* Check for inline keyword. */ for (i = 0; i < num_inline_options; i++) { const char *inline_option = inline_options[i]; output = S_try_inline(inline_option, &output_len); if (output != NULL) { has_inline = true; ConfWriter_append_conf("#define CHY_INLINE %s\n", inline_option); free(output); break; } } if (!has_inline) { ConfWriter_append_conf("#define CHY_INLINE\n"); } /* Shorten. */ ConfWriter_start_short_names(); if (has_iso_funcmac) { ConfWriter_shorten_macro("HAS_ISO_FUNC_MACRO"); } if (has_gnuc_funcmac) { ConfWriter_shorten_macro("HAS_GNUC_FUNC_MACRO"); } if (has_iso_funcmac || has_gnuc_funcmac) { ConfWriter_shorten_macro("HAS_FUNC_MACRO"); ConfWriter_shorten_macro("FUNC_MACRO"); } ConfWriter_shorten_macro("INLINE"); ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/FuncMacro.h000066400000000000000000000031221233767526200246210ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/FuncMacro.h */ #ifndef H_CHAZ_FUNC_MACRO #define H_CHAZ_FUNC_MACRO #ifdef __cplusplus extern "C" { #endif #include /* Run the FuncMacro module. * * If __func__ successfully resolves, this will be defined: * * HAS_ISO_FUNC_MACRO * * If __FUNCTION__ successfully resolves, this will be defined: * * HAS_GNUC_FUNC_MACRO * * If one or the other succeeds, these will be defined: * * HAS_FUNC_MACRO * FUNC_MACRO * * The "inline" keyword will also be probed for. If it is available, the * following macro will be defined to "inline", otherwise it will be defined * to nothing. * * INLINE */ void chaz_FuncMacro_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define FuncMacro_run chaz_FuncMacro_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_FUNC_MACRO */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Headers.c000066400000000000000000000134131233767526200243160ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/Headers.h" #include #include #include #include #include /* Keep track of which headers have succeeded. */ static int keeper_count = 0; #define MAX_KEEPER_COUNT 200 static const char *keepers[MAX_KEEPER_COUNT + 1] = { NULL }; /* Add a header to the keepers array. */ static void S_keep(const char *header_name); static size_t aff_buf_size = 0; static char *aff_buf = NULL; /* Transform "header.h" into "CHY_HAS_HEADER_H, storing the result in * [aff_buf]. */ static void S_encode_affirmation(const char *header_name); #define NUM_C89_HEADERS 15 const char *c89_headers[] = { "assert.h", "ctype.h", "errno.h", "float.h", "limits.h", "locale.h", "math.h", "setjmp.h", "signal.h", "stdarg.h", "stddef.h", "stdio.h", "stdlib.h", "string.h", "time.h", NULL }; #define NUM_POSIX_HEADERS 14 const char *posix_headers[] = { "cpio.h", "dirent.h", "fcntl.h", "grp.h", "pwd.h", "sys/stat.h", "sys/times.h", "sys/types.h", "sys/utsname.h", "sys/wait.h", "tar.h", "termios.h", "unistd.h", "utime.h", NULL }; #define NUM_WIN_HEADERS 3 const char *win_headers[] = { "io.h", "windows.h", "process.h", NULL }; chaz_bool_t Headers_check(const char *header_name) { return HeadCheck_check_header(header_name); } void Headers_run(void) { int i; chaz_bool_t has_posix = false; chaz_bool_t has_c89 = false; keeper_count = 0; ConfWriter_start_module("Headers"); /* Try for all POSIX headers in one blast. */ if (HeadCheck_check_many_headers((const char**)posix_headers)) { has_posix = true; ConfWriter_append_conf("#define CHY_HAS_POSIX\n"); for (i = 0; posix_headers[i] != NULL; i++) { S_keep(posix_headers[i]); } } /* Test one-at-a-time. */ else { for (i = 0; posix_headers[i] != NULL; i++) { if (HeadCheck_check_header(posix_headers[i])) { S_keep(posix_headers[i]); } } } /* Test for all c89 headers in one blast. */ if (HeadCheck_check_many_headers((const char**)c89_headers)) { has_c89 = true; ConfWriter_append_conf("#define CHY_HAS_C89\n"); ConfWriter_append_conf("#define CHY_HAS_C90\n"); for (i = 0; c89_headers[i] != NULL; i++) { S_keep(c89_headers[i]); } } /* Test one-at-a-time. */ else { for (i = 0; c89_headers[i] != NULL; i++) { if (HeadCheck_check_header(c89_headers[i])) { S_keep(c89_headers[i]); } } } /* Test for all Windows headers in one blast */ if (HeadCheck_check_many_headers((const char**)win_headers)) { for (i = 0; win_headers[i] != NULL; i++) { S_keep(win_headers[i]); } } /* Test one-at-a-time. */ else { for (i = 0; win_headers[i] != NULL; i++) { if (HeadCheck_check_header(win_headers[i])) { S_keep(win_headers[i]); } } } /* One-offs. */ if (HeadCheck_check_header("pthread.h")) { S_keep("pthread.h"); } /* Append the config with every header detected so far. */ for (i = 0; keepers[i] != NULL; i++) { S_encode_affirmation(keepers[i]); ConfWriter_append_conf("#define CHY_%s\n", aff_buf); } /* Shorten. */ ConfWriter_start_short_names(); if (has_posix) { ConfWriter_shorten_macro("HAS_POSIX"); } if (has_c89) { ConfWriter_shorten_macro("HAS_C89"); ConfWriter_shorten_macro("HAS_C90"); } for (i = 0; keepers[i] != NULL; i++) { S_encode_affirmation(keepers[i]); ConfWriter_shorten_macro(aff_buf); } ConfWriter_end_short_names(); ConfWriter_end_module(); } static void S_keep(const char *header_name) { if (keeper_count >= MAX_KEEPER_COUNT) { Util_die("Too many keepers -- increase MAX_KEEPER_COUNT"); } keepers[keeper_count++] = header_name; keepers[keeper_count] = NULL; } static void S_encode_affirmation(const char *header_name) { char *buf, *buf_end; size_t len = strlen(header_name) + sizeof("HAS_"); /* Grow buffer and start off with "HAS_". */ if (aff_buf_size < len + 1) { free(aff_buf); aff_buf_size = len + 1; aff_buf = (char*)malloc(aff_buf_size); } strcpy(aff_buf, "HAS_"); /* Transform one char at a time. */ for (buf = aff_buf + sizeof("HAS_") - 1, buf_end = aff_buf + len; buf < buf_end; header_name++, buf++ ) { if (*header_name == '\0') { *buf = '\0'; break; } else if (isalnum(*header_name)) { *buf = toupper(*header_name); } else { *buf = '_'; } } } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Headers.h000066400000000000000000000045441233767526200243300ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/Headers.h */ #ifndef H_CHAZ_HEADERS #define H_CHAZ_HEADERS #ifdef __cplusplus extern "C" { #endif #include #include "Charmonizer/Core/Defines.h" /* Check whether a particular header file is available. The test-compile is * only run the first time a given request is made. */ chaz_bool_t chaz_Headers_check(const char *header_name); /* Run the Headers module. * * Exported symbols: * * If HAS_C89 is declared, this system has all the header files described in * Ansi C 1989. HAS_C90 is a synonym. (It would be surprising if they are * not defined, because Charmonizer itself assumes C89.) * * HAS_C89 * HAS_C90 * * One symbol is exported for each C89 header file: * * HAS_ASSERT_H * HAS_CTYPE_H * HAS_ERRNO_H * HAS_FLOAT_H * HAS_LIMITS_H * HAS_LOCALE_H * HAS_MATH_H * HAS_SETJMP_H * HAS_SIGNAL_H * HAS_STDARG_H * HAS_STDDEF_H * HAS_STDIO_H * HAS_STDLIB_H * HAS_STRING_H * HAS_TIME_H * * One symbol is exported for every POSIX header present, and HAS_POSIX is * exported if they're all there. * * HAS_POSIX * * HAS_CPIO_H * HAS_DIRENT_H * HAS_FCNTL_H * HAS_GRP_H * HAS_PWD_H * HAS_SYS_STAT_H * HAS_SYS_TIMES_H * HAS_SYS_TYPES_H * HAS_SYS_UTSNAME_H * HAS_WAIT_H * HAS_TAR_H * HAS_TERMIOS_H * HAS_UNISTD_H * HAS_UTIME_H * * If pthread.h is available, this will be exported: * * HAS_PTHREAD_H */ void chaz_Headers_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define Headers_run chaz_Headers_run #define Headers_check chaz_Headers_check #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_HEADERS */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Integers.c000066400000000000000000000410371233767526200245260ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/Integers.h" #include #include #include /* Determine endian-ness of this machine. */ static chaz_bool_t S_machine_is_big_endian(void); static const char sizes_code[] = QUOTE( #include "_charm.h" ) QUOTE( int main () { ) QUOTE( Charm_Setup; ) QUOTE( printf("%d ", (int)sizeof(char)); ) QUOTE( printf("%d ", (int)sizeof(short)); ) QUOTE( printf("%d ", (int)sizeof(int)); ) QUOTE( printf("%d ", (int)sizeof(long)); ) QUOTE( printf("%d ", (int)sizeof(void*)); ) QUOTE( return 0; ) QUOTE( } ); static const char type64_code[] = QUOTE( #include "_charm.h" ) QUOTE( int main() ) QUOTE( { ) QUOTE( Charm_Setup; ) QUOTE( printf("%%d", (int)sizeof(%s)); ) QUOTE( return 0; ) QUOTE( } ); static const char literal64_code[] = QUOTE( #include "_charm.h" ) QUOTE( #define big 9000000000000000000%s ) QUOTE( int main() ) QUOTE( { ) QUOTE( int truncated = (int)big; ) QUOTE( Charm_Setup; ) QUOTE( printf("%%d\n", truncated); ) QUOTE( return 0; ) QUOTE( } ); void Integers_run(void) { char *output; size_t output_len; int sizeof_char = -1; int sizeof_short = -1; int sizeof_int = -1; int sizeof_ptr = -1; int sizeof_long = -1; int sizeof_long_long = -1; int sizeof___int64 = -1; chaz_bool_t has_8 = false; chaz_bool_t has_16 = false; chaz_bool_t has_32 = false; chaz_bool_t has_64 = false; chaz_bool_t has_long_long = false; chaz_bool_t has___int64 = false; chaz_bool_t has_inttypes = HeadCheck_check_header("inttypes.h"); chaz_bool_t has_stdint = HeadCheck_check_header("stdint.h"); char i32_t_type[10]; char i32_t_postfix[10]; char u32_t_postfix[10]; char i64_t_type[10]; char i64_t_postfix[10]; char u64_t_postfix[10]; char code_buf[1000]; ConfWriter_start_module("Integers"); /* Document endian-ness. */ if (S_machine_is_big_endian()) { ConfWriter_append_conf("#define CHY_BIG_END\n"); } else { ConfWriter_append_conf("#define CHY_LITTLE_END\n"); } /* Record sizeof() for several common integer types. */ output = CC_capture_output(sizes_code, strlen(sizes_code), &output_len); if (output != NULL) { char *end_ptr = output; sizeof_char = strtol(output, &end_ptr, 10); output = end_ptr; sizeof_short = strtol(output, &end_ptr, 10); output = end_ptr; sizeof_int = strtol(output, &end_ptr, 10); output = end_ptr; sizeof_long = strtol(output, &end_ptr, 10); output = end_ptr; sizeof_ptr = strtol(output, &end_ptr, 10); } /* Determine whether long longs are available. */ sprintf(code_buf, type64_code, "long long"); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { has_long_long = true; sizeof_long_long = strtol(output, NULL, 10); } /* Determine whether the __int64 type is available. */ sprintf(code_buf, type64_code, "__int64"); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { has___int64 = true; sizeof___int64 = strtol(output, NULL, 10); } /* Figure out which integer types are available. */ if (sizeof_char == 1) { has_8 = true; } if (sizeof_short == 2) { has_16 = true; } if (sizeof_int == 4) { has_32 = true; strcpy(i32_t_type, "int"); strcpy(i32_t_postfix, ""); strcpy(u32_t_postfix, "U"); } else if (sizeof_long == 4) { has_32 = true; strcpy(i32_t_type, "long"); strcpy(i32_t_postfix, "L"); strcpy(u32_t_postfix, "UL"); } if (sizeof_long == 8) { has_64 = true; strcpy(i64_t_type, "long"); } else if (sizeof_long_long == 8) { has_64 = true; strcpy(i64_t_type, "long long"); } else if (sizeof___int64 == 8) { has_64 = true; strcpy(i64_t_type, "__int64"); } /* Probe for 64-bit literal syntax. */ if (has_64 && sizeof_long == 8) { strcpy(i64_t_postfix, "L"); strcpy(u64_t_postfix, "UL"); } else if (has_64) { sprintf(code_buf, literal64_code, "LL"); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { strcpy(i64_t_postfix, "LL"); } else { sprintf(code_buf, literal64_code, "i64"); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { strcpy(i64_t_postfix, "i64"); } else { Util_die("64-bit types, but no literal syntax found"); } } sprintf(code_buf, literal64_code, "ULL"); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { strcpy(u64_t_postfix, "ULL"); } else { sprintf(code_buf, literal64_code, "Ui64"); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { strcpy(u64_t_postfix, "Ui64"); } else { Util_die("64-bit types, but no literal syntax found"); } } } /* Write out some conditional defines. */ if (has_inttypes) { ConfWriter_append_conf("#define CHY_HAS_INTTYPES_H\n"); } if (has_stdint) { ConfWriter_append_conf("#define CHY_HAS_STDINT_H\n"); } if (has_long_long) { ConfWriter_append_conf("#define CHY_HAS_LONG_LONG\n"); } if (has___int64) { ConfWriter_append_conf("#define CHY_HAS___INT64\n"); } /* Write out sizes. */ ConfWriter_append_conf("#define CHY_SIZEOF_CHAR %d\n", sizeof_char); ConfWriter_append_conf("#define CHY_SIZEOF_SHORT %d\n", sizeof_short); ConfWriter_append_conf("#define CHY_SIZEOF_INT %d\n", sizeof_int); ConfWriter_append_conf("#define CHY_SIZEOF_LONG %d\n", sizeof_long); ConfWriter_append_conf("#define CHY_SIZEOF_PTR %d\n", sizeof_ptr); if (has_long_long) { ConfWriter_append_conf("#define CHY_SIZEOF_LONG_LONG %d\n", sizeof_long_long); } if (has___int64) { ConfWriter_append_conf("#define CHY_SIZEOF___INT64 %d\n", sizeof___int64); } /* Write affirmations, typedefs and maximums/minimums. */ ConfWriter_append_conf("typedef int chy_bool_t;\n"); if (has_stdint) { ConfWriter_append_conf("#include \n"); } else { /* we support only the following subset of stdint.h * int8_t * int16_t * int32_t * int64_t * uint8_t * uint16_t * uint32_t * uint64_t */ if (has_8) { ConfWriter_append_conf( "typedef signed char int8_t;\n" "typedef unsigned char uint8_t;\n" ); } if (has_16) { ConfWriter_append_conf( "typedef short int16_t;\n" "typedef unsigned short uint16_t;\n" ); } if (has_32) { ConfWriter_append_conf( "typedef %s int32_t;\n", i32_t_type ); ConfWriter_append_conf( "typedef unsigned %s uint32_t;\n", i32_t_type ); } if (has_64) { ConfWriter_append_conf( "typedef %s int64_t;\n", i64_t_type ); ConfWriter_append_conf( "typedef unsigned %s uint64_t;\n", i64_t_type ); } } if (has_8) { ConfWriter_append_conf( "#define CHY_HAS_I8_T\n" "typedef signed char chy_i8_t;\n" "typedef unsigned char chy_u8_t;\n" "#define CHY_I8_MAX 0x7F\n" "#define CHY_I8_MIN (-I8_MAX - 1)\n" "#define CHY_U8_MAX (I8_MAX * 2 + 1)\n" ); } if (has_16) { ConfWriter_append_conf( "#define CHY_HAS_I16_T\n" "typedef short chy_i16_t;\n" "typedef unsigned short chy_u16_t;\n" "#define CHY_I16_MAX 0x7FFF\n" "#define CHY_I16_MIN (-I16_MAX - 1)\n" "#define CHY_U16_MAX (I16_MAX * 2 + 1)\n" ); } if (has_32) { ConfWriter_append_conf("#define CHY_HAS_I32_T\n"); ConfWriter_append_conf("typedef %s chy_i32_t;\n", i32_t_type); ConfWriter_append_conf("typedef unsigned %s chy_u32_t;\n", i32_t_type); ConfWriter_append_conf("#define CHY_I32_MAX 0x7FFFFFFF%s\n", i32_t_postfix); ConfWriter_append_conf("#define CHY_I32_MIN (-I32_MAX - 1)\n"); ConfWriter_append_conf("#define CHY_U32_MAX (I32_MAX * 2%s + 1%s)\n", u32_t_postfix, u32_t_postfix); } if (has_64) { ConfWriter_append_conf("#define CHY_HAS_I64_T\n"); ConfWriter_append_conf("typedef %s chy_i64_t;\n", i64_t_type); ConfWriter_append_conf("typedef unsigned %s chy_u64_t;\n", i64_t_type); ConfWriter_append_conf("#define CHY_I64_MAX 0x7FFFFFFFFFFFFFFF%s\n", i64_t_postfix); ConfWriter_append_conf("#define CHY_I64_MIN (-I64_MAX - 1%s)\n", i64_t_postfix); ConfWriter_append_conf("#define CHY_U64_MAX (I64_MAX * 2%s + 1%s)\n", u64_t_postfix, u64_t_postfix); } /* Create the I64P and U64P printf macros. */ if (has_64) { int i; const char *options[] = { "ll", "l", "L", "q", /* Some *BSDs */ "I64", /* Microsoft */ NULL, }; /* Buffer to hold the code, and its start and end. */ static const char format_64_code[] = QUOTE( #include "_charm.h" ) QUOTE( int main() { ) QUOTE( Charm_Setup; ) QUOTE( printf("%%%su", 18446744073709551615%s); ) QUOTE( return 0; ) QUOTE( } ); for (i = 0; options[i] != NULL; i++) { /* Try to print 2**64-1, and see if we get it back intact. */ sprintf(code_buf, format_64_code, options[i], u64_t_postfix); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output_len != 0 && strcmp(output, "18446744073709551615") == 0 ) { ConfWriter_append_conf("#define CHY_I64P \"%sd\"\n", options[i]); ConfWriter_append_conf("#define CHY_U64P \"%su\"\n", options[i]); break; } } } /* Write out the 32-bit and 64-bit literal macros. */ if (has_32) { if (strcmp(i32_t_postfix, "") == 0) { ConfWriter_append_conf("#define CHY_I32_C(n) n\n"); ConfWriter_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix); } else { ConfWriter_append_conf("#define CHY_I32_C(n) n##%s\n", i32_t_postfix); ConfWriter_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix); } } if (has_64) { ConfWriter_append_conf("#define CHY_I64_C(n) n##%s\n", i64_t_postfix); ConfWriter_append_conf("#define CHY_U64_C(n) n##%s\n", u64_t_postfix); } /* Create macro for promoting pointers to integers. */ if (has_64) { if (sizeof_ptr == 8) { ConfWriter_append_conf("#define CHY_PTR_TO_I64(ptr) " "((chy_i64_t)(chy_u64_t)(ptr))\n"); } else { ConfWriter_append_conf("#define CHY_PTR_TO_I64(ptr) " "((chy_i64_t)(chy_u32_t)(ptr))\n"); } } /* True and false. */ ConfWriter_append_conf( "#ifndef true\n" " #define true 1\n" "#endif\n" "#ifndef false\n" " #define false 0\n" "#endif\n" ); /* Shorten. */ ConfWriter_start_short_names(); if (S_machine_is_big_endian()) { ConfWriter_shorten_macro("BIG_END"); } else { ConfWriter_shorten_macro("LITTLE_END"); } ConfWriter_shorten_macro("SIZEOF_CHAR"); ConfWriter_shorten_macro("SIZEOF_SHORT"); ConfWriter_shorten_macro("SIZEOF_LONG"); ConfWriter_shorten_macro("SIZEOF_INT"); ConfWriter_shorten_macro("SIZEOF_PTR"); if (has_long_long) { ConfWriter_shorten_macro("HAS_LONG_LONG"); ConfWriter_shorten_macro("SIZEOF_LONG_LONG"); } if (has___int64) { ConfWriter_shorten_macro("HAS___INT64"); ConfWriter_shorten_macro("SIZEOF___INT64"); } if (has_inttypes) { ConfWriter_shorten_macro("HAS_INTTYPES_H"); } ConfWriter_shorten_typedef("bool_t"); if (has_8) { ConfWriter_shorten_macro("HAS_I8_T"); ConfWriter_shorten_typedef("i8_t"); ConfWriter_shorten_typedef("u8_t"); ConfWriter_shorten_macro("I8_MAX"); ConfWriter_shorten_macro("I8_MIN"); ConfWriter_shorten_macro("U8_MAX"); } if (has_16) { ConfWriter_shorten_macro("HAS_I16_T"); ConfWriter_shorten_typedef("i16_t"); ConfWriter_shorten_typedef("u16_t"); ConfWriter_shorten_macro("I16_MAX"); ConfWriter_shorten_macro("I16_MIN"); ConfWriter_shorten_macro("U16_MAX"); } if (has_32) { ConfWriter_shorten_macro("HAS_I32_T"); ConfWriter_shorten_typedef("i32_t"); ConfWriter_shorten_typedef("u32_t"); ConfWriter_shorten_macro("I32_MAX"); ConfWriter_shorten_macro("I32_MIN"); ConfWriter_shorten_macro("U32_MAX"); ConfWriter_shorten_macro("I32_C"); ConfWriter_shorten_macro("U32_C"); } if (has_64) { ConfWriter_shorten_macro("HAS_I64_T"); ConfWriter_shorten_typedef("i64_t"); ConfWriter_shorten_typedef("u64_t"); ConfWriter_shorten_macro("I64_MAX"); ConfWriter_shorten_macro("I64_MIN"); ConfWriter_shorten_macro("U64_MAX"); ConfWriter_shorten_macro("I64P"); ConfWriter_shorten_macro("U64P"); ConfWriter_shorten_macro("I64_C"); ConfWriter_shorten_macro("U64_C"); ConfWriter_shorten_macro("PTR_TO_I64"); } ConfWriter_end_short_names(); ConfWriter_end_module(); } static chaz_bool_t S_machine_is_big_endian(void) { long one = 1; return !(*((char*)(&one))); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Integers.h000066400000000000000000000065021233767526200245310ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/Integers.h -- info about integer types and sizes. * * One or the other of these will be defined, depending on whether the * processor is big-endian or little-endian. * * BIG_END * LITTLE_END * * These will always be defined: * * SIZEOF_CHAR * SIZEOF_SHORT * SIZEOF_INT * SIZEOF_LONG * SIZEOF_PTR * * If long longs are available these symbols will be defined: * * HAS_LONG_LONG * SIZEOF_LONG_LONG * * Similarly, with the __int64 type (the sizeof is included for completeness): * * HAS___INT64 * SIZEOF___INT64 * * If the inttypes.h or stdint.h header files are available, these may be * defined: * * HAS_INTTYPES_H * HAS_STDINT_H * * If stdint.h is is available, it will be pound-included in the configuration * header. If it is not, the following typedefs will be defined if possible: * * int8_t * int16_t * int32_t * int64_t * uint8_t * uint16_t * uint32_t * uint64_t * * The following typedefs will be created if a suitable integer type exists, * as will most often be the case. However, if for example a char is 64 bits * (as on certain Crays), no 8-bit types will be defined, or if no 64-bit * integer type is available, no 64-bit types will be defined, etc. * * bool_t * i8_t * u8_t * i16_t * u16_t * i32_t * u32_t * i64_t * u64_t * * Availability of the preceding integer typedefs is indicated by which of * these are defined: * * HAS_I8_T * HAS_I16_T * HAS_I32_T * HAS_I64_T * * Maximums will be defined for all available integer types (save bool_t), and * minimums for all available signed types. * * I8_MAX * U8_MAX * I16_MAX * U16_MAX * I32_MAX * U32_MAX * I64_MAX * U64_MAX * I8_MIN * I16_MIN * I32_MIN * I64_MIN * * If 64-bit integers are available, this macro will promote pointers to i64_t * safely. * * PTR_TO_I64(ptr) * * If 64-bit integers are available, these macros will expand to the printf * conversion specification for signed and unsigned versions (most commonly * "lld" and "llu"). * * I64P * U64P * * 32-bit and 64-bit literals can be spec'd via these macros, which append the * appropriate postfix: * * I32_C(n) * U32_C(n) * I64_C(n) * U64_C(n) * * These symbols will be defined if they are not already: * * true * false */ #ifndef H_CHAZ_INTEGERS #define H_CHAZ_INTEGERS #ifdef __cplusplus extern "C" { #endif #include /* Run the Integers module. */ void chaz_Integers_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define Integers_run chaz_Integers_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_INTEGERS */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/LargeFiles.c000066400000000000000000000333111233767526200247570ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/LargeFiles.h" #include #include #include #include static const char* off64_options[] = { "off64_t", "off_t", "__int64", "long" }; #define NUM_OFF64_OPTIONS (sizeof(off64_options) / sizeof(off64_options[0])) /* Sets of symbols which might provide large file support. */ typedef struct stdio64_combo { const char *includes; const char *fopen_command; const char *ftell_command; const char *fseek_command; } stdio64_combo; static stdio64_combo stdio64_combos[] = { { "#include \n", "fopen64", "ftello64", "fseeko64" }, { "#include \n", "fopen", "ftello64", "fseeko64" }, { "#include \n", "fopen", "ftello", "fseeko" }, { "", "fopen", "ftell", "fseek" }, { "", "fopen", "_ftelli64", "_fseeki64" }, { "", "fopen", "ftell", "fseek" }, { NULL, NULL, NULL, NULL } }; typedef struct unbuff_combo { const char *includes; const char *lseek_command; const char *pread64_command; } unbuff_combo; static unbuff_combo unbuff_combos[] = { { "#include \n#include \n", "lseek64", "pread64" }, { "#include \n#include \n", "lseek", "pread" }, { "#include \n#include \n", "_lseeki64", "NO_PREAD64" }, { NULL, NULL, NULL } }; /* Check for a 64-bit file pointer type. */ static const chaz_bool_t S_probe_off64(void); /* Check what name 64-bit ftell, fseek go by. */ static chaz_bool_t S_probe_stdio64(stdio64_combo *combo); /* Check for a 64-bit lseek. */ static chaz_bool_t S_probe_lseek(unbuff_combo *combo); /* Check for a 64-bit pread. */ static chaz_bool_t S_probe_pread64(unbuff_combo *combo); /* Vars for holding lfs commands, once they're discovered. */ static char fopen_command[10]; static char fseek_command[10]; static char ftell_command[10]; static char lseek_command[10]; static char pread64_command[10]; static char off64_type[10]; void LargeFiles_run(void) { chaz_bool_t found_off64_t = false; chaz_bool_t found_stdio64 = false; chaz_bool_t found_lseek = false; chaz_bool_t found_pread64 = false; unsigned i; const char *stat_includes = "#include \n#include "; ConfWriter_start_module("LargeFiles"); /* Find off64_t or equivalent. */ found_off64_t = S_probe_off64(); if (found_off64_t) { ConfWriter_append_conf("#define CHY_HAS_64BIT_OFFSET_TYPE\n"); ConfWriter_append_conf("#define chy_off64_t %s\n", off64_type); } /* See if stdio variants with 64-bit support exist. */ for (i = 0; stdio64_combos[i].includes != NULL; i++) { stdio64_combo combo = stdio64_combos[i]; if (S_probe_stdio64(&combo)) { found_stdio64 = true; ConfWriter_append_conf("#define CHY_HAS_64BIT_STDIO\n"); strcpy(fopen_command, combo.fopen_command); strcpy(fseek_command, combo.fseek_command); strcpy(ftell_command, combo.ftell_command); ConfWriter_append_conf("#define chy_fopen64 %s\n", fopen_command); ConfWriter_append_conf("#define chy_ftello64 %s\n", ftell_command); ConfWriter_append_conf("#define chy_fseeko64 %s\n", fseek_command); break; } } /* Probe for 64-bit versions of lseek and pread (if we have an off64_t). */ if (found_off64_t) { for (i = 0; unbuff_combos[i].lseek_command != NULL; i++) { unbuff_combo combo = unbuff_combos[i]; found_lseek = S_probe_lseek(&combo); if (found_lseek) { ConfWriter_append_conf("#define CHY_HAS_64BIT_LSEEK\n"); strcpy(lseek_command, combo.lseek_command); ConfWriter_append_conf("#define chy_lseek64 %s\n", lseek_command); break; } } for (i = 0; unbuff_combos[i].pread64_command != NULL; i++) { unbuff_combo combo = unbuff_combos[i]; found_pread64 = S_probe_pread64(&combo); if (found_pread64) { ConfWriter_append_conf("#define CHY_HAS_64BIT_PREAD\n"); strcpy(pread64_command, combo.pread64_command); ConfWriter_append_conf("#define chy_pread64 %s\n", pread64_command); found_pread64 = true; break; } } } /* Make checks needed for testing. */ if (HeadCheck_check_header("sys/stat.h")) { ConfWriter_append_conf("#define CHAZ_HAS_SYS_STAT_H\n"); } if (HeadCheck_check_header("io.h")) { ConfWriter_append_conf("#define CHAZ_HAS_IO_H\n"); } if (HeadCheck_check_header("fcntl.h")) { ConfWriter_append_conf("#define CHAZ_HAS_FCNTL_H\n"); } if (HeadCheck_contains_member("struct stat", "st_size", stat_includes)) { ConfWriter_append_conf("#define CHAZ_HAS_STAT_ST_SIZE\n"); } if (HeadCheck_contains_member("struct stat", "st_blocks", stat_includes)) { ConfWriter_append_conf("#define CHAZ_HAS_STAT_ST_BLOCKS\n"); } /* Short names. */ ConfWriter_start_short_names(); if (found_off64_t) { ConfWriter_shorten_macro("HAS_64BIT_OFFSET_TYPE"); if (strcmp(off64_type, "off64_t") != 0) { ConfWriter_shorten_typedef("off64_t"); } } if (found_stdio64) { ConfWriter_shorten_macro("HAS_64BIT_STDIO"); if (strcmp(fopen_command, "fopen64") != 0) { ConfWriter_shorten_function("fopen64"); } if (strcmp(fopen_command, "ftello64") != 0) { ConfWriter_shorten_function("ftello64"); } if (strcmp(fopen_command, "fseeko64") != 0) { ConfWriter_shorten_function("fseeko64"); } } if (found_lseek) { ConfWriter_shorten_macro("HAS_64BIT_LSEEK"); if (strcmp(lseek_command, "lseek64") != 0) { ConfWriter_shorten_function("lseek64"); } } if (found_pread64) { ConfWriter_shorten_macro("HAS_64BIT_PREAD"); if (strcmp(pread64_command, "pread64") != 0) { ConfWriter_shorten_function("pread64"); } } ConfWriter_end_short_names(); ConfWriter_end_module(); } /* Code for finding an off64_t or some other 64-bit signed type. */ static const char off64_code[] = QUOTE( %s ) QUOTE( #include "_charm.h" ) QUOTE( int main() ) QUOTE( { ) QUOTE( Charm_Setup; ) QUOTE( printf("%%d", (int)sizeof(%s)); ) QUOTE( return 0; ) QUOTE( } ); static const chaz_bool_t S_probe_off64(void) { size_t needed = sizeof(off64_code) + 100; char *code_buf = (char*)malloc(needed); int i; chaz_bool_t success = false; for (i = 0; i < NUM_OFF64_OPTIONS; i++) { const char *candidate = off64_options[i]; char *output; size_t output_len; chaz_bool_t has_sys_types_h = HeadCheck_check_header("sys/types.h"); const char *sys_types_include = has_sys_types_h ? "#include " : ""; /* Execute the probe. */ sprintf(code_buf, off64_code, sys_types_include, candidate); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { long sizeof_candidate = strtol(output, NULL, 10); free(output); if (sizeof_candidate == 8) { strcpy(off64_type, candidate); success = true; break; } } } free(code_buf); return success; } /* Code for checking ftello64 and friends. */ static const char stdio64_code[] = QUOTE( %s ) QUOTE( #include "_charm.h" ) QUOTE( int main() { ) QUOTE( %s pos; ) QUOTE( FILE *f; ) QUOTE( Charm_Setup; ) QUOTE( f = %s("_charm_stdio64", "w"); ) QUOTE( if (f == NULL) return -1; ) QUOTE( printf("%%d", (int)sizeof(%s)); ) QUOTE( pos = %s(stdout); ) QUOTE( %s(stdout, 0, SEEK_SET); ) QUOTE( return 0; ) QUOTE( } ); static chaz_bool_t S_probe_stdio64(stdio64_combo *combo) { char *output = NULL; size_t output_len; size_t needed = sizeof(stdio64_code) + (2 * strlen(off64_type)) + strlen(combo->fopen_command) + strlen(combo->ftell_command) + strlen(combo->fseek_command) + 20; char *code_buf = (char*)malloc(needed); chaz_bool_t success = false; /* Prepare the source code. */ sprintf(code_buf, stdio64_code, combo->includes, off64_type, combo->fopen_command, off64_type, combo->ftell_command, combo->fseek_command); /* Verify compilation and that the offset type has 8 bytes. */ output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { long size = strtol(output, NULL, 10); if (size == 8) { success = true; } free(output); } if (!Util_remove_and_verify("_charm_stdio64")) { Util_die("Failed to remove '_charm_stdio64'"); } return success; } /* Code for checking 64-bit lseek. */ static const char lseek_code[] = QUOTE( %s ) QUOTE( #include "_charm.h" ) QUOTE( int main() { ) QUOTE( int fd; ) QUOTE( Charm_Setup; ) QUOTE( fd = open("_charm_lseek", O_WRONLY | O_CREAT, 0666); ) QUOTE( if (fd == -1) { return -1; } ) QUOTE( %s(fd, 0, SEEK_SET); ) QUOTE( printf("%%d", 1); ) QUOTE( if (close(fd)) { return -1; } ) QUOTE( return 0; ) QUOTE( } ); static chaz_bool_t S_probe_lseek(unbuff_combo *combo) { char *output = NULL; size_t output_len; size_t needed = sizeof(lseek_code) + strlen(combo->includes) + strlen(combo->lseek_command) + 20; char *code_buf = (char*)malloc(needed); chaz_bool_t success = false; /* Verify compilation. */ sprintf(code_buf, lseek_code, combo->includes, combo->lseek_command); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { success = true; free(output); } if (!Util_remove_and_verify("_charm_lseek")) { Util_die("Failed to remove '_charm_lseek'"); } free(code_buf); return success; } /* Code for checking 64-bit pread. The pread call will fail, but that's fine * as long as it compiles. */ static const char pread64_code[] = QUOTE( %s ) QUOTE( #include "_charm.h" ) QUOTE( int main() { ) QUOTE( int fd = 20; ) QUOTE( char buf[1]; ) QUOTE( Charm_Setup; ) QUOTE( printf("1"); ) QUOTE( %s(fd, buf, 1, 1); ) QUOTE( return 0; ) QUOTE( } ); static chaz_bool_t S_probe_pread64(unbuff_combo *combo) { char *output = NULL; size_t output_len; size_t needed = sizeof(pread64_code) + strlen(combo->includes) + strlen(combo->pread64_command) + 20; char *code_buf = (char*)malloc(needed); chaz_bool_t success = false; /* Verify compilation. */ sprintf(code_buf, pread64_code, combo->includes, combo->pread64_command); output = CC_capture_output(code_buf, strlen(code_buf), &output_len); if (output != NULL) { success = true; free(output); } free(code_buf); return success; } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/LargeFiles.h000066400000000000000000000032621233767526200247660ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/LargeFiles.h */ #ifndef H_CHAZ_LARGE_FILES #define H_CHAZ_LARGE_FILES #ifdef __cplusplus extern "C" { #endif #include /* The LargeFiles module attempts to detect these symbols or alias them to * synonyms: * * off64_t * fopen64 * ftello64 * fseeko64 * lseek64 * pread64 * * If off64_t or its equivalent is available, this will be defined: * * HAS_64BIT_OFFSET_TYPE * * If 64-bit variants of fopen, ftell, and fseek are available, this will be * defined: * * HAS_64BIT_STDIO * * If 64-bit variants of pread and lseek are available, then corresponding * symbols will be defined: * * HAS_64BIT_PREAD * HAS_64BIT_LSEEK * * Use of the off64_t symbol may require sys/types.h. */ void chaz_LargeFiles_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define LargeFiles_run chaz_LargeFiles_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_LARGE_FILES */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Memory.c000066400000000000000000000111531233767526200242120ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Probe/Memory.h" #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/HeaderChecker.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include #include #include static const char alloca_code[] = "#include <%s>\n" QUOTE( int main() { ) QUOTE( void *foo = %s(1); ) QUOTE( return 0; ) QUOTE( } ); void Memory_run(void) { chaz_bool_t has_sys_mman_h = false; chaz_bool_t has_alloca_h = false; chaz_bool_t has_malloc_h = false; chaz_bool_t need_stdlib_h = false; chaz_bool_t has_alloca = false; chaz_bool_t has_builtin_alloca = false; chaz_bool_t has_underscore_alloca = false; char code_buf[sizeof(alloca_code) + 100]; ConfWriter_start_module("Memory"); { /* OpenBSD needs sys/types.h for sys/mman.h to work and mmap() to be * available. Everybody else that has sys/mman.h should have * sys/types.h as well. */ const char *mman_headers[] = { "sys/types.h", "sys/mman.h", NULL }; if (chaz_HeadCheck_check_many_headers((const char**)mman_headers)) { has_sys_mman_h = true; chaz_ConfWriter_append_conf("#define CHY_HAS_SYS_MMAN_H\n\n"); } } /* Unixen. */ sprintf(code_buf, alloca_code, "alloca.h", "alloca"); if (CC_test_compile(code_buf, strlen(code_buf))) { has_alloca_h = true; has_alloca = true; ConfWriter_append_conf("#define CHY_HAS_ALLOCA_H\n"); ConfWriter_append_conf("#define chy_alloca alloca\n"); } if (!has_alloca) { sprintf(code_buf, alloca_code, "stdlib.h", "alloca"); if (CC_test_compile(code_buf, strlen(code_buf))) { has_alloca = true; need_stdlib_h = true; ConfWriter_append_conf("#define CHY_ALLOCA_IN_STDLIB_H\n"); ConfWriter_append_conf("#define chy_alloca alloca\n"); } } if (!has_alloca) { sprintf(code_buf, alloca_code, "stdio.h", /* stdio.h is filler */ "__builtin_alloca"); if (CC_test_compile(code_buf, strlen(code_buf))) { has_builtin_alloca = true; ConfWriter_append_conf("#define chy_alloca __builtin_alloca\n"); } } /* Windows. */ if (!(has_alloca || has_builtin_alloca)) { sprintf(code_buf, alloca_code, "malloc.h", "alloca"); if (CC_test_compile(code_buf, strlen(code_buf))) { has_malloc_h = true; has_alloca = true; ConfWriter_append_conf("#define CHY_HAS_MALLOC_H\n"); ConfWriter_append_conf("#define chy_alloca alloca\n"); } } if (!(has_alloca || has_builtin_alloca)) { sprintf(code_buf, alloca_code, "malloc.h", "_alloca"); if (CC_test_compile(code_buf, strlen(code_buf))) { has_malloc_h = true; has_underscore_alloca = true; ConfWriter_append_conf("#define CHY_HAS_MALLOC_H\n"); ConfWriter_append_conf("#define chy_alloca _alloca\n"); } } /* Shorten */ ConfWriter_start_short_names(); if (has_sys_mman_h) { ConfWriter_shorten_macro("HAS_SYS_MMAN_H"); } if (has_alloca_h) { ConfWriter_shorten_macro("HAS_ALLOCA_H"); } if (has_malloc_h) { ConfWriter_shorten_macro("HAS_MALLOC_H"); if (!has_alloca && has_underscore_alloca) { ConfWriter_shorten_function("alloca"); } } if (need_stdlib_h) { ConfWriter_shorten_macro("ALLOCA_IN_STDLIB_H"); } if (!has_alloca && has_builtin_alloca) { ConfWriter_shorten_function("alloca"); } ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/Memory.h000066400000000000000000000027001233767526200242150ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/Memory.h */ #ifndef H_CHAZ_MEMORY #define H_CHAZ_MEMORY #ifdef __cplusplus extern "C" { #endif /* The Memory module attempts to detect these symbols or alias them to * synonyms: * * alloca * * These following symbols will be defined if the associated headers are * available: * * HAS_SYS_MMAN_H * HAS_ALLOCA_H * HAS_MALLOC_H * * Defined if alloca() is available via stdlib.h: * * ALLOCA_IN_STDLIB_H */ void chaz_Memory_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define Memory_run chaz_Memory_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_MEMORY */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/UnusedVars.c000066400000000000000000000027411233767526200250440ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/UnusedVars.h" #include #include void UnusedVars_run(void) { ConfWriter_start_module("UnusedVars"); /* Write the macros (no test, these are the same everywhere). */ ConfWriter_append_conf("#define CHY_UNUSED_VAR(x) ((void)x)\n"); ConfWriter_append_conf("#define CHY_UNREACHABLE_RETURN(type) return (type)0\n"); /* Shorten. */ ConfWriter_start_short_names(); ConfWriter_shorten_macro("UNUSED_VAR"); ConfWriter_shorten_macro("UNREACHABLE_RETURN"); ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/UnusedVars.h000066400000000000000000000023501233767526200250450ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/UnusedVars.h */ #ifndef H_CHAZ_UNUSED_VARS #define H_CHAZ_UNUSED_VARS #ifdef __cplusplus extern "C" { #endif #include /* Run the UnusedVars module. * * These symbols are exported: * * UNUSED_VAR(var) * UNREACHABLE_RETURN(type) * */ void chaz_UnusedVars_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define UnusedVars_run chaz_UnusedVars_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_UNUSED_VARS */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/VariadicMacros.c000066400000000000000000000071131233767526200256320ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Core/Compiler.h" #include "Charmonizer/Core/ConfWriter.h" #include "Charmonizer/Core/Util.h" #include "Charmonizer/Probe/VariadicMacros.h" #include #include /* Code for verifying ISO-style variadic macros. */ static const char iso_code[] = QUOTE( #include "_charm.h" ) QUOTE( #define ISO_TEST(fmt, ...) \\ ) " printf(fmt, __VA_ARGS__) \n" QUOTE( int main() { ) QUOTE( Charm_Setup; ) QUOTE( ISO_TEST("%d %d", 1, 1); ) QUOTE( return 0; ) QUOTE( } ); /* Code for verifying GNU-style variadic macros. */ static const char gnuc_code[] = QUOTE( #include "_charm.h" ) QUOTE( #define GNU_TEST(fmt, args...) printf(fmt, ##args) ) QUOTE( int main() { ) QUOTE( Charm_Setup; ) QUOTE( GNU_TEST("%d %d", 1, 1); ) QUOTE( return 0; ) QUOTE( } ); void VariadicMacros_run(void) { char *output; size_t output_len; chaz_bool_t has_varmacros = false; chaz_bool_t has_iso_varmacros = false; chaz_bool_t has_gnuc_varmacros = false; ConfWriter_start_module("VariadicMacros"); /* Test for ISO-style variadic macros. */ output = CC_capture_output(iso_code, strlen(iso_code), &output_len); if (output != NULL) { has_varmacros = true; has_iso_varmacros = true; ConfWriter_append_conf("#define CHY_HAS_VARIADIC_MACROS\n"); ConfWriter_append_conf("#define CHY_HAS_ISO_VARIADIC_MACROS\n"); } /* Test for GNU-style variadic macros. */ output = CC_capture_output(gnuc_code, strlen(gnuc_code), &output_len); if (output != NULL) { has_gnuc_varmacros = true; if (has_varmacros == false) { has_varmacros = true; ConfWriter_append_conf("#define CHY_HAS_VARIADIC_MACROS\n"); } ConfWriter_append_conf("#define CHY_HAS_GNUC_VARIADIC_MACROS\n"); } /* Shorten. */ ConfWriter_start_short_names(); if (has_varmacros) { ConfWriter_shorten_macro("HAS_VARIADIC_MACROS"); } if (has_iso_varmacros) { ConfWriter_shorten_macro("HAS_ISO_VARIADIC_MACROS"); } if (has_gnuc_varmacros) { ConfWriter_shorten_macro("HAS_GNUC_VARIADIC_MACROS"); } ConfWriter_end_short_names(); ConfWriter_end_module(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Probe/VariadicMacros.h000066400000000000000000000027551233767526200256460ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Probe/VariadicMacros.h */ #ifndef H_CHAZ_VARIADIC_MACROS #define H_CHAZ_VARIADIC_MACROS #ifdef __cplusplus extern "C" { #endif #include /* Run the VariadicMacros module. * * If your compiler supports ISO-style variadic macros, this will be defined: * * HAS_ISO_VARIADIC_MACROS * * If your compiler supports GNU-style variadic macros, this will be defined: * * HAS_GNUC_VARIADIC_MACROS * * If you have at least one of the above, this will be defined: * * HAS_VARIADIC_MACROS */ void chaz_VariadicMacros_run(void); #ifdef CHAZ_USE_SHORT_NAMES #define VariadicMacros_run chaz_VariadicMacros_run #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_VARIADIC_MACROS */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test.c000066400000000000000000000127211233767526200226140ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include "Charmonizer/Test.h" struct chaz_TestBatch { unsigned test_num; unsigned num_tests; unsigned num_passed; unsigned num_failed; unsigned num_skipped; }; chaz_TestBatch* chaz_Test_current = NULL; void chaz_Test_init(void) { /* Unbuffer stdout. */ int check_val = setvbuf(stdout, NULL, _IONBF, 0); if (check_val != 0) { fprintf(stderr, "Failed when trying to unbuffer stdout\n"); } } chaz_TestBatch* chaz_Test_new_batch(unsigned num_tests) { chaz_TestBatch *batch = (chaz_TestBatch*)malloc(sizeof(chaz_TestBatch)); if (!batch) { fprintf(stderr, "Out of memory\n"); return NULL; } /* Assign. */ batch->num_tests = num_tests; /* Initialize. */ batch->test_num = 0; batch->num_passed = 0; batch->num_failed = 0; batch->num_skipped = 0; return batch; } chaz_TestBatch* chaz_Test_start(unsigned num_tests) { if (chaz_Test_current) { fprintf(stderr, "Already started testing\n"); return NULL; } chaz_Test_init(); chaz_Test_current = chaz_Test_new_batch(num_tests); CHAZ_TEST_PLAN(chaz_Test_current); return chaz_Test_current; } int chaz_Test_finish(void) { int remainder = chaz_Test_current->num_tests - chaz_Test_current->num_passed - chaz_Test_current->num_skipped; free(chaz_Test_current); chaz_Test_current = NULL; return !remainder; } void chaz_Test_plan(chaz_TestBatch *batch) { printf("1..%u\n", batch->num_tests); } void chaz_Test_ok(chaz_TestBatch *batch, int value, const char *message) { /* Increment test number. */ batch->test_num++; /* Test condition and pass or fail. */ if (value) { printf("ok %u - %s\n", batch->test_num, message); batch->num_passed++; } else { printf("not ok %u - %s\n", batch->test_num, message); batch->num_failed++; } } void chaz_Test_str_eq(chaz_TestBatch *batch, const char *got, const char *expected, const char *message) { /* Increment test number. */ batch->test_num++; /* Test condition and pass or fail. */ if (strcmp(expected, got) == 0) { printf("ok %u - %s\n", batch->test_num, message); batch->num_passed++; } else { printf("not ok %u - Expected '%s', got '%s'\n # %s\n", batch->test_num, expected, got, message); batch->num_failed++; } } void chaz_Test_pass(chaz_TestBatch *batch, const char *message) { /* Increment test number. */ batch->test_num++; /* Indicate pass, update pass counter. */ printf("ok %u - %s\n", batch->test_num, message); batch->num_passed++; } void chaz_Test_fail(chaz_TestBatch *batch, const char *message) { /* Increment test number. */ batch->test_num++; /* Indicate failure, update pass counter. */ printf("not ok %u - %s\n", batch->test_num, message); batch->num_failed++; } void chaz_Test_long_eq(chaz_TestBatch *batch, long got, long expected, const char *message) { /* Increment test number. */ batch->test_num++; if (expected == got) { printf("ok %u - %s\n", batch->test_num, message); batch->num_passed++; } else { printf("not ok %u - Expected '%ld', got '%ld'\n # %s", batch->test_num, expected, got, message); batch->num_failed++; } } void chaz_Test_double_eq(chaz_TestBatch *batch, double got, double expected, double slop, const char *message) { double diff = expected - got; if (diff < 0) { diff = 0 - diff; } /* Increment test number. */ batch->test_num++; /* Evaluate condition and pass or fail. */ if (diff < slop) { printf("ok %u - %s\n", batch->test_num, message); batch->num_passed++; } else { printf("not ok %u - Expected '%f', got '%f'\n # %s\n", batch->test_num, expected, got, message); batch->num_failed++; } } void chaz_Test_skip(chaz_TestBatch *batch, const char *message) { /* Increment test number. */ batch->test_num++; /* Indicate that test is being skipped, update pass counter. */ printf("ok %u # SKIP %s\n", batch->test_num, message); batch->num_skipped++; } void chaz_Test_skip_remaining(chaz_TestBatch *batch, const char *message) { unsigned remaining = batch->num_tests - batch->test_num; /* Indicate that tests are being skipped, update skip counter. */ printf("# Skipping all %u remaining tests: %s\n", remaining, message); while (batch->test_num < batch->num_tests) { chaz_Test_skip(batch, ""); } } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test.h000066400000000000000000000113701233767526200226200ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Charmonizer/Test.h - test Charmonizer's output. */ #ifndef H_CHAZ_TEST #define H_CHAZ_TEST #ifdef __cplusplus extern "C" { #endif #include "Charmonizer/Core/Defines.h" typedef struct chaz_TestBatch chaz_TestBatch; /* Begin a test run. */ chaz_TestBatch* chaz_Test_start(unsigned num_tests); /* End a test run. Returns true if all tests were run and there were no * failures, false otherwise. */ int chaz_Test_finish(void); /* Unbuffer stdout. Perform any other setup needed. */ void chaz_Test_init(void); /* Constructor for TestBatch. */ chaz_TestBatch* chaz_Test_new_batch(unsigned num_tests); /* Note: maybe add line numbers later. */ #define CHAZ_TEST_PLAN chaz_Test_plan #define CHAZ_TEST_TEST_STR_EQ chaz_Test_test_str_eq void chaz_Test_plan(chaz_TestBatch *batch); #define CHAZ_TEST_OK(_expression, _message) \ chaz_Test_ok(chaz_Test_current, (_expression), (_message)) void chaz_Test_ok(chaz_TestBatch *batch, int expression, const char *message); #define CHAZ_TEST_STR_EQ(_got, _expected, _message) \ chaz_Test_str_eq(chaz_Test_current, (_got), (_expected), (_message)) void chaz_Test_str_eq(chaz_TestBatch *batch, const char *got, const char *expected, const char *message); #define CHAZ_TEST_PASS(_message) \ chaz_Test_pass(chaz_Test_current, (_message)) void chaz_Test_pass(chaz_TestBatch *batch, const char *message); #define CHAZ_TEST_FAIL(_message) \ chaz_Test_fail(chaz_Test_current, (_message)) void chaz_Test_fail(chaz_TestBatch *batch, const char *message); #define CHAZ_TEST_LONG_EQ(_got, _expected, _message) \ chaz_Test_long_eq(chaz_Test_current, (_got), (_expected), (_message)) void chaz_Test_long_eq(chaz_TestBatch *batch, long got, long expected, const char *message); #define CHAZ_TEST_DOUBLE_EQ(_got, _expected, _slop, _message) \ chaz_Test_double_eq(chaz_Test_current, (_got), (_expected), (_slop), \ (_message)) void chaz_Test_double_eq(chaz_TestBatch *batch, double got, double expected, double slop, const char *message); /* Print a message indicating that a test was skipped and update batch. */ #define CHAZ_TEST_SKIP(_message) \ chaz_Test_skip(chaz_Test_current, (_message)) void chaz_Test_skip(chaz_TestBatch *batch, const char *message); /* Print a message indicating that all remaining tests will be skipped and * then call SKIP once for each. */ #define CHAZ_TEST_SKIP_REMAINING(_message) \ chaz_Test_skip_remaining(chaz_Test_current, (_message)) void chaz_Test_skip_remaining(chaz_TestBatch* batch, const char *message); /* Global TestBatch implicitly accessed by testing macros. */ extern chaz_TestBatch *chaz_Test_current; #ifdef CHAZ_USE_SHORT_NAMES #define Test_start chaz_Test_start #define Test_finish chaz_Test_finish #define OK CHAZ_TEST_OK #define STR_EQ CHAZ_TEST_STR_EQ #define LONG_EQ CHAZ_TEST_LONG_EQ #define DOUBLE_EQ CHAZ_TEST_DOUBLE_EQ #define PASS CHAZ_TEST_PASS #define FAIL CHAZ_TEST_FAIL #define SKIP CHAZ_TEST_SKIP #define SKIP_REMAINING CHAZ_TEST_SKIP_REMAINING #define TestBatch chaz_TestBatch #define Test_init chaz_Test_init #define Test_new_batch chaz_Test_new_batch #define Test_plan chaz_Test_plan #define PLAN CHAZ_TEST_PLAN #define Test_str_eq chaz_Test_str_eq #define Test_long_eq chaz_Test_long_eq #define Test_double_eq chaz_Test_double_eq #define Test_pass chaz_Test_pass #define Test_fail chaz_Test_fail #define Test_skip chaz_Test_skip #define Test_skip_remaining chaz_Test_skip_remaining #endif #ifdef __cplusplus } #endif #endif /* H_CHAZ_TEST */ liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/000077500000000000000000000000001233767526200224455ustar00rootroot00000000000000liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestDirManip.c000066400000000000000000000037331233767526200251620ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Test.h" #include #include #include "charmony.h" #ifdef HAS_DIRENT_H #include #endif #ifdef HAS_SYS_STAT_H #include #endif #ifdef HAS_SYS_TYPES_H #include #endif #ifdef HAS_UNISTD_H #include #endif #ifdef HAS_DIRECT_H #include #endif static void S_run_tests(void) { LONG_EQ(0, makedir("_chaz_test_dir", 0777), "makedir"); LONG_EQ(0, makedir("_chaz_test_dir" DIR_SEP "deep", 0777), "makedir with DIR_SEP"); LONG_EQ(0, rmdir("_chaz_test_dir" DIR_SEP "deep"), "rmdir with DIR_SEP"); LONG_EQ(0, rmdir("_chaz_test_dir"), "rmdir"); #ifdef CHY_HAS_DIRENT_D_NAMLEN { struct dirent entry; entry.d_namlen = 5; LONG_EQ(5, entry.d_namlen, "d_namlen"); } #else SKIP("no d_namlen member on this platform"); #endif #ifdef CHY_HAS_DIRENT_D_TYPE { struct dirent entry; entry.d_type = 5; LONG_EQ(5, entry.d_type, "d_type"); } #else SKIP("no d_type member on this platform"); #endif } int main(int argc, char **argv) { Test_start(6); S_run_tests(); return !Test_finish(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestFuncMacro.c000066400000000000000000000031171233767526200253300ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "charmony.h" #include #include "Charmonizer/Test.h" #ifdef INLINE static INLINE const char* S_inline_function() { return "inline works"; } #endif static void S_run_tests(void) { #ifdef HAS_FUNC_MACRO STR_EQ(FUNC_MACRO, "S_run_tests", "FUNC_MACRO"); #else SKIP("no FUNC_MACRO"); #endif #ifdef HAS_ISO_FUNC_MACRO STR_EQ(__func__, "S_run_tests", "HAS_ISO_FUNC_MACRO"); #else SKIP("no ISO_FUNC_MACRO"); #endif #ifdef HAS_GNUC_FUNC_MACRO STR_EQ(__FUNCTION__, "S_run_tests", "HAS_GNUC_FUNC_MACRO"); #else SKIP("no GNUC_FUNC_MACRO"); #endif #ifdef INLINE PASS(S_inline_function()); #else SKIP("no INLINE functions"); #endif } int main(int argc, char **argv) { Test_start(4); S_run_tests(); return !Test_finish(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestHeaders.c000066400000000000000000000065211233767526200250300ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "charmony.h" #include #include "Charmonizer/Test.h" #ifdef HAS_ASSERT_H #include #endif #ifdef HAS_CTYPE_H #include #endif #ifdef HAS_ERRNO_H #include #endif #ifdef HAS_FLOAT_H #include #endif #ifdef HAS_LIMITS_H #include #endif #ifdef HAS_LOCALE_H #include #endif #ifdef HAS_MATH_H #include #endif #ifdef HAS_SETJMP_H #include #endif #ifdef HAS_SIGNAL_H #include #endif #ifdef HAS_STDARG_H #include #endif #ifdef HAS_STDDEF_H #include #endif #ifdef HAS_STDIO_H #include #endif #ifdef HAS_STDLIB_H #include #endif #ifdef HAS_STRING_H #include #endif #ifdef HAS_TIME_H #include #endif #ifdef HAS_CPIO_H #include #endif #ifdef HAS_DIRENT_H #include #endif #ifdef HAS_FCNTL_H #include #endif #ifdef HAS_GRP_H #include #endif #ifdef HAS_PWD_H #include #endif #ifdef HAS_SYS_STAT_H #include #endif #ifdef HAS_SYS_TIMES_H #include #endif #ifdef HAS_SYS_TYPES_H #include #endif #ifdef HAS_SYS_UTSNAME_H #include #endif #ifdef HAS_WAIT_H #include #endif #ifdef HAS_TAR_H #include #endif #ifdef HAS_TERMIOS_H #include #endif #ifdef HAS_UNISTD_H #include #endif #ifdef HAS_UTIME_H #include #endif #if defined(HAS_C89) || defined(HAS_C90) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #ifdef HAS_POSIX #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif static void S_run_tests(void) { PASS("Compiled successfully with all detected headers"); /* Don't bother checking all -- just use stdio as an example. */ #ifdef HAS_STDIO_H PASS("stdio.h should have been detected"); #else FAIL("stdio.h should have been detected"); #endif } int main(int argc, char **argv) { Test_start(2); S_run_tests(); return !Test_finish(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestIntegers.c000066400000000000000000000100011233767526200252210ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "Charmonizer/Test.h" #include "charmony.h" #include #include #ifdef HAS_INTTYPES_H #include #endif static void S_run_tests(TestBatch *batch) { { long one = 1; long big_endian = !(*((char *)(&one))); #ifdef BIG_END OK(big_endian, "BIG_END"); #else #if defined(LITTLE_END) OK(!big_endian, "LITTLE_END"); #else FAIL("Either BIG_END or LITTLE_END should be defined"); #endif #endif } LONG_EQ(SIZEOF_CHAR, sizeof(char), "SIZEOF_CHAR"); LONG_EQ(SIZEOF_SHORT, sizeof(short), "SIZEOF_SHORT"); LONG_EQ(SIZEOF_INT, sizeof(int), "SIZEOF_INT"); LONG_EQ(SIZEOF_LONG, sizeof(long), "SIZEOF_LONG"); LONG_EQ(SIZEOF_PTR, sizeof(void*), "SIZEOF_PTR"); #ifdef HAS_LONG_LONG LONG_EQ(SIZEOF_LONG_LONG, sizeof(long long), "HAS_LONG_LONG and SIZEOF_LONG_LONG"); #else SKIP("No 'long long' type"); #endif #ifdef HAS_INTTYPES_H LONG_EQ(sizeof(int8_t), 1, "HAS_INTTYPES_H"); #else SKIP("No inttypes.h"); #endif { bool_t the_truth = true; OK(the_truth, "bool_t true"); OK(!false, "false is false"); } #ifdef HAS_I8_T { int8_t foo = -100; uint8_t bar = 200; LONG_EQ(foo, -100, "int8_t is signed"); LONG_EQ(bar, 200, "uint8_t is unsigned"); LONG_EQ(sizeof(int8_t), 1, "i8_t is 1 byte"); LONG_EQ(sizeof(uint8_t), 1, "u8_t is 1 byte"); LONG_EQ(I8_MAX, 127, "I8_MAX"); LONG_EQ(I8_MIN, -128, "I8_MIN"); LONG_EQ(U8_MAX, 255, "U8_MAX"); } #endif #ifdef HAS_I16_T { int16_t foo = -100; uint16_t bar = 30000; LONG_EQ(foo, -100, "int16_t is signed"); LONG_EQ(bar, 30000, "uint16_t is unsigned"); LONG_EQ(sizeof(int16_t), 2, "int16_t is 2 bytes"); LONG_EQ(sizeof(uint16_t), 2, "uint16_t is 2 bytes"); LONG_EQ(I16_MAX, 32767, "I16_MAX"); LONG_EQ(I16_MIN, -32768, "I16_MIN"); LONG_EQ(U16_MAX, 65535, "U16_MAX"); } #endif #ifdef HAS_I32_T { int32_t foo = -100; uint32_t bar = 4000000000UL; OK((foo == -100), "int32_t is signed"); OK((bar == 4000000000UL), "uint32_t is unsigned"); OK((sizeof(int32_t) == 4), "int32_t is 4 bytes"); OK((sizeof(uint32_t) == 4), "uint32_t is 4 bytes"); OK((I32_MAX == I32_C(2147483647)), "I32_MAX"); /* The (-2147483647 - 1) avoids a compiler warning. */ OK((I32_MIN == I32_C(-2147483647 - 1)), "I32_MIN"); OK((U32_MAX == U32_C(4294967295)), "U32_MAX"); } #endif #ifdef HAS_I64_T { char buf[100]; int64_t foo = -100; uint64_t bar = U64_C(18000000000000000000); OK((foo == -100), "int64_t is signed"); OK((bar == U64_C(18000000000000000000)), "uint64_t is unsigned"); OK((sizeof(int64_t) == 8), "int64_t is 8 bytes"); OK((sizeof(uint64_t) == 8), "uint64_t is 8 bytes"); sprintf(buf, "%"I64P, foo); STR_EQ(buf, "-100", "I64P"); sprintf(buf, "%"U64P, bar); STR_EQ(buf, "18000000000000000000", "U64P"); } #endif } int main(int argc, char **argv) { TestBatch *batch = Test_start(37); S_run_tests(batch); return !Test_finish(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestLargeFiles.c000066400000000000000000000166741233767526200255040ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "charmony.h" #include #include #ifdef CHAZ_HAS_SYS_TYPES_H #include #endif #ifdef CHAZ_HAS_FCNTL_H #include /* open, fcntl flags */ #endif #ifdef CHY_HAS_UNISTD_H #include /* close */ #endif #ifdef CHAZ_HAS_IO_H #include #endif #include #include "Charmonizer/Test.h" #if (defined(HAS_64BIT_STDIO) \ && defined(CHAZ_HAS_STAT_ST_SIZE) \ && defined(CHAZ_HAS_STAT_ST_BLOCKS)) #define STAT_TESTS_ENABLED #include /* Determine whether we can use sparse files. */ static chaz_bool_t S_check_sparse_files(void); /* Helper for check_sparse_files(). */ static chaz_bool_t S_test_sparse_file(long offset, struct stat *st); /* See if trying to write a 5 GB file in a subprocess bombs out. If it * doesn't, then the test suite can safely verify large file support. */ static chaz_bool_t S_can_create_big_files(void); #endif /* criteria for defining STAT_TESTS_ENABLED */ #ifdef O_LARGEFILE #define LARGEFILE_OPEN_FLAG O_LARGEFILE #else #define LARGEFILE_OPEN_FLAG 0 #endif static void S_run_tests(void) { FILE *fh; off64_t offset; int check_val; char check_char; int fd; /* A little over 4 GB, and a little over 2 GB. */ off64_t gb4_plus = ((off64_t)0x7FFFFFFF << 1) + 100; off64_t gb2_plus = (off64_t)0x7FFFFFFF + 200; LONG_EQ(sizeof(off64_t), 8, "off64_t type has 8 bytes"); #ifndef HAS_64BIT_STDIO SKIP_REMAINING("No stdio large file support"); return; #endif #ifndef STAT_TESTS_ENABLED SKIP_REMAINING("Need stat with st_size and st_blocks"); return; #else /* Check for sparse files. */ if (!S_check_sparse_files()) { SKIP_REMAINING("Can't verify large file support " "without sparse files"); return; } if (!S_can_create_big_files()) { SKIP_REMAINING("Unsafe to create 5GB sparse files on this system"); return; } fh = fopen64("_charm_large_file_test", "w+"); if (fh == NULL) { SKIP_REMAINING("Failed to open file"); return; } check_val = fseeko64(fh, gb4_plus, SEEK_SET); LONG_EQ(check_val, 0, "fseeko64 above 4 GB"); offset = ftello64(fh); OK((offset == gb4_plus), "ftello64 above 4 GB"); check_val = fprintf(fh, "X"); LONG_EQ(check_val, 1, "print above 4 GB"); check_val = fseeko64(fh, gb2_plus, SEEK_SET); LONG_EQ(check_val, 0, "fseeko64 above 2 GB"); offset = ftello64(fh); OK((offset == gb2_plus), "ftello64 above 2 GB"); check_val = fseeko64(fh, -1, SEEK_END); LONG_EQ(check_val, 0, "seek to near end"); check_char = fgetc(fh); LONG_EQ(check_char, 'X', "read value after multiple seeks"); check_val = fclose(fh); LONG_EQ(check_val, 0, "fclose succeeds after all that"); /* Truncate, just in case the call to remove fails. */ fh = fopen64("_charm_large_file_test", "w+"); if (fh != NULL) { fclose(fh); } remove("_charm_large_file_test"); #ifndef HAS_64BIT_LSEEK SKIP_REMAINING("No 64-bit lseek"); return; #else fd = open("_charm_large_file_test", O_RDWR | O_CREAT | LARGEFILE_OPEN_FLAG, 0666); if (fd == -1) { FAIL("open failed"); SKIP_REMAINING("open failed"); return; } offset = lseek64(fd, gb4_plus, SEEK_SET); OK(offset == gb4_plus, "lseek64 above 4 GB"); offset = lseek64(fd, 0, SEEK_CUR); OK(offset == gb4_plus, "lseek64 in place above 4 GB"); check_val = write(fd, "X", 1); LONG_EQ(check_val, 1, "write() above 4 GB"); offset = lseek64(fd, gb2_plus, SEEK_SET); OK(offset == gb2_plus, "lseek64 above 2 GB"); offset = lseek64(fd, 0, SEEK_CUR); OK((offset == gb2_plus), "lseek64 in place above 2 GB"); offset = lseek64(fd, -1, SEEK_END); OK(offset == gb4_plus, "seek to near end"); check_val = read(fd, &check_char, 1); LONG_EQ(check_val, 1, "read() after multiple lseek64 calls"); LONG_EQ(check_char, 'X', "read() correct data after multiple lseek64 calls"); #ifdef HAS_64BIT_PREAD check_char = 0; check_val = pread64(fd, &check_char, 1, gb4_plus); LONG_EQ(check_val, 1, "pread64"); LONG_EQ(check_char, 'X', "pread64() correct data"); #else SKIP("no pread64"); SKIP("no pread64"); #endif check_val = close(fd); LONG_EQ(check_val, 0, "close succeeds after all that"); #endif /* Truncate, just in case the call to remove fails. */ fh = fopen64("_charm_large_file_test", "w+"); if (fh != NULL) { fclose(fh); } remove("_charm_large_file_test"); #endif /* STAT_TESTS_ENABLED */ } #ifdef STAT_TESTS_ENABLED static chaz_bool_t S_check_sparse_files(void) { struct stat st_a, st_b; /* Write and stat a 1 MB file and a 2 MB file, both of them sparse. */ if (!S_test_sparse_file(1000000, &st_a)) { return false; } if (!S_test_sparse_file(2000000, &st_b)) { return false; } if (st_a.st_size != 1000001 || st_b.st_size != 2000001) { return false; } /* See if two files with very different lengths have the same block size. */ return st_a.st_blocks == st_b.st_blocks ? true : false; } static chaz_bool_t S_test_sparse_file(long offset, struct stat *st) { FILE *sparse_fh; chaz_bool_t result = false; /* Make sure the file's not there, then open. */ remove("_charm_sparse"); if ((sparse_fh = fopen64("_charm_sparse", "w+")) == NULL) { return false; } /* Seek fh to [offset], write a byte, close file. */ if ((fseeko64(sparse_fh, offset, SEEK_SET)) != -1) { if ((fprintf(sparse_fh, "X")) == 1) { result = true; } } if (fclose(sparse_fh)) { result = false; } /* Stat the file. */ stat("_charm_sparse", st); remove("_charm_sparse"); return true; } static chaz_bool_t S_can_create_big_files(void) { chy_bool_t result = 0; FILE *fh = fopen64("_charm_large_file_test", "w+"); if (!fh) { return false; } else { /* Bail unless seek succeeds. */ int64_t check_seek = fseeko64(fh, I64_C(5000000000), SEEK_SET); if (check_seek != -1) { /* Bail unless we write successfully. */ if (fprintf(fh, "X") == 1) { result = true; } } if (fclose(fh)) { result = false; } } /* Truncate, just in case the call to remove fails. */ fh = fopen64("_charm_large_file_test", "w"); if (fh != NULL) { fclose(fh); } remove("_charm_large_file_test"); return result; } #endif /* STAT_TESTS_ENABLED */ int main(int argc, char **argv) { Test_start(20); S_run_tests(); return !Test_finish(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestUnusedVars.c000066400000000000000000000023671233767526200255600ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "charmony.h" #include "Charmonizer/Test.h" static void S_run_tests(void) { #ifdef UNUSED_VAR PASS("UNUSED_VAR macro is defined"); #else FAIL("UNUSED_VAR macro is defined"); #endif #ifdef UNREACHABLE_RETURN PASS("UNREACHABLE_RETURN macro is defined"); #else FAIL("UNREACHABLE_RETURN macro is defined"); #endif } int main(int argc, char **argv) { Test_start(2); S_run_tests(); return !Test_finish(); } liblucy-perl-0.3.3/charmonizer/src/Charmonizer/Test/TestVariadicMacros.c000066400000000000000000000036721233767526200263500ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CHAZ_USE_SHORT_NAMES #include "charmony.h" #include #include #include "Charmonizer/Test.h" static void S_run_tests(void) { char buf[10]; chaz_bool_t really_has_var_macs = false; #if defined(HAS_ISO_VARIADIC_MACROS) || defined(HAS_GNUC_VARIADIC_MACROS) #ifdef HAS_VARIADIC_MACROS PASS("#defines agree"); #else FAIL(0, "#defines agree"); #endif #else SKIP_REMAINING("No variadic macro support"); return; #endif #ifdef HAS_ISO_VARIADIC_MACROS #define ISO_TEST(buffer, fmt, ...) \ sprintf(buffer, fmt, __VA_ARGS__) really_has_var_macs = true; ISO_TEST(buf, "%s", "iso"); STR_EQ(buf, "iso", "ISO variadic macros work"); #else SKIP("No ISO variadic macros"); #endif #ifdef HAS_GNUC_VARIADIC_MACROS #define GNU_TEST(buffer, fmt, args...) \ sprintf(buffer, fmt, ##args ) really_has_var_macs = true; GNU_TEST(buf, "%s", "gnu"); STR_EQ(buf, "gnu", "GNUC variadic macros work"); #else SKIP("No GNUC variadic macros"); #endif OK(really_has_var_macs, "either ISO or GNUC"); } int main(int argc, char **argv) { Test_start(4); S_run_tests(); return !Test_finish(); } liblucy-perl-0.3.3/clownfish/000077500000000000000000000000001233767526200161315ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/include/000077500000000000000000000000001233767526200175545ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/include/CFC.h000066400000000000000000000025221233767526200203210ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "CFCBase.h" #include "CFCCBlock.h" #include "CFCClass.h" #include "CFCDocuComment.h" #include "CFCDumpable.h" #include "CFCFile.h" #include "CFCFunction.h" #include "CFCHierarchy.h" #include "CFCMethod.h" #include "CFCMemPool.h" #include "CFCParamList.h" #include "CFCParcel.h" #include "CFCParser.h" #include "CFCSymbol.h" #include "CFCType.h" #include "CFCUtil.h" #include "CFCVariable.h" #include "CFCBindCore.h" #include "CFCBindAliases.h" #include "CFCBindClass.h" #include "CFCBindFile.h" #include "CFCBindFunction.h" #include "CFCBindMethod.h" liblucy-perl-0.3.3/clownfish/perl/000077500000000000000000000000001233767526200170735ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/Build.PL000066400000000000000000000031011233767526200203620ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use 5.008003; use strict; use warnings; use lib 'buildlib'; use Clownfish::CFC::Build; use File::Spec::Functions qw( updir catdir ); my $builder = Clownfish::CFC::Build->new( module_name => 'Clownfish::CFC', license => 'apache', dist_author => 'The Apache Lucy Project ', dist_version_from => 'lib/Clownfish/CFC.pm', build_requires => { 'ExtUtils::CBuilder' => 0.18, 'ExtUtils::ParseXS' => 2.16, 'Devel::PPPort' => 3.13, }, include_dirs => [ catdir( updir(), 'include' ) ], c_source => catdir( updir(), 'src' ), add_to_cleanup => [ qw( MANIFEST.bak perltidy.ERR *.pdb *.manifest ), ], ); $builder->create_build_script(); liblucy-perl-0.3.3/clownfish/perl/MANIFEST000066400000000000000000000030631233767526200202260ustar00rootroot00000000000000Build.PL buildlib/Clownfish/CFC/Build.pm lib/Clownfish/CFC.pm lib/Clownfish/CFC.xs lib/Clownfish/CFC/Base.pm lib/Clownfish/CFC/Binding/Core.pm lib/Clownfish/CFC/Binding/Core/Aliases.pm lib/Clownfish/CFC/Binding/Core/Class.pm lib/Clownfish/CFC/Binding/Core/File.pm lib/Clownfish/CFC/Binding/Core/Function.pm lib/Clownfish/CFC/Binding/Core/Method.pm lib/Clownfish/CFC/Binding/Perl.pm lib/Clownfish/CFC/Binding/Perl/Class.pm lib/Clownfish/CFC/Binding/Perl/Constructor.pm lib/Clownfish/CFC/Binding/Perl/Method.pm lib/Clownfish/CFC/Binding/Perl/Subroutine.pm lib/Clownfish/CFC/Binding/Perl/TypeMap.pm lib/Clownfish/CFC/CBlock.pm lib/Clownfish/CFC/Class.pm lib/Clownfish/CFC/DocuComment.pm lib/Clownfish/CFC/Dumpable.pm lib/Clownfish/CFC/File.pm lib/Clownfish/CFC/Function.pm lib/Clownfish/CFC/Hierarchy.pm lib/Clownfish/CFC/Method.pm lib/Clownfish/CFC/ParamList.pm lib/Clownfish/CFC/Parcel.pm lib/Clownfish/CFC/Parser.pm lib/Clownfish/CFC/Symbol.pm lib/Clownfish/CFC/Type.pm lib/Clownfish/CFC/Util.pm lib/Clownfish/CFC/Variable.pm MANIFEST This list of files t/000-load.t t/001-util.t t/050-docucomment.t t/051-symbol.t t/100-type.t t/101-primitive_type.t t/102-integer_type.t t/103-float_type.t t/104-void_type.t t/105-object_type.t t/106-va_list_type.t t/107-arbitrary_type.t t/108-composite_type.t t/200-function.t t/201-method.t t/202-overridden_method.t t/203-final_method.t t/300-variable.t t/301-param_list.t t/400-class.t t/401-c_block.t t/402-parcel.t t/403-file.t t/500-hierarchy.t t/600-parser.t t/cfsource/Animal.cfh t/cfsource/Animal/Dog.cfh t/cfsource/Animal/Util.cfh typemap liblucy-perl-0.3.3/clownfish/perl/buildlib/000077500000000000000000000000001233767526200206615ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/buildlib/Clownfish/000077500000000000000000000000001233767526200226155ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/buildlib/Clownfish/CFC/000077500000000000000000000000001233767526200232105ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/buildlib/Clownfish/CFC/Build.pm000066400000000000000000000131741233767526200246130ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use warnings; package Clownfish::CFC::Build; use base qw( Module::Build ); use File::Spec::Functions qw( catfile updir catdir ); use Config; use Cwd qw( getcwd ); my $base_dir = catdir( updir(), updir() ); my $PPPORT_H_PATH = catfile( updir(), qw( include ppport.h ) ); my $LEMON_DIR = catdir( $base_dir, 'lemon' ); my $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" ); my $CFC_SOURCE_DIR = catdir( updir(), 'src' ); sub extra_ccflags { my $self = shift; my $extra_ccflags = "-DCFCPERL "; $extra_ccflags .= "$ENV{CFLAGS} " if defined $ENV{CFLAGS}; my $gcc_version = $ENV{REAL_GCC_VERSION} || $self->config('gccversion') || undef; if ( defined $gcc_version ) { $gcc_version =~ /^(\d+(\.\d+))/ or die "Invalid GCC version: $gcc_version"; $gcc_version = $1; } if ( defined $ENV{LUCY_DEBUG} ) { if ( defined $gcc_version ) { $extra_ccflags .= "-DLUCY_DEBUG "; $extra_ccflags .= "-DPERL_GCC_PEDANTIC -std=gnu99 -pedantic -Wall "; $extra_ccflags .= "-Wextra " if $gcc_version >= 3.4; # correct $extra_ccflags .= "-Wno-variadic-macros " if $gcc_version > 3.4; # at least not on gcc 3.4 } } if ( $ENV{LUCY_VALGRIND} and defined $gcc_version ) { $extra_ccflags .= "-fno-inline-functions "; } # Compile as C++ under MSVC. Turn off stupid warnings, too. if ( $self->config('cc') =~ /^cl\b/ ) { $extra_ccflags .= '/TP -D_CRT_SECURE_NO_WARNINGS '; } if ( defined $gcc_version ) { # Tell GCC explicitly to run with maximum options. if ( $extra_ccflags !~ m/-std=/ ) { $extra_ccflags .= "-std=gnu99 "; } if ( $extra_ccflags !~ m/-D_GNU_SOURCE/ ) { $extra_ccflags .= "-D_GNU_SOURCE "; } } return $extra_ccflags; } sub new { my ( $class, %args ) = @_; return $class->SUPER::new( %args, recursive_test_files => 1, extra_compiler_flags => __PACKAGE__->extra_ccflags, ); } sub _run_make { my ( $self, %params ) = @_; my @command = @{ $params{args} }; my $dir = $params{dir}; my $current_directory = getcwd(); chdir $dir if $dir; unshift @command, 'CC=' . $self->config('cc'); if ( $self->config('cc') =~ /^cl\b/ ) { unshift @command, "-f", "Makefile.MSVC"; } elsif ( $^O =~ /mswin/i ) { unshift @command, "-f", "Makefile.MinGW"; } unshift @command, "$Config{make}"; system(@command) and confess("$Config{make} failed"); chdir $current_directory if $dir; } # Write ppport.h, which supplies some XS routines not found in older Perls and # allows us to use more up-to-date XS API while still supporting Perls back to # 5.8.3. # # The Devel::PPPort docs recommend that we distribute ppport.h rather than # require Devel::PPPort itself, but ppport.h isn't compatible with the Apache # license. sub ACTION_ppport { my $self = shift; if ( !-e $PPPORT_H_PATH ) { require Devel::PPPort; $self->add_to_cleanup($PPPORT_H_PATH); Devel::PPPort::WriteFile($PPPORT_H_PATH); } } # Build the Lemon parser generator. sub ACTION_lemon { my $self = shift; print "Building the Lemon parser generator...\n\n"; $self->_run_make( dir => $LEMON_DIR, args => [], ); } # Run all .y files through lemon. sub ACTION_parsers { my $self = shift; $self->dispatch('lemon'); my $y_files = $self->rscan_dir( $CFC_SOURCE_DIR, qr/\.y$/ ); for my $y_file (@$y_files) { my $c_file = $y_file; my $h_file = $y_file; $c_file =~ s/\.y$/.c/ or die "no match"; $h_file =~ s/\.y$/.h/ or die "no match"; next if $self->up_to_date( $y_file, $c_file ); $self->add_to_cleanup( $c_file, $h_file ); my $lemon_report_file = $y_file; $lemon_report_file =~ s/\.y$/.out/ or die "no match"; $self->add_to_cleanup($lemon_report_file); system( $LEMON_EXE_PATH, '-c', $y_file ) and die "lemon failed"; } } # Run all .l files through flex. sub ACTION_lexers { my $self = shift; my $l_files = $self->rscan_dir( $CFC_SOURCE_DIR, qr/\.l$/ ); # Rerun flex if lemon file changes. my $y_files = $self->rscan_dir( $CFC_SOURCE_DIR, qr/\.y$/ ); for my $l_file (@$l_files) { my $c_file = $l_file; my $h_file = $l_file; $c_file =~ s/\.l$/.c/ or die "no match"; $h_file =~ s/\.l$/.h/ or die "no match"; next if $self->up_to_date( [ $l_file, @$y_files ], [ $c_file, $h_file ] ); system( 'flex', '-o', $c_file, "--header-file=$h_file", $l_file ) and die "flex failed"; } } sub ACTION_code { my $self = shift; $self->dispatch('ppport'); $self->dispatch('parsers'); $self->SUPER::ACTION_code; } 1; liblucy-perl-0.3.3/clownfish/perl/lib/000077500000000000000000000000001233767526200176415ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish.pod000066400000000000000000000130341233767526200223020ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. =head1 NAME Clownfish - A small OO language that forms symbiotic relationships with "host" languages. =head1 PRIVATE API Clownfish is an Apache Lucy implementation detail. This documentation is partial -- enough for the curious hacker, but not a full API. =head1 DESCRIPTION =head2 Overview. Clownfish is a small language for declaring an object oriented interface and a compiler which allows classes to be implemented either in C, in a "host" language, or a combination of both. =head2 Why use Clownfish? =over =item * Clownfish-based projects give users the ability to write full subclasses in any "host" language for which a binding has been prepared. =item * Pure C Clownfish class implementations are very fast. =item * Users can perform rapid prototyping in their language of choice, then port their classes to C either for speed or to make them available across multiple language platforms. =item * =back =head2 Object Model Clownfish is single-inheritance and class based -- a minimalist design which makes it as compatible as possible with a broad range of hosts. Subclasses may be created either at compile time or at run time. =back =head2 C method invocation syntax. Methods are differentiated from functions via capitalization: Boat_capsize() is a function, Boat_Capsize() is a method. // Base method. void Boat_capsize(Boat *self) { self->upside_down = true; } // Implementing function, in Boat/Battleship.c void Battleship_capsize(Battleship *self) { // Superclass method invocation. Boat_capsize_t capsize = (Boat_capsize_t)SUPER_METHOD( BATTLESHIP, Battleship, Capsize); capsize((Boat*)self); // Subclass-specific behavior. Battleship_Sink(self); } // Implementing function, in Boat/RubberDinghy.c void RubDing_capsize(RubberDinghy *self) { // Superclass method invocation. Boat_capsize_t capsize = (Boat_capsize_t)SUPER_METHOD( RUBBERDINGHY, RubDing, Capsize); capsize((Boat*)self); // Subclass-specific behavior. RubDing_Drift(self); } =head2 Class declaration syntax [final] [inert] class CLASSNAME [cnick CNICK] [inherits PARENT] [ : ATTRIBUTE ]* { [declarations] } Example: class Boat::RubberDinghy cnick RubDing inherits Boat { public inert incremented RubberDinghy* new(); void Capsize(RubberDinghy *self); } =over =item * B - The name of this class. The last string of characters will be used as the object's C struct name. =item * B - A recognizable abbreviation of the class name, used as a prefix for every function and method. =item * B - The full name of the parent class. =item * B - An arbitrary attribute, e.g. "dumpable", or perhaps "serializable". A class may have multiple attributes, each preceded by a colon. =back =head2 Memory management At present, memory is managed via a reference counting scheme, but this is not inherently part of Clownfish. =head2 Namespaces, parcels, prefixes, and "short names" There are two levels of namespacing in Clownfish: parcels and classes. Clownfish classes intended to be published as a single unit may be grouped together using a "parcel". Parcel directives need to go at the top of each class file. parcel Crustacean cnick Crust; All symbols generated by Clownfish for classes within a parcel will be prefixed by varying capitalizations of the parcel's C-nickname or "cnick" in order to avoid namespace collisions with other projects. Within a parcel, the last part of each class name must be unique. class Crustacean::Lobster::Claw { ... } class Crustacean::Crab::Claw { ... } // Illegal, "Claw" already used "Short names" -- names minus the parcel prefix -- will be auto-generated for all class symbols. When there is no danger of namespace collision, typically because no third-party non-system libraries are being pound-included, the short names can be used after a USE_SHORT_NAMES directive: #define CRUST_USE_SHORT_NAMES The USE_SHORT_NAMES directives do not affect class prefixes, only parcel prefixes. // No short names. crust_LobsterClaw *claw = crust_LobClaw_new(); // With short names. #define CRUST_USE_SHORT_NAMES LobsterClaw *claw = LobClaw_new(); =head2 Inclusion C header code generated by the Clownfish compiler is written to a file with whose name is the same as the .cfh file, but with an extension of ".h". C code should pound-include "Crustacean/Lobster.h" for a class defined in "Crustacean/Lobster.cfh". =head1 COPYRIGHT Clownfish is distributed under the Apache License, Version 2.0, as described in the file C included with the distribution. =cut liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/000077500000000000000000000000001233767526200215755ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC.pm000066400000000000000000000462251233767526200225370ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use warnings; package Clownfish::CFC; our $VERSION = '0.01'; END { Clownfish::CFC::Class->_clear_registry(); Clownfish::CFC::Parcel->reap_singletons(); } use XSLoader; BEGIN { XSLoader::load( 'Clownfish::CFC', '0.01' ) } { package Clownfish::CFC::Util; use base qw( Exporter ); use Scalar::Util qw( blessed ); use Carp; use Fcntl; BEGIN { our @EXPORT_OK = qw( slurp_text current strip_c_comments verify_args a_isa_b write_if_changed trim_whitespace is_dir make_dir make_path ); } # Verify that named parameters exist in a defaults hash. Returns false # and sets $@ if a problem is detected. sub verify_args { my $defaults = shift; # leave the rest of @_ intact # Verify that args came in pairs. if ( @_ % 2 ) { my ( $package, $filename, $line ) = caller(1); $@ = "Parameter error: odd number of args at $filename line $line\n"; return 0; } # Verify keys, ignore values. while (@_) { my ( $var, undef ) = ( shift, shift ); next if exists $defaults->{$var}; my ( $package, $filename, $line ) = caller(1); $@ = "Invalid parameter: '$var' at $filename line $line\n"; return 0; } return 1; } sub a_isa_b { my ( $thing, $class ) = @_; return 0 unless blessed($thing); return $thing->isa($class); } } { package Clownfish::CFC::Base; } { package Clownfish::CFC::CBlock; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args ); use Carp; our %new_PARAMS = ( contents => undef, ); sub new { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_PARAMS, %args ) or confess $@; confess("Missing required param 'contents'") unless defined $args{contents}; return _new( $args{contents} ); } } { package Clownfish::CFC::Class; BEGIN { push our @ISA, 'Clownfish::CFC::Symbol' } use Carp; use Config; use Clownfish::CFC::Util qw( verify_args a_isa_b ); our %create_PARAMS = ( source_class => undef, class_name => undef, cnick => undef, parent_class_name => undef, docucomment => undef, inert => undef, final => undef, parcel => undef, exposure => 'parcel', ); our %fetch_singleton_PARAMS = ( parcel => undef, class_name => undef, ); sub fetch_singleton { my ( undef, %args ) = @_; verify_args( \%fetch_singleton_PARAMS, %args ) or confess $@; # Maybe prepend parcel prefix. my $parcel = $args{parcel}; if ( defined $parcel ) { if ( !a_isa_b( $parcel, "Clownfish::CFC::Parcel" ) ) { $parcel = Clownfish::CFC::Parcel->singleton( name => $parcel ); } } return _fetch_singleton( $parcel, $args{class_name} ); } sub new { confess("The constructor for Clownfish::CFC::Class is create()"); } sub create { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%create_PARAMS, %args ) or confess $@; $args{parcel} = Clownfish::CFC::Parcel->acquire( $args{parcel} ); return _create( @args{ qw( parcel exposure class_name cnick micro_sym docucomment source_class parent_class_name final inert ) } ); } } { package Clownfish::CFC::DocuComment; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } } { package Clownfish::CFC::Dumpable; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } } { package Clownfish::CFC::File; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args ); use Carp; our %new_PARAMS = ( source_class => undef, ); sub new { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_PARAMS, %args ) or confess $@; return _new( $args{source_class} ); } } { package Clownfish::CFC::Function; BEGIN { push our @ISA, 'Clownfish::CFC::Symbol' } use Carp; use Clownfish::CFC::Util qw( verify_args a_isa_b ); my %new_PARAMS = ( return_type => undef, class_name => undef, class_cnick => undef, param_list => undef, micro_sym => undef, docucomment => undef, parcel => undef, inline => undef, exposure => undef, ); sub new { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_PARAMS, %args ) or confess $@; $args{inline} ||= 0; $args{parcel} = Clownfish::CFC::Parcel->acquire( $args{parcel} ); return _new( @args{ qw( parcel exposure class_name class_cnick micro_sym return_type param_list docucomment inline ) } ); } } { package Clownfish::CFC::Hierarchy; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Carp; use Clownfish::CFC::Util qw( verify_args ); our %new_PARAMS = ( source => undef, dest => undef, ); sub new { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_PARAMS, %args ) or confess $@; return _new( @args{qw( source dest )} ); } } { package Clownfish::CFC::Method; BEGIN { push our @ISA, 'Clownfish::CFC::Function' } use Clownfish::CFC::Util qw( verify_args ); use Carp; my %new_PARAMS = ( return_type => undef, class_name => undef, class_cnick => undef, param_list => undef, macro_sym => undef, docucomment => undef, parcel => undef, abstract => undef, final => undef, exposure => 'parcel', ); sub new { my ( $either, %args ) = @_; verify_args( \%new_PARAMS, %args ) or confess $@; confess "no subclassing allowed" unless $either eq __PACKAGE__; $args{abstract} ||= 0; $args{parcel} = Clownfish::CFC::Parcel->acquire( $args{parcel} ); $args{final} ||= 0; return _new( @args{ qw( parcel exposure class_name class_cnick macro_sym return_type param_list docucomment final abstract ) } ); } } { package Clownfish::CFC::ParamList; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args ); use Carp; our %new_PARAMS = ( variadic => undef, ); sub new { my ( $either, %args ) = @_; verify_args( \%new_PARAMS, %args ) or confess $@; confess "no subclassing allowed" unless $either eq __PACKAGE__; my $variadic = delete $args{variadic} || 0; return _new($variadic); } } { package Clownfish::CFC::Parcel; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args ); use Scalar::Util qw( blessed ); use Carp; our %singleton_PARAMS = ( name => undef, cnick => undef, ); sub singleton { my ( $either, %args ) = @_; verify_args( \%singleton_PARAMS, %args ) or confess $@; confess "no subclassing allowed" unless $either eq __PACKAGE__; return _singleton( @args{qw( name cnick )} ); } # $parcel = Clownfish::CFC::Parcel->aquire($parcel_name_or_parcel_object); # # Aquire a parcel one way or another. If the supplied argument is a # Parcel, return it. If it's not defined, return the default Parcel. If # it's a name, invoke singleton(). sub acquire { my ( undef, $thing ) = @_; if ( !defined $thing ) { return Clownfish::CFC::Parcel->default_parcel; } elsif ( blessed($thing) ) { confess("Not a Clownfish::CFC::Parcel") unless $thing->isa('Clownfish::CFC::Parcel'); return $thing; } else { return Clownfish::CFC::Parcel->singleton( name => $thing ); } } } { package Clownfish::CFC::Parser; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } } { package Clownfish::CFC::Parser; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } } { package Clownfish::CFC::Symbol; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args ); use Carp; my %new_PARAMS = ( parcel => undef, exposure => undef, class_name => undef, class_cnick => undef, micro_sym => undef, ); sub new { my ( $either, %args ) = @_; verify_args( \%new_PARAMS, %args ) or confess $@; confess "no subclassing allowed" unless $either eq __PACKAGE__; $args{parcel} = Clownfish::CFC::Parcel->acquire( $args{parcel} ); return _new( @args{qw( parcel exposure class_name class_cnick micro_sym )} ); } } { package Clownfish::CFC::Type; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args a_isa_b ); use Scalar::Util qw( blessed ); use Carp; our %new_PARAMS = ( const => undef, specifier => undef, indirection => undef, parcel => undef, c_string => undef, void => undef, object => undef, primitive => undef, integer => undef, floating => undef, string_type => undef, va_list => undef, arbitrary => undef, composite => undef, ); sub new { my ( $either, %args ) = @_; my $package = ref($either) || $either; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_PARAMS, %args ) or confess $@; my $flags = 0; $flags |= CONST if $args{const}; $flags |= NULLABLE if $args{nullable}; $flags |= VOID if $args{void}; $flags |= OBJECT if $args{object}; $flags |= PRIMITIVE if $args{primitive}; $flags |= INTEGER if $args{integer}; $flags |= FLOATING if $args{floating}; $flags |= STRING_TYPE if $args{string_type}; $flags |= VA_LIST if $args{va_list}; $flags |= ARBITRARY if $args{arbitrary}; $flags |= COMPOSITE if $args{composite}; my $parcel = $args{parcel} ? Clownfish::CFC::Parcel->acquire( $args{parcel} ) : $args{parcel}; my $indirection = $args{indirection} || 0; my $specifier = $args{specifier} || ''; my $c_string = $args{c_string} || ''; return _new( $flags, $parcel, $specifier, $indirection, $c_string ); } our %new_integer_PARAMS = ( const => undef, specifier => undef, ); sub new_integer { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_integer_PARAMS, %args ) or confess $@; my $flags = 0; $flags |= CONST if $args{const}; return _new_integer( $flags, $args{specifier} ); } our %new_float_PARAMS = ( const => undef, specifier => undef, ); sub new_float { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_float_PARAMS, %args ) or confess $@; my $flags = 0; $flags |= CONST if $args{const}; return _new_float( $flags, $args{specifier} ); } our %new_object_PARAMS = ( const => undef, specifier => undef, indirection => 1, parcel => undef, incremented => 0, decremented => 0, nullable => 0, ); sub new_object { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_object_PARAMS, %args ) or confess $@; my $flags = 0; $flags |= INCREMENTED if $args{incremented}; $flags |= DECREMENTED if $args{decremented}; $flags |= NULLABLE if $args{nullable}; $flags |= CONST if $args{const}; $args{indirection} = 1 unless defined $args{indirection}; my $parcel = Clownfish::CFC::Parcel->acquire( $args{parcel} ); my $package = ref($either) || $either; confess("Missing required param 'specifier'") unless defined $args{specifier}; return _new_object( $flags, $parcel, $args{specifier}, $args{indirection} ); } our %new_composite_PARAMS = ( child => undef, indirection => undef, array => undef, nullable => undef, ); sub new_composite { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_composite_PARAMS, %args ) or confess $@; my $flags = 0; $flags |= NULLABLE if $args{nullable}; my $indirection = $args{indirection} || 0; my $array = defined $args{array} ? $args{array} : ""; return _new_composite( $flags, $args{child}, $indirection, $array ); } our %new_void_PARAMS = ( const => undef, ); sub new_void { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_void_PARAMS, %args ) or confess $@; return _new_void( !!$args{const} ); } sub new_va_list { my $either = shift; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( {}, @_ ) or confess $@; return _new_va_list(); } our %new_arbitrary_PARAMS = ( parcel => undef, specifier => undef, ); sub new_arbitrary { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_arbitrary_PARAMS, %args ) or confess $@; my $parcel = Clownfish::CFC::Parcel->acquire( $args{parcel} ); return _new_arbitrary( $parcel, $args{specifier} ); } } { package Clownfish::CFC::Variable; BEGIN { push our @ISA, 'Clownfish::CFC::Symbol' } use Clownfish::CFC::Util qw( verify_args ); use Carp; our %new_PARAMS = ( type => undef, micro_sym => undef, parcel => undef, exposure => 'local', class_name => undef, class_cnick => undef, inert => undef, ); sub new { my ( $either, %args ) = @_; confess "no subclassing allowed" unless $either eq __PACKAGE__; verify_args( \%new_PARAMS, %args ) or confess $@; $args{exposure} ||= 'local'; $args{parcel} = Clownfish::CFC::Parcel->acquire( $args{parcel} ); return _new( @args{ qw( parcel exposure class_name class_cnick micro_sym type inert ) } ); } } { package Clownfish::CFC::Binding::Core; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( verify_args ); use Carp; our %new_PARAMS = ( hierarchy => undef, dest => undef, header => undef, footer => undef, ); sub new { my ( $either, %args ) = @_; verify_args( \%new_PARAMS, %args ) or confess $@; return _new( @args{qw( hierarchy dest header footer )} ); } } { package Clownfish::CFC::Binding::Core::Class; BEGIN { push our @ISA, 'Clownfish::CFC::Base' } use Clownfish::CFC::Util qw( a_isa_b verify_args ); use Carp; our %new_PARAMS = ( client => undef, ); sub new { my ( $either, %args ) = @_; verify_args( \%new_PARAMS, %args ) or confess $@; return _new( $args{client} ); } } { package Clownfish::CFC::Binding::Core::File; use Clownfish::CFC::Util qw( verify_args ); use Carp; my %write_h_PARAMS = ( file => undef, dest => undef, header => undef, footer => undef, ); sub write_h { my ( undef, %args ) = @_; verify_args( \%write_h_PARAMS, %args ) or confess $@; _write_h( @args{qw( file dest header footer )} ); } } { package Clownfish::CFC::Binding::Core::Method; sub method_def { my ( undef, %args ) = @_; return _method_def( @args{qw( method class )} ); } sub callback_obj_def { my ( undef, %args ) = @_; return _callback_obj_def( @args{qw( method offset )} ); } } { package Clownfish::CFC::Binding::Perl; use Clownfish::CFC::Binding::Perl; } { package Clownfish::CFC::Binding::Perl::Class; use Clownfish::CFC::Binding::Perl::Class; } { package Clownfish::CFC::Binding::Perl::Constructor; use Clownfish::CFC::Binding::Perl::Class; } { package Clownfish::CFC::Binding::Perl::Method; use Clownfish::CFC::Binding::Perl::Method; } { package Clownfish::CFC::Binding::Perl::Subroutine; use Clownfish::CFC::Binding::Perl::Subroutine; } { package Clownfish::CFC::Binding::Perl::TypeMap; use Clownfish::CFC::Binding::Perl::TypeMap; } 1; =head1 NAME Clownfish::CFC - Clownfish compiler. =head1 PRIVATE API CFC is an Apache Lucy implementation detail. This documentation is partial -- enough for the curious hacker, but not a full API. =head1 SYNOPSIS use Clownfish::CFC::Hierarchy; use Clownfish::CFC::Binding::Core; # Compile all .cfh files in $cf_source into 'autogen'. my $hierarchy = Clownfish::CFC::Hierarchy->new( source => $cf_source, dest => 'autogen', ); $hierarchy->build; my $core_binding = Clownfish::CFC::Binding::Core->new( hierarchy => $hierarchy, dest => 'autogen', header => $license_header, footer => '', ); $core_binding->write_all_modified; =head1 COPYRIGHT Clownfish is distributed under the Apache License, Version 2.0, as described in the file C included with the distribution. =cut liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC.xs000066400000000000000000001363331233767526200225550ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "CFC.h" /* Rather than provide an XSUB for each accessor, we can use one multipath * accessor function per class, with several Perl-space aliases. All set * functions have odd-numbered aliases, and all get functions have * even-numbered aliases. These two macros serve as bookends for the switch * function. */ #define START_SET_OR_GET_SWITCH \ SV *retval = &PL_sv_undef; \ /* If called as a setter, make sure the extra arg is there. */ \ if (ix % 2 == 1) { \ if (items != 2) { croak("usage: $object->set_xxxxxx($val)"); } \ } \ else { \ if (items != 1) { croak("usage: $object->get_xxxxx()"); } \ } \ switch (ix) { #define END_SET_OR_GET_SWITCH \ default: croak("Internal error. ix: %d", (int)ix); \ } \ if (ix % 2 == 0) { \ XPUSHs(sv_2mortal(retval)); \ XSRETURN(1); \ } \ else { \ XSRETURN(0); \ } static SV* S_cfcbase_to_perlref(void *thing) { SV *ref = newSV(0); if (thing) { const char *klass = CFCBase_get_cfc_class((CFCBase*)thing); CFCBase_incref((CFCBase*)thing); sv_setref_pv(ref, klass, (void*)thing); } return ref; } // Transform a NULL-terminated array of CFCBase* into a Perl arrayref. static SV* S_array_of_cfcbase_to_av(CFCBase **things) { AV *av = newAV(); size_t i; for (i = 0; things[i] != NULL; i++) { SV *val = S_cfcbase_to_perlref(things[i]); av_store(av, i, val); } SV *retval = newRV((SV*)av); SvREFCNT_dec(av); return retval; } static SV* S_sv_eat_c_string(char *string) { if (string) { SV *sv = newSVpvn(string, strlen(string)); FREEMEM(string); return sv; } else { return newSV(0); } } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Base void DESTROY(self) CFCBase *self; PPCODE: CFCBase_decref((CFCBase*)self); MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::CBlock SV* _new(contents) const char *contents; CODE: CFCCBlock *self = CFCCBlock_new(contents); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void _set_or_get(self, ...) CFCCBlock *self; ALIAS: get_contents = 2 PPCODE: { START_SET_OR_GET_SWITCH case 2: { const char *contents = CFCCBlock_get_contents(self); retval = newSVpvn(contents, strlen(contents)); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Class SV* _create(parcel, exposure_sv, class_name_sv, cnick_sv, micro_sym_sv, docucomment, source_class_sv, parent_class_name_sv, is_final, is_inert) CFCParcel *parcel; SV *exposure_sv; SV *class_name_sv; SV *cnick_sv; SV *micro_sym_sv; CFCDocuComment *docucomment; SV *source_class_sv; SV *parent_class_name_sv; bool is_final; bool is_inert; CODE: const char *exposure = SvOK(exposure_sv) ? SvPV_nolen(exposure_sv) : NULL; const char *class_name = SvOK(class_name_sv) ? SvPV_nolen(class_name_sv) : NULL; const char *cnick = SvOK(cnick_sv) ? SvPV_nolen(cnick_sv) : NULL; const char *micro_sym = SvOK(micro_sym_sv) ? SvPV_nolen(micro_sym_sv) : NULL; const char *source_class = SvOK(source_class_sv) ? SvPV_nolen(source_class_sv) : NULL; const char *parent_class_name = SvOK(parent_class_name_sv) ? SvPV_nolen(parent_class_name_sv) : NULL; CFCClass *self = CFCClass_create(parcel, exposure, class_name, cnick, micro_sym, docucomment, source_class, parent_class_name, is_final, is_inert); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _fetch_singleton(parcel, class_name) CFCParcel *parcel; const char *class_name; CODE: CFCClass *klass = CFCClass_fetch_singleton(parcel, class_name); RETVAL = S_cfcbase_to_perlref(klass); OUTPUT: RETVAL void _clear_registry(...) PPCODE: CFCClass_clear_registry(); void append_autocode(self, autocode) CFCClass *self; const char *autocode; PPCODE: CFCClass_append_autocode(self, autocode); void add_child(self, child) CFCClass *self; CFCClass *child; PPCODE: CFCClass_add_child(self, child); void add_member_var(self, var) CFCClass *self; CFCVariable *var; PPCODE: CFCClass_add_member_var(self, var); void add_function(self, func) CFCClass *self; CFCFunction *func; PPCODE: CFCClass_add_function(self, func); void add_method(self, method) CFCClass *self; CFCMethod *method; PPCODE: CFCClass_add_method(self, method); void add_attribute(self, name, value_sv) CFCClass *self; const char *name; SV *value_sv; PPCODE: char *value = SvOK(value_sv) ? SvPV_nolen(value_sv) : NULL; CFCClass_add_attribute(self, name, value); int has_attribute(self, name) CFCClass *self; const char *name; CODE: RETVAL = CFCClass_has_attribute(self, name); OUTPUT: RETVAL void grow_tree(self) CFCClass *self; PPCODE: CFCClass_grow_tree(self); void add_inert_var(self, var) CFCClass *self; CFCVariable *var; PPCODE: CFCClass_add_inert_var(self, var); SV* function(self, sym) CFCClass *self; const char *sym; CODE: CFCFunction *func = CFCClass_function(self, sym); RETVAL = S_cfcbase_to_perlref(func); OUTPUT: RETVAL SV* method(self, sym) CFCClass *self; const char *sym; CODE: CFCMethod *method = CFCClass_method(self, sym); RETVAL = S_cfcbase_to_perlref(method); OUTPUT: RETVAL SV* novel_method(self, sym) CFCClass *self; const char *sym; CODE: CFCMethod *method = CFCClass_novel_method(self, sym); RETVAL = S_cfcbase_to_perlref(method); OUTPUT: RETVAL void _set_or_get(self, ...) CFCClass *self; ALIAS: get_cnick = 2 set_parent = 5 get_parent = 6 get_autocode = 8 get_source_class = 10 get_parent_class_name = 12 final = 14 inert = 16 get_struct_sym = 18 full_struct_sym = 20 short_vtable_var = 22 full_vtable_var = 24 full_vtable_type = 26 include_h = 28 get_docucomment = 30 children = 32 functions = 34 methods = 36 member_vars = 38 inert_vars = 40 tree_to_ladder = 42 novel_methods = 44 novel_member_vars = 46 privacy_symbol = 48 PPCODE: { START_SET_OR_GET_SWITCH case 2: { const char *value = CFCClass_get_cnick(self); retval = newSVpvn(value, strlen(value)); } break; case 5: { CFCClass *parent = NULL; if (SvOK(ST(1)) && sv_derived_from(ST(1), "Clownfish::CFC::Class") ) { IV objint = SvIV((SV*)SvRV(ST(1))); parent = INT2PTR(CFCClass*, objint); } CFCClass_set_parent(self, parent); break; } case 6: { CFCClass *parent = CFCClass_get_parent(self); retval = S_cfcbase_to_perlref(parent); break; } case 8: { const char *value = CFCClass_get_autocode(self); retval = newSVpvn(value, strlen(value)); } break; case 10: { const char *value = CFCClass_get_source_class(self); retval = newSVpvn(value, strlen(value)); } break; case 12: { const char *value = CFCClass_get_parent_class_name(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 14: retval = newSViv(CFCClass_final(self)); break; case 16: retval = newSViv(CFCClass_inert(self)); break; case 18: { const char *value = CFCClass_get_struct_sym(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 20: { const char *value = CFCClass_full_struct_sym(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 22: { const char *value = CFCClass_short_vtable_var(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 24: { const char *value = CFCClass_full_vtable_var(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 26: { const char *value = CFCClass_full_vtable_type(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 28: { const char *value = CFCClass_include_h(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; case 30: { CFCDocuComment *docucomment = CFCClass_get_docucomment(self); retval = S_cfcbase_to_perlref(docucomment); } break; case 32: retval = S_array_of_cfcbase_to_av( (CFCBase**)CFCClass_children(self)); break; case 34: retval = S_array_of_cfcbase_to_av((CFCBase**)CFCClass_functions(self)); break; case 36: retval = S_array_of_cfcbase_to_av((CFCBase**)CFCClass_methods(self)); break; case 38: retval = S_array_of_cfcbase_to_av((CFCBase**)CFCClass_member_vars(self)); break; case 40: retval = S_array_of_cfcbase_to_av((CFCBase**)CFCClass_inert_vars(self)); break; case 42: { CFCClass **ladder = CFCClass_tree_to_ladder(self); retval = S_array_of_cfcbase_to_av((CFCBase**)ladder); FREEMEM(ladder); break; } case 44: { CFCMethod **novel = CFCClass_novel_methods(self); retval = S_array_of_cfcbase_to_av((CFCBase**)novel); FREEMEM(novel); break; } case 46: { CFCVariable **novel = CFCClass_novel_member_vars(self); retval = S_array_of_cfcbase_to_av((CFCBase**)novel); FREEMEM(novel); break; } case 48: { const char *value = CFCClass_privacy_symbol(self); retval = value ? newSVpvn(value, strlen(value)) : newSV(0); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::DocuComment SV* parse(klass, text) const char *klass; const char *text; CODE: if (strcmp(klass, "Clownfish::CFC::DocuComment")) { croak("No subclassing allowed"); } CFCDocuComment *self = CFCDocuComment_parse(text); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void _set_or_get(self, ...) CFCDocuComment *self; ALIAS: get_description = 2 get_brief = 4 get_long = 6 get_param_names = 8 get_param_docs = 10 get_retval = 12 PPCODE: { START_SET_OR_GET_SWITCH case 2: { const char *description = CFCDocuComment_get_description(self); retval = newSVpvn(description, strlen(description)); } break; case 4: { const char *brief = CFCDocuComment_get_brief(self); retval = newSVpvn(brief, strlen(brief)); } break; case 6: { const char *long_description = CFCDocuComment_get_long(self); retval = newSVpvn(long_description, strlen(long_description)); } break; case 8: { AV *av = newAV(); const char **names = CFCDocuComment_get_param_names(self); size_t i; for (i = 0; names[i] != NULL; i++) { SV *val_sv = newSVpvn(names[i], strlen(names[i])); av_store(av, i, val_sv); } retval = newRV((SV*)av); SvREFCNT_dec(av); break; } case 10: { AV *av = newAV(); const char **docs = CFCDocuComment_get_param_docs(self); size_t i; for (i = 0; docs[i] != NULL; i++) { SV *val_sv = newSVpvn(docs[i], strlen(docs[i])); av_store(av, i, val_sv); } retval = newRV((SV*)av); SvREFCNT_dec(av); break; } case 12: { const char *rv = CFCDocuComment_get_retval(self); retval = rv ? newSVpvn(rv, strlen(rv)) : newSV(0); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Dumpable SV* new(klass) const char *klass; CODE: if (strcmp(klass, "Clownfish::CFC::Dumpable")) { croak("No subclassing allowed"); } CFCDumpable *self = CFCDumpable_new(); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void add_dumpables(self, klass) CFCDumpable *self; CFCClass *klass; PPCODE: CFCDumpable_add_dumpables(self, klass); MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::File SV* _new(source_class) const char *source_class; CODE: CFCFile *self = CFCFile_new(source_class); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void add_block(self, block) CFCFile *self; CFCBase *block; PPCODE: CFCFile_add_block(self, block); void _set_or_get(self, ...) CFCFile *self; ALIAS: set_modified = 1 get_modified = 2 get_source_class = 4 guard_name = 6 guard_start = 8 guard_close = 10 blocks = 12 classes = 14 PPCODE: { START_SET_OR_GET_SWITCH case 1: CFCFile_set_modified(self, !!SvTRUE(ST(1))); break; case 2: retval = newSViv(CFCFile_get_modified(self)); break; case 4: { const char *value = CFCFile_get_source_class(self); retval = newSVpv(value, strlen(value)); } break; case 6: { const char *value = CFCFile_guard_name(self); retval = newSVpv(value, strlen(value)); } break; case 8: { const char *value = CFCFile_guard_start(self); retval = newSVpv(value, strlen(value)); } break; case 10: { const char *value = CFCFile_guard_close(self); retval = newSVpv(value, strlen(value)); } break; case 12: retval = S_array_of_cfcbase_to_av(CFCFile_blocks(self)); break; case 14: retval = S_array_of_cfcbase_to_av( (CFCBase**)CFCFile_classes(self)); break; END_SET_OR_GET_SWITCH } SV* _gen_path(self, base_dir = NULL) CFCFile *self; const char *base_dir; ALIAS: c_path = 1 h_path = 2 cfh_path = 3 CODE: { size_t buf_size = CFCFile_path_buf_size(self, base_dir); RETVAL = newSV(buf_size); SvPOK_on(RETVAL); char *buf = SvPVX(RETVAL); switch (ix) { case 1: CFCFile_c_path(self, buf, buf_size, base_dir); break; case 2: CFCFile_h_path(self, buf, buf_size, base_dir); break; case 3: CFCFile_cfh_path(self, buf, buf_size, base_dir); break; default: croak("unexpected ix value: %d", (int)ix); } SvCUR_set(RETVAL, strlen(buf)); } OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Function SV* _new(parcel, exposure_sv, class_name_sv, class_cnick_sv, micro_sym_sv, return_type, param_list, docucomment, is_inline) CFCParcel *parcel; SV *exposure_sv; SV *class_name_sv; SV *class_cnick_sv; SV *micro_sym_sv; CFCType *return_type; CFCParamList *param_list; CFCDocuComment *docucomment; int is_inline; CODE: const char *exposure = SvOK(exposure_sv) ? SvPV_nolen(exposure_sv) : NULL; const char *class_name = SvOK(class_name_sv) ? SvPV_nolen(class_name_sv) : NULL; const char *class_cnick = SvOK(class_cnick_sv) ? SvPV_nolen(class_cnick_sv) : NULL; const char *micro_sym = SvOK(micro_sym_sv) ? SvPV_nolen(micro_sym_sv) : NULL; CFCFunction *self = CFCFunction_new(parcel, exposure, class_name, class_cnick, micro_sym, return_type, param_list, docucomment, is_inline); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void _set_or_get(self, ...) CFCFunction *self; ALIAS: get_return_type = 2 get_param_list = 4 get_docucomment = 6 inline = 8 void = 10 full_func_sym = 12 short_func_sym = 14 PPCODE: { START_SET_OR_GET_SWITCH case 2: { CFCType *type = CFCFunction_get_return_type(self); retval = S_cfcbase_to_perlref(type); } break; case 4: { CFCParamList *param_list = CFCFunction_get_param_list(self); retval = S_cfcbase_to_perlref(param_list); } break; case 6: { CFCDocuComment *docucomment = CFCFunction_get_docucomment(self); retval = S_cfcbase_to_perlref(docucomment); } break; case 8: retval = newSViv(CFCFunction_inline(self)); break; case 10: retval = newSViv(CFCFunction_void(self)); break; case 12: { const char *full_sym = CFCFunction_full_func_sym(self); retval = newSVpv(full_sym, strlen(full_sym)); } break; case 14: { const char *short_sym = CFCFunction_short_func_sym(self); retval = newSVpv(short_sym, strlen(short_sym)); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Hierarchy SV* _new(source, dest) const char *source; const char *dest; CODE: CFCHierarchy *self = CFCHierarchy_new(source, dest); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void build(self) CFCHierarchy *self; PPCODE: CFCHierarchy_build(self); int propagate_modified(self, ...) CFCHierarchy *self; CODE: int modified = items > 1 ? !!SvTRUE(ST(1)) : 0; RETVAL = CFCHierarchy_propagate_modified(self, modified); OUTPUT: RETVAL void _set_or_get(self, ...) CFCHierarchy *self; ALIAS: get_source = 2 get_dest = 4 files = 8 ordered_classes = 10 PPCODE: { START_SET_OR_GET_SWITCH case 2: { const char *value = CFCHierarchy_get_source(self); retval = newSVpv(value, strlen(value)); } break; case 4: { const char *value = CFCHierarchy_get_dest(self); retval = newSVpv(value, strlen(value)); } break; case 8: retval = S_array_of_cfcbase_to_av( (CFCBase**)CFCHierarchy_files(self)); break; case 10: { CFCClass **ladder = CFCHierarchy_ordered_classes(self); retval = S_array_of_cfcbase_to_av((CFCBase**)ladder); FREEMEM(ladder); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Method SV* _new(parcel, exposure_sv, class_name_sv, class_cnick_sv, macro_sym, return_type, param_list, docucomment, is_final, is_abstract) CFCParcel *parcel; SV *exposure_sv; SV *class_name_sv; SV *class_cnick_sv; const char *macro_sym; CFCType *return_type; CFCParamList *param_list; CFCDocuComment *docucomment; int is_final; int is_abstract; CODE: const char *exposure = SvOK(exposure_sv) ? SvPV_nolen(exposure_sv) : NULL; const char *class_name = SvOK(class_name_sv) ? SvPV_nolen(class_name_sv) : NULL; const char *class_cnick = SvOK(class_cnick_sv) ? SvPV_nolen(class_cnick_sv) : NULL; CFCMethod *self = CFCMethod_new(parcel, exposure, class_name, class_cnick, macro_sym, return_type, param_list, docucomment, is_final, is_abstract); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL int compatible(self, other) CFCMethod *self; CFCMethod *other; CODE: RETVAL = CFCMethod_compatible(self, other); OUTPUT: RETVAL void override(self, other) CFCMethod *self; CFCMethod *other; PPCODE: CFCMethod_override(self, other); SV* finalize(self) CFCMethod *self; CODE: CFCMethod *finalized = CFCMethod_finalize(self); RETVAL = S_cfcbase_to_perlref(finalized); CFCBase_decref((CFCBase*)finalized); OUTPUT: RETVAL SV* _various_method_syms(self, invoker) CFCMethod *self; const char *invoker; ALIAS: short_method_sym = 1 full_method_sym = 2 full_offset_sym = 3 CODE: size_t size = 0; switch (ix) { case 1: size = CFCMethod_short_method_sym(self, invoker, NULL, 0); break; case 2: size = CFCMethod_full_method_sym(self, invoker, NULL, 0); break; case 3: size = CFCMethod_full_offset_sym(self, invoker, NULL, 0); break; default: croak("Unexpected ix: %d", (int)ix); } RETVAL = newSV(size); SvPOK_on(RETVAL); char *buf = SvPVX(RETVAL); switch (ix) { case 1: CFCMethod_short_method_sym(self, invoker, buf, size); break; case 2: CFCMethod_full_method_sym(self, invoker, buf, size); break; case 3: CFCMethod_full_offset_sym(self, invoker, buf, size); break; default: croak("Unexpected ix: %d", (int)ix); } SvCUR_set(RETVAL, strlen(buf)); OUTPUT: RETVAL void _set_or_get(self, ...) CFCMethod *self; ALIAS: get_macro_sym = 2 short_typedef = 4 full_typedef = 6 full_callback_sym = 8 full_override_sym = 10 abstract = 12 novel = 14 final = 16 self_type = 18 PPCODE: { START_SET_OR_GET_SWITCH case 2: { const char *macro_sym = CFCMethod_get_macro_sym(self); retval = newSVpvn(macro_sym, strlen(macro_sym)); } break; case 4: { const char *short_typedef = CFCMethod_short_typedef(self); retval = newSVpvn(short_typedef, strlen(short_typedef)); } break; case 6: { const char *value = CFCMethod_full_typedef(self); retval = newSVpvn(value, strlen(value)); } break; case 8: { const char *value = CFCMethod_full_callback_sym(self); retval = newSVpvn(value, strlen(value)); } break; case 10: { const char *value = CFCMethod_full_override_sym(self); retval = newSVpvn(value, strlen(value)); } break; case 12: retval = newSViv(CFCMethod_abstract(self)); break; case 14: retval = newSViv(CFCMethod_novel(self)); break; case 16: retval = newSViv(CFCMethod_final(self)); break; case 18: { CFCType *type = CFCMethod_self_type(self); retval = S_cfcbase_to_perlref(type); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::ParamList SV* _new(klass, variadic) int variadic; CODE: CFCParamList *self = CFCParamList_new(variadic); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL void add_param(self, variable, value_sv) CFCParamList *self; CFCVariable *variable; SV *value_sv; PPCODE: const char *value = SvOK(value_sv) ? SvPV_nolen(value_sv) : NULL; CFCParamList_add_param(self, variable, value); void _set_or_get(self, ...) CFCParamList *self; ALIAS: get_variables = 2 get_initial_values = 4 variadic = 6 num_vars = 8 to_c = 10 name_list = 12 PPCODE: { START_SET_OR_GET_SWITCH case 2: { AV *av = newAV(); CFCVariable **vars = CFCParamList_get_variables(self); size_t i; size_t num_vars = CFCParamList_num_vars(self); for (i = 0; i < num_vars; i++) { SV *ref = S_cfcbase_to_perlref(vars[i]); av_store(av, i, ref); } retval = newRV((SV*)av); SvREFCNT_dec(av); break; } case 4: { AV *av = newAV(); const char **values = CFCParamList_get_initial_values(self); size_t i; size_t num_vars = CFCParamList_num_vars(self); for (i = 0; i < num_vars; i++) { if (values[i] != NULL) { SV *val_sv = newSVpvn(values[i], strlen(values[i])); av_store(av, i, val_sv); } else { av_store(av, i, newSV(0)); } } retval = newRV((SV*)av); SvREFCNT_dec(av); break; } case 6: retval = newSViv(CFCParamList_variadic(self)); break; case 8: retval = newSViv(CFCParamList_num_vars(self)); break; case 10: { const char *value = CFCParamList_to_c(self); retval = newSVpv(value, strlen(value)); } break; case 12: { const char *value = CFCParamList_name_list(self); retval = newSVpv(value, strlen(value)); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Parcel SV* _singleton(name_sv, cnick_sv) SV *name_sv; SV *cnick_sv; CODE: const char *name = SvOK(name_sv) ? SvPV_nolen(name_sv) : NULL; const char *cnick = SvOK(cnick_sv) ? SvPV_nolen(cnick_sv) : NULL; CFCParcel *self = CFCParcel_singleton(name, cnick); RETVAL = S_cfcbase_to_perlref(self); OUTPUT: RETVAL int equals(self, other) CFCParcel *self; CFCParcel *other; CODE: RETVAL = CFCParcel_equals(self, other); OUTPUT: RETVAL SV* default_parcel(...) CODE: CFCParcel *default_parcel = CFCParcel_default_parcel(); RETVAL = S_cfcbase_to_perlref(default_parcel); OUTPUT: RETVAL void reap_singletons(...) PPCODE: CFCParcel_reap_singletons(); void _set_or_get(self, ...) CFCParcel *self; ALIAS: get_name = 2 get_cnick = 4 get_prefix = 6 get_Prefix = 8 get_PREFIX = 10 PPCODE: { START_SET_OR_GET_SWITCH case 2: { const char *name = CFCParcel_get_name(self); retval = newSVpvn(name, strlen(name)); } break; case 4: { const char *cnick = CFCParcel_get_cnick(self); retval = newSVpvn(cnick, strlen(cnick)); } break; case 6: { const char *value = CFCParcel_get_prefix(self); retval = newSVpvn(value, strlen(value)); } break; case 8: { const char *value = CFCParcel_get_Prefix(self); retval = newSVpvn(value, strlen(value)); } break; case 10: { const char *value = CFCParcel_get_PREFIX(self); retval = newSVpvn(value, strlen(value)); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Symbol SV* _new(parcel, exposure, class_name_sv, class_cnick_sv, micro_sym_sv) CFCParcel *parcel; const char *exposure; SV *class_name_sv; SV *class_cnick_sv; SV *micro_sym_sv; CODE: const char *class_name = SvOK(class_name_sv) ? SvPV_nolen(class_name_sv) : NULL; const char *class_cnick = SvOK(class_cnick_sv) ? SvPV_nolen(class_cnick_sv) : NULL; const char *micro_sym = SvOK(micro_sym_sv) ? SvPV_nolen(micro_sym_sv) : NULL; CFCSymbol *self = CFCSymbol_new(parcel, exposure, class_name, class_cnick, micro_sym); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL int equals(self, other) CFCSymbol *self; CFCSymbol *other; CODE: RETVAL = CFCSymbol_equals(self, other); OUTPUT: RETVAL void _set_or_get(self, ...) CFCSymbol *self; ALIAS: get_parcel = 2 get_class_name = 4 get_class_cnick = 6 get_exposure = 8 micro_sym = 10 get_prefix = 12 get_Prefix = 14 get_PREFIX = 16 public = 18 private = 20 parcel = 22 local = 24 short_sym = 26 full_sym = 28 PPCODE: { START_SET_OR_GET_SWITCH case 2: { struct CFCParcel *parcel = CFCSymbol_get_parcel(self); retval = S_cfcbase_to_perlref(parcel); } break; case 4: { const char *class_name = CFCSymbol_get_class_name(self); retval = class_name ? newSVpvn(class_name, strlen(class_name)) : newSV(0); } break; case 6: { const char *class_cnick = CFCSymbol_get_class_cnick(self); retval = class_cnick ? newSVpvn(class_cnick, strlen(class_cnick)) : newSV(0); } break; case 8: { const char *exposure = CFCSymbol_get_exposure(self); retval = newSVpvn(exposure, strlen(exposure)); } break; case 10: { const char *micro_sym = CFCSymbol_micro_sym(self); retval = newSVpvn(micro_sym, strlen(micro_sym)); } break; case 12: { const char *value = CFCSymbol_get_prefix(self); retval = newSVpvn(value, strlen(value)); } break; case 14: { const char *value = CFCSymbol_get_Prefix(self); retval = newSVpvn(value, strlen(value)); } break; case 16: { const char *value = CFCSymbol_get_PREFIX(self); retval = newSVpvn(value, strlen(value)); } break; case 18: retval = newSViv(CFCSymbol_public(self)); break; case 20: retval = newSViv(CFCSymbol_private(self)); break; case 22: retval = newSViv(CFCSymbol_parcel(self)); break; case 24: retval = newSViv(CFCSymbol_local(self)); break; case 26: { const char *short_sym = CFCSymbol_short_sym(self); retval = newSVpvn(short_sym, strlen(short_sym)); } break; case 28: { const char *full_sym = CFCSymbol_full_sym(self); retval = newSVpvn(full_sym, strlen(full_sym)); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Type SV* _new(flags, parcel, specifier, indirection, c_string) int flags; CFCParcel *parcel; const char *specifier; int indirection; const char *c_string; CODE: CFCType *self = CFCType_new(flags, parcel, specifier, indirection, c_string); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_integer(flags, specifier) int flags; const char *specifier; CODE: CFCType *self = CFCType_new_integer(flags, specifier); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_float(flags, specifier) int flags; const char *specifier; CODE: CFCType *self = CFCType_new_float(flags, specifier); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_object(flags, parcel, specifier, indirection) int flags; CFCParcel *parcel; const char *specifier; int indirection; CODE: CFCType *self = CFCType_new_object(flags, parcel, specifier, indirection); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_composite(flags, child_sv, indirection, array) int flags; SV *child_sv; int indirection; const char *array; CODE: CFCType *child = NULL; if (SvOK(child_sv) && sv_derived_from(child_sv, "Clownfish::CFC::Type")) { IV objint = SvIV((SV*)SvRV(child_sv)); child = INT2PTR(CFCType*, objint); } else { croak("Param 'child' not a Clownfish::CFC::Type"); } CFCType *self = CFCType_new_composite(flags, child, indirection, array); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_void(is_const) int is_const; CODE: CFCType *self = CFCType_new_void(is_const); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_va_list() CODE: CFCType *self = CFCType_new_va_list(); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* _new_arbitrary(parcel, specifier) CFCParcel *parcel; const char *specifier; CODE: CFCType *self = CFCType_new_arbitrary(parcel, specifier); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL int equals(self, other) CFCType *self; CFCType *other; CODE: RETVAL = CFCType_equals(self, other); OUTPUT: RETVAL int similar(self, other) CFCType *self; CFCType *other; CODE: RETVAL = CFCType_similar(self, other); OUTPUT: RETVAL unsigned CONST(...) CODE: RETVAL = CFCTYPE_CONST; OUTPUT: RETVAL unsigned NULLABLE(...) CODE: RETVAL = CFCTYPE_NULLABLE; OUTPUT: RETVAL unsigned INCREMENTED(...) CODE: RETVAL = CFCTYPE_INCREMENTED; OUTPUT: RETVAL unsigned DECREMENTED(...) CODE: RETVAL = CFCTYPE_DECREMENTED; OUTPUT: RETVAL unsigned VOID(...) CODE: RETVAL = CFCTYPE_VOID; OUTPUT: RETVAL unsigned OBJECT(...) CODE: RETVAL = CFCTYPE_OBJECT; OUTPUT: RETVAL unsigned PRIMITIVE(...) CODE: RETVAL = CFCTYPE_PRIMITIVE; OUTPUT: RETVAL unsigned INTEGER(...) CODE: RETVAL = CFCTYPE_INTEGER; OUTPUT: RETVAL unsigned FLOATING(...) CODE: RETVAL = CFCTYPE_FLOATING; OUTPUT: RETVAL unsigned STRING_TYPE(...) CODE: RETVAL = CFCTYPE_STRING_TYPE; OUTPUT: RETVAL unsigned VA_LIST(...) CODE: RETVAL = CFCTYPE_VA_LIST; OUTPUT: RETVAL unsigned ARBITRARY(...) CODE: RETVAL = CFCTYPE_ARBITRARY; OUTPUT: RETVAL unsigned COMPOSITE(...) CODE: RETVAL = CFCTYPE_COMPOSITE; OUTPUT: RETVAL void _set_or_get(self, ...) CFCType *self; ALIAS: set_specifier = 1 get_specifier = 2 get_parcel = 4 get_indirection = 6 set_c_string = 7 to_c = 8 const = 10 set_nullable = 11 nullable = 12 is_void = 14 is_object = 16 is_primitive = 18 is_integer = 20 is_floating = 22 is_string_type = 24 is_va_list = 26 is_arbitrary = 28 is_composite = 30 get_width = 32 incremented = 34 decremented = 36 get_array = 38 PPCODE: { START_SET_OR_GET_SWITCH case 1: CFCType_set_specifier(self, SvPV_nolen(ST(1))); break; case 2: { const char *specifier = CFCType_get_specifier(self); retval = newSVpvn(specifier, strlen(specifier)); } break; case 4: { CFCParcel *parcel = CFCType_get_parcel(self); retval = S_cfcbase_to_perlref(parcel); } break; case 6: retval = newSViv(CFCType_get_indirection(self)); break; case 7: CFCType_set_c_string(self, SvPV_nolen(ST(1))); case 8: { const char *c_string = CFCType_to_c(self); retval = newSVpvn(c_string, strlen(c_string)); } break; case 10: retval = newSViv(CFCType_const(self)); break; case 11: CFCType_set_nullable(self, !!SvTRUE(ST(1))); break; case 12: retval = newSViv(CFCType_nullable(self)); break; case 14: retval = newSViv(CFCType_is_void(self)); break; case 16: retval = newSViv(CFCType_is_object(self)); break; case 18: retval = newSViv(CFCType_is_primitive(self)); break; case 20: retval = newSViv(CFCType_is_integer(self)); break; case 22: retval = newSViv(CFCType_is_floating(self)); break; case 24: retval = newSViv(CFCType_is_string_type(self)); break; case 26: retval = newSViv(CFCType_is_va_list(self)); break; case 28: retval = newSViv(CFCType_is_arbitrary(self)); break; case 30: retval = newSViv(CFCType_is_composite(self)); break; case 32: retval = newSVuv(CFCType_get_width(self)); break; case 34: retval = newSVuv(CFCType_incremented(self)); break; case 36: retval = newSVuv(CFCType_decremented(self)); break; case 38: { const char *array = CFCType_get_array(self); retval = array ? newSVpvn(array, strlen(array)) : newSV(0); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Util SV* trim_whitespace(text) SV *text; CODE: RETVAL = newSVsv(text); STRLEN len; char *ptr = SvPV(RETVAL, len); CFCUtil_trim_whitespace(ptr); SvCUR_set(RETVAL, strlen(ptr)); OUTPUT: RETVAL SV* slurp_text(path) const char *path; CODE: size_t len; char *contents = CFCUtil_slurp_text(path, &len); RETVAL = newSVpvn(contents, len); FREEMEM(contents); OUTPUT: RETVAL int current(orig, dest) const char *orig; const char *dest; CODE: RETVAL = CFCUtil_current(orig, dest); OUTPUT: RETVAL void write_if_changed(path, content_sv) const char *path; SV *content_sv; PPCODE: STRLEN len; char *content = SvPV(content_sv, len); CFCUtil_write_if_changed(path, content, len); int is_dir(path) const char *path; CODE: RETVAL = CFCUtil_is_dir(path); OUTPUT: RETVAL int make_dir(dir) const char *dir; CODE: RETVAL = CFCUtil_make_dir(dir); OUTPUT: RETVAL int make_path(path) const char *path; CODE: RETVAL = CFCUtil_make_path(path); OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Variable SV* _new(parcel, exposure, class_name_sv, class_cnick_sv, micro_sym_sv, type_sv, inert_sv) CFCParcel *parcel; const char *exposure; SV *class_name_sv; SV *class_cnick_sv; SV *micro_sym_sv; SV *type_sv; SV *inert_sv; CODE: const char *class_name = SvOK(class_name_sv) ? SvPV_nolen(class_name_sv) : NULL; const char *class_cnick = SvOK(class_cnick_sv) ? SvPV_nolen(class_cnick_sv) : NULL; const char *micro_sym = SvOK(micro_sym_sv) ? SvPV_nolen(micro_sym_sv) : NULL; int inert = SvOK(inert_sv) ? !!SvTRUE(inert_sv) : 0; CFCType *type = NULL; if (SvOK(type_sv) && sv_derived_from(type_sv, "Clownfish::CFC::Type")) { IV objint = SvIV((SV*)SvRV(type_sv)); type = INT2PTR(CFCType*, objint); } else { croak("Param 'type' is not a Clownfish::CFC::Type"); } CFCVariable *self = CFCVariable_new(parcel, exposure, class_name, class_cnick, micro_sym, type, inert); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL int equals(self, other) CFCVariable *self; CFCVariable *other; CODE: RETVAL = CFCVariable_equals(self, other); OUTPUT: RETVAL void _set_or_get(self, ...) CFCVariable *self; ALIAS: get_type = 2 local_c = 4 global_c = 6 local_declaration = 8 PPCODE: { START_SET_OR_GET_SWITCH case 2: { CFCType *type = CFCVariable_get_type(self); retval = S_cfcbase_to_perlref(type); } break; case 4: { const char *local_c = CFCVariable_local_c(self); retval = newSVpvn(local_c, strlen(local_c)); } break; case 6: { const char *global_c = CFCVariable_global_c(self); retval = newSVpvn(global_c, strlen(global_c)); } break; case 8: { const char *local_dec = CFCVariable_local_declaration(self); retval = newSVpvn(local_dec, strlen(local_dec)); } break; END_SET_OR_GET_SWITCH } MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Binding::Core SV* _new(hierarchy, dest, header, footer) CFCHierarchy *hierarchy; const char *dest; const char *header; const char *footer; CODE: CFCBindCore *self = CFCBindCore_new(hierarchy, dest, header, footer); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL int write_all_modified(self, ...) CFCBindCore *self; CODE: { int modified = 0; if (items > 1 && SvOK(ST(1))) { modified = !!SvIV(ST(1)); } RETVAL = CFCBindCore_write_all_modified(self, modified); } OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Binding::Core::Function SV* func_declaration(unused, func) SV *unused; CFCFunction *func; CODE: RETVAL = S_sv_eat_c_string(CFCBindFunc_func_declaration(func)); OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Binding::Core::Method SV* typedef_dec(unused, meth) SV *unused; CFCMethod *meth; CODE: RETVAL = S_sv_eat_c_string(CFCBindMeth_typdef_dec(meth)); OUTPUT: RETVAL SV* abstract_method_def(unused, meth) SV *unused; CFCMethod *meth; CODE: RETVAL = S_sv_eat_c_string(CFCBindMeth_abstract_method_def(meth)); OUTPUT: RETVAL SV* callback_dec(unused, meth) SV *unused; CFCMethod *meth; CODE: RETVAL = S_sv_eat_c_string(CFCBindMeth_callback_dec(meth)); OUTPUT: RETVAL SV* callback_def(unused, meth) SV *unused; CFCMethod *meth; CODE: RETVAL = S_sv_eat_c_string(CFCBindMeth_callback_def(meth)); OUTPUT: RETVAL SV* _method_def(meth, klass) CFCMethod *meth; CFCClass *klass; CODE: RETVAL = S_sv_eat_c_string(CFCBindMeth_method_def(meth, klass)); OUTPUT: RETVAL SV* _callback_obj_def(meth, offset) CFCMethod *meth; const char *offset; CODE: RETVAL = S_sv_eat_c_string(CFCBindMeth_callback_obj_def(meth, offset)); OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Binding::Core::Aliases SV* c_aliases(...) CODE: RETVAL = S_sv_eat_c_string(CFCBindAliases_c_aliases()); OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Binding::Core::Class SV* _new(client) CFCClass *client; CODE: CFCBindClass *self = CFCBindClass_new(client); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* to_c(self) CFCBindClass *self; CODE: RETVAL = S_sv_eat_c_string(CFCBindClass_to_c(self)); OUTPUT: RETVAL SV* to_c_header(self) CFCBindClass *self; CODE: RETVAL = S_sv_eat_c_string(CFCBindClass_to_c_header(self)); OUTPUT: RETVAL MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Binding::Core::File void _write_h(file, dest, header, footer) CFCFile *file; const char *dest; const char *header; const char *footer; PPCODE: CFCBindFile_write_h(file, dest, header, footer); MODULE = Clownfish::CFC PACKAGE = Clownfish::CFC::Parser SV* new(klass) const char *klass; CODE: if (strcmp(klass, "Clownfish::CFC::Parser")) { croak("No subclassing allowed"); } CFCParser *self = CFCParser_new(); RETVAL = S_cfcbase_to_perlref(self); CFCBase_decref((CFCBase*)self); OUTPUT: RETVAL SV* parse(self, string) CFCParser *self; const char *string; CODE: CFCBase *got = CFCParser_parse(self, string); RETVAL = S_cfcbase_to_perlref(got); CFCBase_decref((CFCBase*)got); OUTPUT: RETVAL SV* _parse_file(self, string, source_class) CFCParser *self; const char *string; const char *source_class; CODE: CFCFile *got = CFCParser_parse_file(self, string, source_class); RETVAL = S_cfcbase_to_perlref(got); CFCBase_decref((CFCBase*)got); OUTPUT: RETVAL void set_parcel(self, parcel) CFCParser *self; CFCParcel *parcel; PPCODE: CFCParser_set_parcel(self, parcel); void set_class_name(self, class_name) CFCParser *self; const char *class_name; PPCODE: CFCParser_set_class_name(self, class_name); void set_class_cnick(self, class_cnick) CFCParser *self; const char *class_cnick; PPCODE: CFCParser_set_class_cnick(self, class_cnick); SV* get_parcel(self) CFCParser *self; CODE: CFCParcel *parcel = CFCParser_get_parcel(self); RETVAL = S_cfcbase_to_perlref((CFCBase*)parcel); OUTPUT: RETVAL liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/000077500000000000000000000000001233767526200221705ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Base.pm000066400000000000000000000015051233767526200234010ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Base; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/000077500000000000000000000000001233767526200235425ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core.pm000066400000000000000000000015161233767526200247730ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Binding::Core; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core/000077500000000000000000000000001233767526200244325ustar00rootroot00000000000000liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core/Aliases.pm000066400000000000000000000015271233767526200263560ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Binding::Core::Aliases; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core/Class.pm000066400000000000000000000015251233767526200260400ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Binding::Core::Class; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core/File.pm000066400000000000000000000015241233767526200256510ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Binding::Core::File; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core/Function.pm000066400000000000000000000015301233767526200265540ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Binding::Core::Function; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Core/Method.pm000066400000000000000000000015261233767526200262140ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::CFC::Binding::Core::Method; use Clownfish::CFC; 1; liblucy-perl-0.3.3/clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm000066400000000000000000000420531233767526200250060ustar00rootroot00000000000000# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use warnings; package Clownfish::CFC::Binding::Perl; use Clownfish::CFC::Hierarchy; use Carp; use File::Spec::Functions qw( catfile ); use Fcntl; use Clownfish::CFC::Parcel; use Clownfish::CFC::Class; use Clownfish::CFC::Function; use Clownfish::CFC::Method; use Clownfish::CFC::Variable; use Clownfish::CFC::Util qw( verify_args a_isa_b write_if_changed ); use Clownfish::CFC::Binding::Perl::Class; use Clownfish::CFC::Binding::Perl::Method; use Clownfish::CFC::Binding::Perl::Constructor; our %new_PARAMS = ( parcel => undef, hierarchy => undef, lib_dir => undef, boot_class => undef, header => undef, footer => undef, ); sub new { my $either = shift; verify_args( \%new_PARAMS, @_ ) or confess $@; my $self = bless { %new_PARAMS, @_, }, ref($either) || $either; if ( !a_isa_b( $self->{parcel}, 'Clownfish::CFC::Parcel' ) ) { $self->{parcel} = Clownfish::CFC::Parcel->singleton( name => $self->{parcel} ); } my $parcel = $self->{parcel}; for ( keys %new_PARAMS ) { confess("$_ is mandatory") unless defined $self->{$_}; } # Derive filenames. my $lib = $self->{lib_dir}; my $dest_dir = $self->{hierarchy}->get_dest; my @file_components = split( '::', $self->{boot_class} ); my @xs_file_components = @file_components; $xs_file_components[-1] .= '.xs'; $self->{xs_path} = catfile( $lib, @xs_file_components ); $self->{pm_path} = catfile( $lib, @file_components, 'Autobinding.pm' ); $self->{boot_h_file} = $parcel->get_prefix . "boot.h"; $self->{boot_c_file} = $parcel->get_prefix . "boot.c"; $self->{boot_h_path} = catfile( $dest_dir, $self->{boot_h_file} ); $self->{boot_c_path} = catfile( $dest_dir, $self->{boot_c_file} ); # Derive the name of the bootstrap function. $self->{boot_func} = $parcel->get_prefix . $self->{boot_class} . '_bootstrap'; $self->{boot_func} =~ s/\W/_/g; return $self; } sub write_bindings { my $self = shift; my $ordered = $self->{hierarchy}->ordered_classes; my $registered = Clownfish::CFC::Binding::Perl::Class->registered; my $hand_rolled_xs = ""; my $generated_xs = ""; my $xs = ""; my @xsubs; # Build up a roster of all requested bindings. my %has_constructors; my %has_methods; my %has_xs_code; for my $class (@$registered) { my $class_name = $class->get_class_name; my $class_binding = Clownfish::CFC::Binding::Perl::Class->singleton($class_name) or next; $has_constructors{$class_name} = 1 if $class_binding->get_bind_constructors; $has_methods{$class_name} = 1 if $class_binding->get_bind_methods; $has_xs_code{$class_name} = 1 if $class_binding->get_xs_code; } # Pound-includes for generated headers. for my $class (@$ordered) { my $include_h = $class->include_h; $generated_xs .= qq|#include "$include_h"\n|; } $generated_xs .= "\n"; # Constructors. for my $class (@$ordered) { my $class_name = $class->get_class_name; next unless delete $has_constructors{$class_name}; my $class_binding = Clownfish::CFC::Binding::Perl::Class->singleton($class_name); my @bound = $class_binding->constructor_bindings; $generated_xs .= $_->xsub_def . "\n" for @bound; push @xsubs, @bound; } # Methods. for my $class (@$ordered) { my $class_name = $class->get_class_name; next unless delete $has_methods{$class_name}; my $class_binding = Clownfish::CFC::Binding::Perl::Class->singleton($class_name); my @bound = $class_binding->method_bindings; $generated_xs .= $_->xsub_def . "\n" for @bound; push @xsubs, @bound; } # Hand-rolled XS. for my $class_name ( keys %has_xs_code ) { my $class_binding = Clownfish::CFC::Binding::Perl::Class->singleton($class_name); $hand_rolled_xs .= $class_binding->get_xs_code . "\n"; } %has_xs_code = (); # Verify that all binding specs were processed. my @leftover_ctor = keys %has_constructors; if (@leftover_ctor) { confess( "Constructor bindings spec'd for non-existant classes: " . "'@leftover_ctor'" ); } my @leftover_bound = keys %has_methods; if (@leftover_bound) { confess( "Method bindings spec'd for non-existant classes: " . "'@leftover_bound'" ); } my @leftover_xs = keys %has_xs_code; if (@leftover_xs) { confess( "Hand-rolled XS spec'd for non-existant classes: " . "'@leftover_xs'" ); } # Build up code for booting XSUBs at module load time. my @xs_init_lines; for my $xsub (@xsubs) { my $c_name = $xsub->c_name; my $perl_name = $xsub->perl_name; push @xs_init_lines, qq|newXS("$perl_name", $c_name, file);|; } my $xs_init = join( "\n ", @xs_init_lines ); # Params hashes for arg checking of XSUBs that take labeled params. my @params_hash_defs = grep {defined} map { $_->params_hash_def } @xsubs; my $params_hash_defs = join( "\n", @params_hash_defs ); # Write out if there have been any changes. my $xs_file_contents = $self->_xs_file_contents( $generated_xs, $xs_init, $hand_rolled_xs ); my $pm_file_contents = $self->_pm_file_contents($params_hash_defs); write_if_changed( $self->{xs_path}, $xs_file_contents ); write_if_changed( $self->{pm_path}, $pm_file_contents ); } sub _xs_file_contents { my ( $self, $generated_xs, $xs_init, $hand_rolled_xs ) = @_; return <{boot_h_file}" #include "Lucy/Object/Host.h" #include "Lucy/Util/Memory.h" #include "Lucy/Util/StringHelper.h" $generated_xs MODULE = Lucy PACKAGE = Lucy::Autobinding void init_autobindings() PPCODE: { char* file = __FILE__; CHY_UNUSED_VAR(cv); CHY_UNUSED_VAR(items); $xs_init } $hand_rolled_xs END_STUFF } sub _pm_file_contents { my ( $self, $params_hash_defs ) = @_; return <{lib_dir}; my $ordered = $self->{hierarchy}->ordered_classes; my @files_written; my %has_pod; my %modified; my $registered = Clownfish::CFC::Binding::Perl::Class->registered; $has_pod{ $_->get_class_name } = 1 for grep { $_->get_make_pod } @$registered; for my $class (@$ordered) { my $class_name = $class->get_class_name; my $class_binding = Clownfish::CFC::Binding::Perl::Class->singleton($class_name) or next; next unless delete $has_pod{$class_name}; my $pod = $class_binding->create_pod or confess("Failed to generate POD for $class_name"); # Compare against existing file; rewrite if changed. my $pod_file_path = catfile( $lib_dir, split( '::', $class_name ) ) . ".pod"; my $existing = ""; if ( -e $pod_file_path ) { open( my $pod_fh, "<", $pod_file_path ) or confess("Can't open '$pod_file_path': $!"); $existing = do { local $/; <$pod_fh> }; } if ( $pod ne $existing ) { $modified{$pod_file_path} = $pod; } } my @leftover = keys %has_pod; confess("Couldn't match pod to class for '@leftover'") if @leftover; return \%modified; } sub write_boot { my $self = shift; $self->_write_boot_h; $self->_write_boot_c; } sub _write_boot_h { my $self = shift; my $hierarchy = $self->{hierarchy}; my $filepath = catfile( $hierarchy->get_dest, $self->{boot_h_file} ); my $guard = uc("$self->{boot_class}_BOOT"); $guard =~ s/\W+/_/g; unlink $filepath; sysopen( my $fh, $filepath, O_CREAT | O_EXCL | O_WRONLY ) or confess("Can't open '$filepath': $!"); print $fh <{header} #ifndef $guard #define $guard 1 void $self->{boot_func}(); #endif /* $guard */ $self->{footer} END_STUFF } my %ks_compat = ( 'Lucy::Plan::Schema' => [qw( KinoSearch::Plan::Schema KinoSearch::Schema )], 'Lucy::Plan::FieldType' => [qw( KinoSearch::Plan::FieldType KinoSearch::FieldType )], 'Lucy::Plan::FullTextType' => [ qw( KinoSearch::Plan::FullTextType KinoSearch::FieldType::FullTextType ) ], 'Lucy::Plan::StringType' => [ qw( KinoSearch::Plan::StringType KinoSearch::FieldType::StringType )], 'Lucy::Plan::BlobType' => [qw( KinoSearch::Plan::BlobType KinoSearch::FieldType::BlobType )], 'Lucy::Analysis::PolyAnalyzer' => [qw( KinoSearch::Analysis::PolyAnalyzer )], 'Lucy::Analysis::RegexTokenizer' => [qw( KinoSearch::Analysis::Tokenizer )], 'Lucy::Analysis::CaseFolder' => [ qw( KinoSearch::Analysis::CaseFolder KinoSearch::Analysis::LCNormalizer ) ], 'Lucy::Analysis::SnowballStopFilter' => [qw( KinoSearch::Analysis::Stopalizer )], 'Lucy::Analysis::SnowballStemmer' => [qw( KinoSearch::Analysis::Stemmer )], ); sub _write_boot_c { my $self = shift; my $hierarchy = $self->{hierarchy}; my $ordered = $hierarchy->ordered_classes; my $num_classes = scalar @$ordered; my $pound_includes = ""; my $registrations = ""; my $isa_pushes = ""; for my $class (@$ordered) { my $include_h = $class->include_h; $pound_includes .= qq|#include "$include_h"\n|; next if $class->inert; # Ignore return value from VTable_add_to_registry, since it's OK if # multiple threads contend for adding these permanent VTables and some # fail. $registrations .= qq| cfish_VTable_add_to_registry(| . $class->full_vtable_var . qq|);\n|; # Add aliases for selected KinoSearch classes which allow old indexes # to be read. my $class_name = $class->get_class_name; my $aliases = $ks_compat{$class_name}; if ($aliases) { my $vtable_var = $class->full_vtable_var; for my $alias (@$aliases) { my $len = length($alias); $registrations .= qq| Cfish_ZCB_Assign_Str(alias, "$alias", $len);\n| . qq| cfish_VTable_add_alias_to_registry($vtable_var,\n| . qq| (cfish_CharBuf*)alias);\n|; } } my $parent = $class->get_parent; next unless $parent; my $parent_class = $parent->get_class_name; $isa_pushes .= qq| isa = get_av("$class_name\::ISA", 1);\n|; $isa_pushes .= qq| av_push(isa, newSVpv("$parent_class", 0));\n|; } my $filepath = catfile( $hierarchy->get_dest, $self->{boot_c_file} ); unlink $filepath; sysopen( my $fh, $filepath, O_CREAT | O_EXCL | O_WRONLY ) or confess("Can't open '$filepath': $!"); print $fh <{header} #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "$self->{boot_h_file}" #include "parcel.h" $pound_includes void $self->{boot_func}() { AV *isa; cfish_ZombieCharBuf *alias = CFISH_ZCB_WRAP_STR("", 0); $registrations $isa_pushes } $self->{footer} END_STUFF } sub write_xs_typemap { my $self = shift; Clownfish::CFC::Binding::Perl::TypeMap->write_xs_typemap( hierarchy => $self->{hierarchy}, ); } 1; __END__ __POD__ =head1 NAME Clownfish::CFC::Binding::Perl - Perl bindings for a Clownfish::CFC::Hierarchy. =head1 DESCRIPTION Clownfish::CFC::Binding::Perl presents an interface for auto-generating XS and Perl code to bind C code for a Clownfish class hierarchy to Perl. In theory this module could be much more flexible and its API could be more elegant. There are many ways which you could walk the parsed parcels, classes, methods, etc. in a Clownfish::CFC::Hierarchy and generate binding code. However, our needs are very limited, so we are content with a "one size fits one" solution. In particular, this module assumes that the XS bindings for all classes in the hierarchy should be assembled into a single shared object which belongs to the primary, "boot" class. There's no reason why it could not write one .xs file per class, or one per parcel, instead. The files written by this class are derived from the name of the boot class. If it is "Crustacean", the following files will be generated. # Generated by write_bindings() $lib_dir/Crustacean.xs $lib_dir/Crustacean/Autobinding.pm # Generated by write_boot() $hierarchy_dest_dir/crust_boot.h $hierarchy_dest_dir/crust_boot.c =head1 METHODS =head2 new my $perl_binding = Clownfish::CFC::Binding::Perl->new( boot_class => 'Crustacean', # required parcel => 'Crustacean', # required hierarchy => $hierarchy, # required lib_dir => 'lib', # required header => "/* Autogenerated file */\n", # required footer => $copyfoot, # required ); =over =item * B - The name of the main class, which will own the shared object. =item * B - The L to which the C belongs. =item * B - A Clownfish::CFC::Hierarchy. =item * B - location of the Perl lib directory to which files will be written. =item * B
- Text which will be prepended to generated C/XS files -- typically, an "autogenerated file" warning. =item * B